Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

semaphores.h

Go to the documentation of this file.
00001 
00011 /* {{{ Initial headers */
00012 /*
00013  * $LastChangedDate: 2003-11-27 01:55:17 +0100 (Thu, 27 Nov 2003) $
00014  * $LastChangedRevision: 5 $
00015  * $LastChangedBy: ckruse $
00016  *
00017  */
00018 /* }}} */
00019 
00020 #ifndef _CF_SEMAPHORE_H
00021 #define _CF_SEMAPHORE_H
00022 
00023 #ifdef _SEM_SEMUN_UNDEFINED
00024 union semun {
00025   int val;
00026   struct semid_ds *buf;
00027   unsigned short int *array;
00028   struct seminfo *__buf;
00029 };
00030 #endif
00031 
00035 #define CF_SEM_LOCK(id,sem) (cf_sem_pv(id,-1,sem))
00036 
00040 #define CF_SEM_DOWN(id,sem) (cf_sem_pv(id,-1,sem))
00041 
00045 #define CF_SEM_UNLOCK(id,sem) (cf_sem_pv(id,1,sem))
00046 
00050 #define CF_SEM_UP(id,sem)     (cf_sem_pv(id,1,sem))
00051 
00055 #define CF_SEM_WAITZERO(id,sem) (cf_sem_pv(id,0,sem))
00056 
00064 int cf_sem_pv(int id,int operation,int semnum);
00065 
00074 int cf_sem_getval(int id,int semnum,int num,unsigned short *val);
00075 
00076 #endif
00077 
00078 /* eof */

Generated on Sun Apr 25 16:37:39 2004 for Classic Forum by doxygen 1.3.5