cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions
osaThread.h File Reference

Declaration of osaThread. More...

#include <cisstCommon/cmnPortability.h>
#include <cisstOSAbstraction/osaThreadAdapter.h>
#include <cisstOSAbstraction/osaThreadSignal.h>
#include <cisstOSAbstraction/osaExport.h>
#include <pthread.h>

Go to the source code of this file.

Classes

class  osaThreadId
 ThreadId type. More...
 
class  osaThread
 Define a thread object. More...
 

Macros

#define SCHED_FIFO   0 /*! No Scheduling Policy available in Windows */
 

Typedefs

typedef int PriorityType
 PriorityType and SchedulingPolicyType. More...
 
typedef int SchedulingPolicyType
 SchedulingPolicyType. For now SchedulingPolicy is typedef'ed to int. More...
 

Functions

std::ostream & operator<< (std::ostream &output, const osaThreadId &threadId)
 
CISST_EXPORT osaThreadId osaGetCurrentThreadId (void)
 
CISST_EXPORT void osaCurrentThreadYield (void)
 

Detailed Description

Declaration of osaThread.

Macro Definition Documentation

#define SCHED_FIFO   0 /*! No Scheduling Policy available in Windows */

Typedef Documentation

typedef int PriorityType

PriorityType and SchedulingPolicyType.

For now these are just typedefs to integers. I would like to have a common return value for all OS. Maybe an enum, but the problem is that the granularity in any linux flavor is much much larger than windows.

typedef int SchedulingPolicyType

SchedulingPolicyType. For now SchedulingPolicy is typedef'ed to int.

Function Documentation

std::ostream& operator<< ( std::ostream &  output,
const osaThreadId threadId 
)
inline

Stream operator for a thread Id, see osaThreadId.

CISST_EXPORT void osaCurrentThreadYield ( void  )

Yield the current thread. Stops the current thread and takes it at the end of the list of ready threads having its same priority. The scheduler makes the next ready thread of the same priority active.

CISST_EXPORT osaThreadId osaGetCurrentThreadId ( void  )

Get the ID of the currently executing thread.

See Also
osaThreadId