Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

unsigned PRandom::Number (  )  [static]

Get the next psuedo-random number in sequence. This utilises a single system wide thread safe PRandom variable. All threads etc will share the same psuedo-random sequence.

Definition at line 172 of file random.cxx.

#ifndef P_RTEMS
  static PMutex mutex;
  PWaitAndSignal wait(mutex);

  static PRandom rand;
  return rand;

Generated by  Doxygen 1.6.0   Back to index