| 2461 | |
| 2462 | |
| 2463 | int ISC_mutex_lock_cond(struct mtx* mutex) |
| 2464 | { |
| 2465 | /************************************** |
| 2466 | * |
| 2467 | * I S C _ m u t e x _ l o c k _ c o n d ( W I N _ N T ) |
| 2468 | * |
| 2469 | ************************************** |
| 2470 | * |
| 2471 | * Functional description |
| 2472 | * Conditionally seize a mutex. |
| 2473 | * |
| 2474 | **************************************/ |
| 2475 | |
| 2476 | const DWORD status = (mutex->mtx_fast.lpSharedInfo) ? |
| 2477 | enterFastMutex(&mutex->mtx_fast, 0) : WaitForSingleObject(mutex->mtx_fast.hEvent, 0L); |
| 2478 | |
| 2479 | return (status == WAIT_OBJECT_0 || status == WAIT_ABANDONED) ? FB_SUCCESS : FB_FAILURE; |
| 2480 | } |
| 2481 | |
| 2482 | |
| 2483 | int ISC_mutex_unlock(struct mtx* mutex) |
no test coverage detected