Implemented DosCloseMutexSem().
This gets PhysicsFS's test_physfs.exe to run (although it's still broken in other ways).
This commit is contained in:
1 parent
4e6452445e
commit
ceb7900db7
2 files changed
+19
No files matched your search
@@ -258,6 +258,7 @@ LX_NATIVE_MODULE_INIT({ if (!initDoscalls()) return NULL; })
|
||||
LX_NATIVE_EXPORT(DosWaitEventSem, 329),
|
||||
LX_NATIVE_EXPORT(DosQueryEventSem, 330),
|
||||
LX_NATIVE_EXPORT(DosCreateMutexSem, 331),
|
||||
LX_NATIVE_EXPORT(DosCloseMutexSem, 333),
|
||||
LX_NATIVE_EXPORT(DosRequestMutexSem, 334),
|
||||
LX_NATIVE_EXPORT(DosReleaseMutexSem, 335),
|
||||
LX_NATIVE_EXPORT(DosSubSetMem, 344),
|
||||
@@ -2995,5 +2996,22 @@ static APIRET16 bridge16to32_DosSemSet(uint8 *args)
|
||||
return DosSemSet(sem);
|
||||
} // bridge16to32_DosSemSet
|
||||
|
||||
|
||||
APIRET DosCloseMutexSem(HMTX hmtx)
|
||||
{
|
||||
TRACE_NATIVE("DosCloseMutexSem(%u)", (uint) hmtx);
|
||||
|
||||
if (hmtx) {
|
||||
pthread_mutex_t *mutex = (pthread_mutex_t *) hmtx;
|
||||
const int rc = pthread_mutex_destroy(mutex);
|
||||
if (rc == 0)
|
||||
return NO_ERROR;
|
||||
else if (rc == EBUSY)
|
||||
return ERROR_SEM_BUSY;
|
||||
}
|
||||
|
||||
return ERROR_INVALID_HANDLE;
|
||||
} // DosCloseMutexSem
|
||||
|
||||
// end of doscalls.c ...
|
||||
|
||||
@@ -446,6 +446,7 @@ APIRET OS2API DosQueryExtLIBPATH(PSZ pszExtLIBPATH, ULONG flags);
|
||||
APIRET OS2API DosSetMaxFH(ULONG cFH);
|
||||
APIRET OS2API DosQueryThreadContext(TID tid, ULONG level, PCONTEXTRECORD pcxt);
|
||||
ULONG OS2API DosSelToFlat(VOID);
|
||||
APIRET OS2API DosCloseMutexSem(HMTX hmtx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user