| 449 | #endif |
| 450 | |
| 451 | LOCK lock_create() |
| 452 | { |
| 453 | LOCKINTERNAL *lock = (LOCKINTERNAL*)mem_alloc(sizeof(LOCKINTERNAL), 4); |
| 454 | |
| 455 | #if defined(CONF_FAMILY_UNIX) |
| 456 | pthread_mutex_init(lock, 0x0); |
| 457 | #elif defined(CONF_FAMILY_WINDOWS) |
| 458 | InitializeCriticalSection((LPCRITICAL_SECTION)lock); |
| 459 | #else |
| 460 | #error not implemented on this platform |
| 461 | #endif |
| 462 | return (LOCK)lock; |
| 463 | } |
| 464 | |
| 465 | void lock_destroy(LOCK lock) |
| 466 | { |
nothing calls this directly
no outgoing calls
no test coverage detected