Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Implement Semaphore CarbonCore Stubs" #1482

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ enum {
};

typedef void* MPCriticalRegionID;
typedef struct OpaqueMPSemaphoreID *MPSemaphoreID;
typedef ItemCount MPSemaphoreCount;

Boolean _MPIsFullyInitialized();
OSStatus MPDelayUntil(AbsoluteTime* time);
Expand All @@ -25,10 +23,7 @@ OSStatus MPCreateCriticalRegion(MPCriticalRegionID* criticalRegion);
OSStatus MPDeleteCriticalRegion(MPCriticalRegionID criticalRegion);
OSStatus MPEnterCriticalRegion(MPCriticalRegionID criticalRegion, Duration timeout);
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...

#ifdef __cplusplus
Expand Down
31 changes: 0 additions & 31 deletions src/frameworks/CoreServices/src/CarbonCore/Multiprocessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,8 @@ along with Darling. If not, see <http://www.gnu.org/licenses/>.
#include <unistd.h>
#include <ctime>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <CarbonCore/MacErrors.h>

static int verbose = 0;
__attribute__((constructor)) static void initme(void) {
verbose = getenv("STUB_VERBOSE") != NULL;
}

Boolean _MPIsFullyInitialized()
{
return true;
Expand Down Expand Up @@ -116,27 +109,3 @@ OSStatus MPExitCriticalRegion(MPCriticalRegionID criticalRegion)
else
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;
}