Changeset 2299 for trunk/src/emx/include
- Timestamp:
- Aug 22, 2005, 3:56:25 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/backend.h
-
Property cvs2svn:cvs-rev
changed from
1.31
to1.32
r2298 r2299 967 967 * @{ */ 968 968 969 /** 969 /** 970 970 * Safe Mutex Semaphore structure. 971 971 * 972 * For shared semaphores this structure must be in shared memory so all users 972 * For shared semaphores this structure must be in shared memory so all users 973 973 * actually use the very same structure. 974 974 */ … … 977 977 #ifdef __OS2__ 978 978 /** Mutex handle. */ 979 unsigned long hmtx; 980 #endif 979 unsigned long hmtx; 980 #endif 981 /** Set if the semaphore is shared. */ 982 unsigned fShared; 981 983 } __LIBC_SAFESEMMTX; 982 984 /** Pointer to a SAFESEM Mutex structure. */ … … 1030 1032 1031 1033 1032 /** 1034 /** 1033 1035 * Safe Event Semaphore structure. 1034 1036 * 1035 * For shared semaphores this structure must be in shared memory so all users 1037 * For shared semaphores this structure must be in shared memory so all users 1036 1038 * actually use the very same structure. 1037 1039 * 1038 * @remark The event semaphore business is difficult because the lack of 1039 * atomic mutex release + event wait apis in OS/2. We have to 1040 * @remark The event semaphore business is difficult because the lack of 1041 * atomic mutex release + event wait apis in OS/2. We have to 1040 1042 * jump around the place to get this working nearly safly... 1041 1043 */ … … 1045 1047 /** The event semaphore. */ 1046 1048 unsigned long hev; 1047 #endif 1049 #endif 1048 1050 /** Number of threads which are supposed to be blocking on the above event semaphore. */ 1049 1051 uint32_t volatile cWaiters; 1050 1052 /** The mutex semaphore used to protect the event semaphore. */ 1051 1053 __LIBC_PSAFESEMMTX pmtx; 1052 /** Set if the semaphore is shared. 1053 * If shared this structure is allocated from SPM, else it's from the heap. */ 1054 /** Set if the semaphore is shared. */ 1054 1055 unsigned fShared; 1055 1056 } __LIBC_SAFESEMEV; … … 1071 1072 * Opens a shared safe event sem. 1072 1073 * 1073 * The caller is responsible for opening the associated mutex 1074 * The caller is responsible for opening the associated mutex 1074 1075 * semaphore before calling this function. 1075 1076 * … … 1092 1093 * Sleep on a semaphore. 1093 1094 * 1094 * The caller must own the associated mutex semaphore. The mutex semaphore will 1095 * be released as we go to sleep and reclaimed when we wake up. 1096 * 1097 * The pfnComplete callback is used to correct state before signals are handled. 1095 * The caller must own the associated mutex semaphore. The mutex semaphore will 1096 * be released as we go to sleep and reclaimed when we wake up. 1097 * 1098 * The pfnComplete callback is used to correct state before signals are handled. 1098 1099 * It will always be called be for this function returns, and it'll either be under 1099 1100 * the protection of the signal mutex or the associated mutex (both safe sems). 1100 1101 * 1101 * This is the most difficult thing we're doing in this API. On OS/2 we have 1102 * This is the most difficult thing we're doing in this API. On OS/2 we have 1102 1103 * potential (at least theoretically) race conditions... 1103 1104 * -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.