Revert "Implement Semaphore CarbonCore Stubs"

This reverts commit 882fec3102.
This commit is contained in:
Thomas A. 2024-01-25 19:27:49 -08:00
parent f3b0ae0c35
commit 96cafb015b
2 changed files with 1 additions and 37 deletions

View File

@ -14,8 +14,6 @@ enum {
}; };
typedef void* MPCriticalRegionID; typedef void* MPCriticalRegionID;
typedef struct OpaqueMPSemaphoreID *MPSemaphoreID;
typedef ItemCount MPSemaphoreCount;
Boolean _MPIsFullyInitialized(); Boolean _MPIsFullyInitialized();
OSStatus MPDelayUntil(AbsoluteTime* time); OSStatus MPDelayUntil(AbsoluteTime* time);
@ -25,10 +23,7 @@ OSStatus MPCreateCriticalRegion(MPCriticalRegionID* criticalRegion);
OSStatus MPDeleteCriticalRegion(MPCriticalRegionID criticalRegion); OSStatus MPDeleteCriticalRegion(MPCriticalRegionID criticalRegion);
OSStatus MPEnterCriticalRegion(MPCriticalRegionID criticalRegion, Duration timeout); OSStatus MPEnterCriticalRegion(MPCriticalRegionID criticalRegion, Duration timeout);
OSStatus MPExitCriticalRegion(MPCriticalRegionID criticalRegion); OSStatus MPExitCriticalRegion(MPCriticalRegionID criticalRegion);
OSStatus MPCreateSemaphore(MPSemaphoreCount maximumValue, MPSemaphoreCount initialValue, MPSemaphoreID *semaphore);
OSStatus MPDeleteSemaphore(MPSemaphoreID semaphore);
OSStatus MPSignalSemaphore(MPSemaphoreID semaphore);
OSStatus MPWaitOnSemaphore(MPSemaphoreID semaphore, Duration timeout);
// other functions are missing... // other functions are missing...
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -21,15 +21,8 @@ along with Darling. If not, see <http://www.gnu.org/licenses/>.
#include <unistd.h> #include <unistd.h>
#include <ctime> #include <ctime>
#include <pthread.h> #include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <CarbonCore/MacErrors.h> #include <CarbonCore/MacErrors.h>
static int verbose = 0;
__attribute__((constructor)) static void initme(void) {
verbose = getenv("STUB_VERBOSE") != NULL;
}
Boolean _MPIsFullyInitialized() Boolean _MPIsFullyInitialized()
{ {
return true; return true;
@ -116,27 +109,3 @@ OSStatus MPExitCriticalRegion(MPCriticalRegionID criticalRegion)
else else
return paramErr; return paramErr;
} }
OSStatus MPCreateSemaphore(MPSemaphoreCount maximumValue, MPSemaphoreCount initialValue, MPSemaphoreID *semaphore)
{
if (verbose) puts("STUB: MPCreateSemaphore called");
return noErr;
}
OSStatus MPDeleteSemaphore(MPSemaphoreID semaphore)
{
if (verbose) puts("STUB: MPDeleteSemaphore called");
return noErr;
}
OSStatus MPSignalSemaphore(MPSemaphoreID semaphore)
{
if (verbose) puts("STUB: MPSignalSemaphore called");
return noErr;
}
OSStatus MPWaitOnSemaphore(MPSemaphoreID semaphore, Duration timeout)
{
if (verbose) puts("STUB: MPWaitOnSemaphore called");
return noErr;
}