| 2440 | |
| 2441 | |
| 2442 | int ISC_mutex_lock(struct mtx* mutex) |
| 2443 | { |
| 2444 | /************************************** |
| 2445 | * |
| 2446 | * I S C _ m u t e x _ l o c k ( W I N _ N T ) |
| 2447 | * |
| 2448 | ************************************** |
| 2449 | * |
| 2450 | * Functional description |
| 2451 | * Seize a mutex. |
| 2452 | * |
| 2453 | **************************************/ |
| 2454 | |
| 2455 | const DWORD status = (mutex->mtx_fast.lpSharedInfo) ? |
| 2456 | enterFastMutex(&mutex->mtx_fast, INFINITE) : |
| 2457 | WaitForSingleObject(mutex->mtx_fast.hEvent, INFINITE); |
| 2458 | |
| 2459 | return (status == WAIT_OBJECT_0 || status == WAIT_ABANDONED) ? FB_SUCCESS : FB_FAILURE; |
| 2460 | } |
| 2461 | |
| 2462 | |
| 2463 | int ISC_mutex_lock_cond(struct mtx* mutex) |
no test coverage detected