this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Implement Semaphore CarbonCore Stubs

+37 -1
+6 -1
src/frameworks/CoreServices/include/CarbonCore/Multiprocessing.h
··· 14 14 }; 15 15 16 16 typedef void* MPCriticalRegionID; 17 + typedef struct OpaqueMPSemaphoreID *MPSemaphoreID; 18 + typedef ItemCount MPSemaphoreCount; 17 19 18 20 Boolean _MPIsFullyInitialized(); 19 21 OSStatus MPDelayUntil(AbsoluteTime* time); ··· 23 25 OSStatus MPDeleteCriticalRegion(MPCriticalRegionID criticalRegion); 24 26 OSStatus MPEnterCriticalRegion(MPCriticalRegionID criticalRegion, Duration timeout); 25 27 OSStatus MPExitCriticalRegion(MPCriticalRegionID criticalRegion); 26 - 28 + OSStatus MPCreateSemaphore(MPSemaphoreCount maximumValue, MPSemaphoreCount initialValue, MPSemaphoreID *semaphore); 29 + OSStatus MPDeleteSemaphore(MPSemaphoreID semaphore); 30 + OSStatus MPSignalSemaphore(MPSemaphoreID semaphore); 31 + OSStatus MPWaitOnSemaphore(MPSemaphoreID semaphore, Duration timeout); 27 32 // other functions are missing... 28 33 29 34 #ifdef __cplusplus
+31
src/frameworks/CoreServices/src/CarbonCore/Multiprocessing.cpp
··· 21 21 #include <unistd.h> 22 22 #include <ctime> 23 23 #include <pthread.h> 24 + #include <stdio.h> 25 + #include <stdlib.h> 24 26 #include <CarbonCore/MacErrors.h> 27 + 28 + static int verbose = 0; 29 + __attribute__((constructor)) static void initme(void) { 30 + verbose = getenv("STUB_VERBOSE") != NULL; 31 + } 25 32 26 33 Boolean _MPIsFullyInitialized() 27 34 { ··· 109 116 else 110 117 return paramErr; 111 118 } 119 + 120 + OSStatus MPCreateSemaphore(MPSemaphoreCount maximumValue, MPSemaphoreCount initialValue, MPSemaphoreID *semaphore) 121 + { 122 + if (verbose) puts("STUB: MPCreateSemaphore called"); 123 + return noErr; 124 + } 125 + 126 + OSStatus MPDeleteSemaphore(MPSemaphoreID semaphore) 127 + { 128 + if (verbose) puts("STUB: MPDeleteSemaphore called"); 129 + return noErr; 130 + } 131 + 132 + OSStatus MPSignalSemaphore(MPSemaphoreID semaphore) 133 + { 134 + if (verbose) puts("STUB: MPSignalSemaphore called"); 135 + return noErr; 136 + } 137 + 138 + OSStatus MPWaitOnSemaphore(MPSemaphoreID semaphore, Duration timeout) 139 + { 140 + if (verbose) puts("STUB: MPWaitOnSemaphore called"); 141 + return noErr; 142 + }