|
if ( sem_initial_value > 1 ) |
I think this statement has a problem.
If I input semaphore with initial value 0, this statement ignores input value 0 and make it 1
Is there any other intention that I missed?
if not I recommend to fix statement
if (sem_initial_value < 0) >>> if (sem_initial_value <= 0)
osal/src/os/posix/osapi.c
Line 2274 in 75beb86
I think this statement has a problem.
If I input semaphore with initial value 0, this statement ignores input value 0 and make it 1
Is there any other intention that I missed?
if not I recommend to fix statement
if (sem_initial_value < 0) >>> if (sem_initial_value <= 0)