Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes | Private Attributes | Friends
HammerData Class Reference
Inheritance diagram for HammerData:
Inheritance graph
Collaboration diagram for HammerData:
Collaboration graph

List of all members.

Public Types

enum  Action { sg_go, sg_stop, sg_done }
enum  Problem {
  sg_okay, sg_open, sg_close, sg_delete,
  sg_write, sg_seek

Public Member Functions

virtual ~HammerData ()
 HammerData (RCLock *lock, RCCondition *cond, PRUint32 clip)
virtual PRUint32 Random ()

Public Attributes

Action action
Problem problem
PRUint32 writes
RCInterval timein

Private Attributes

RCLock * ml
RCCondition * cv
PRUint32 limit
PRFloat64 seed


class Hammer

Detailed Description

Definition at line 77 of file ranfile.cpp.

Member Enumeration Documentation


Definition at line 80 of file ranfile.cpp.


Definition at line 82 of file ranfile.cpp.

Constructor & Destructor Documentation

HammerData::~HammerData ( ) [virtual]

Definition at line 154 of file ranfile.cpp.

{ }
HammerData::HammerData ( RCLock *  lock,
RCCondition *  cond,
PRUint32  clip 

Definition at line 156 of file ranfile.cpp.

    ml = lock;
    cv = cond;
    writes = 0;
    limit = clip;
    seed = 0x58a9382;
    action = HammerData::sg_go;
    problem = HammerData::sg_okay;
    timein = RCInterval(RCInterval::now);
}  /* HammerData::HammerData */

Member Function Documentation

Definition at line 136 of file ranfile.cpp.

    PRUint32 rv;
    PRUint64 shift;
    RCInterval now = RCInterval(RCInterval::now);
    PRFloat64 random = seed * (PRFloat64)((PRIntervalTime)now);
    LL_USHR(shift, *((PRUint64*)&random), 16);
    LL_L2UI(rv, shift);
    seed = (PRFloat64)rv;
    return rv;
}  /* HammerData::Random */

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Hammer [friend]

Definition at line 93 of file ranfile.cpp.

Member Data Documentation

Definition at line 89 of file ranfile.cpp.

RCCondition* HammerData::cv [private]

Definition at line 96 of file ranfile.cpp.

Definition at line 97 of file ranfile.cpp.

RCLock* HammerData::ml [private]

Definition at line 95 of file ranfile.cpp.

Definition at line 90 of file ranfile.cpp.

Definition at line 99 of file ranfile.cpp.

RCInterval HammerData::timein

Definition at line 92 of file ranfile.cpp.

Definition at line 91 of file ranfile.cpp.

The documentation for this class was generated from the following file: