Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

phSemaphore.h File Reference

#include <phStandard.h>
#include <phStdint.h>
#include <phMutex.h>

Go to the source code of this file.

Classes

class  phSemaphore
 This class implements a thread safe portable semaphore class. It extend the normal interface of a semaphore with the phSemaphore::postWaiting and phSemaphore::postMax methods. This semaphore object will keep track of the number of waiting threads at any instance in time to allow them to all be 'woken up' if necessary to permit the proper shutdown or cleanup of a thread or series of threads. Being able to post the maximum number of semaphores possible without any of the threads returning until all the semaphores are posted can be useful in synchronization. Otherwise, the semaphores can be posted one at a time. More...

Defines

#define phSemaphoreNOFLAG   (0)
#define phSemaphoreNOWAIT   (1<<0)
#define phSemaphoreWAIT   (1<<1)
#define phSemNOFLAG   phSemaphoreNOFLAG
#define phSemNOWAIT   phSemaphoreNOWAIT
#define phSemWAIT   phSemaphoreWAIT
#define phSemaphoreNOTAKE   1
#define phSemaphoreTAKEN   phSUCCESS
#define SEM_VALUE_MAX   2147483647
#define phSemVALUEMAX   SEM_VALUE_MAX

Typedefs

typedef ph_semaphore_info_tph_semaphore_info




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo


Generated on Sat Jun 16 02:44:13 2007 for phission by  doxygen 1.4.4