From a86ca2478990abb6e70a6abc611aefe7f6f8e5d3 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Mon, 9 Jan 2023 23:01:32 +0900 Subject: [PATCH] semaphore: hide ERROR_TOO_MANY_POSTS and ERROR_ALREADY_POSTED errors They are not real errors because they means posted. modified: thread/semaphore.c --- thread/semaphore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/thread/semaphore.c b/thread/semaphore.c index 9c6d50f..34ea8d6 100644 --- a/thread/semaphore.c +++ b/thread/semaphore.c @@ -143,6 +143,8 @@ int os2compat_sem_post( os2compat_sem_t *sem ) sem->count++; rc = DosPostEventSem(sem->hev); + if( rc == ERROR_TOO_MANY_POSTS || rc == ERROR_ALREADY_POSTED ) + rc = NO_ERROR; } DosReleaseMutexSem(sem->hmtxCount);