Changeset 619 for trunk/libs/libsemaphore
- Timestamp:
- Feb 12, 2019, 1:15:47 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libs/libsemaphore/semaphore.h
r573 r619 27 27 ////////////////////////////////////////////////////////////////////////////////////////////// 28 28 // POSIX unnamed semaphores related functions 29 // 30 // This synchonisation object allows several thread in a given process to share one 31 // (or several) shared resource(s). 32 // - The sem_wait() function allows a thread to take one resource and atomically 33 // decrement the semaphore count. If the count value is zero, the calling thread 34 // blocks and deschedules. It is unblocked by another thread when it becomes possible 35 // to make the decrement. 36 // - the sem_post() functions allows a thread to release a resource and atomicalli 37 // increment the semaphore count. 29 38 ////////////////////////////////////////////////////////////////////////////////////////////// 30 39 … … 37 46 * @ sem : [in] pointer on semaphore. 38 47 * @ pshared : [in] unsupported => must be zero. 39 * @ value: [in] initial semaphore value.48 * @ count : [in] initial semaphore value. 40 49 * @ return 0 if success / return -1 if failure. 41 50 ********************************************************************************************/ 42 51 int sem_init( sem_t * sem, 43 52 int pshared, 44 unsigned int value);53 unsigned int count ); 45 54 46 55 /*********************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.