Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

poslib/server/posthreads.h File Reference

threading functions More...

Go to the source code of this file.


Functions

void  pos_setquitflag ()
void  pos_resetquitflag ()
bool  pos_quitting ()
void  posthread_create (pthread_t *tr, void *(*start)(void *), void *arg)
  create thread

void  posthreads_finish ()

Variables

pthread_cond_t  c_pos_shutdown

Detailed Description

threading functions

This source file contains functions for the Posadis threading system, based on pthreads.

Definition in file posthreads.h.


Function Documentation

bool pos_quitting  ) 
 

Can be called by threads to check whether they should close down.

void pos_resetquitflag  ) 
 

Resets the quit flag

void pos_setquitflag  ) 
 

Notifies running threads that they should close down.

void posthread_create pthread_t *  tr,
void *(*  start)(void *),
void *  arg
 

create thread

Creates a new thread using the Poslib threading mechnism.

Warning:
Do not use pthread_join on this thread! The poslib threading mechanism might, when the thread function closes down, assign the thread to another task. Use a condition instead.
Parameters:
tr  The thread ID is stored here
start  Function the thread should execute
arg  Argument for function

void posthreads_finish  ) 
 

Closes down the threading mechanism.


Variable Documentation

pthread_cond_t c_pos_shutdown
 

Broadcast when Posadis shuts down.

Definition at line 58 of file posthreads.h.


Generated on Fri Dec 24 19:55:15 2004 for Poslib by doxygen 1.3.7