| 35 | } |
| 36 | |
| 37 | locker::~locker(void) |
| 38 | { |
| 39 | if (pFile_) { |
| 40 | acl_myfree(pFile_); |
| 41 | } |
| 42 | if (myFHandle_ && fHandle_ != ACL_FILE_INVALID) { |
| 43 | acl_file_close(fHandle_); |
| 44 | } |
| 45 | if (mutex_) { |
| 46 | #ifndef ACL_WINDOWS |
| 47 | (void) pthread_mutexattr_destroy(&mutex_attr_); |
| 48 | #endif |
| 49 | (void) acl_pthread_mutex_destroy(mutex_); |
| 50 | acl_myfree(mutex_); |
| 51 | } |
| 52 | #ifdef HAS_SPINLOCK |
| 53 | if (spinlock_) { |
| 54 | pthread_spin_destroy(spinlock_); |
| 55 | acl_myfree_fn((void*) spinlock_); |
| 56 | } |
| 57 | #endif |
| 58 | } |
| 59 | |
| 60 | void locker::init_mutex(bool use_spinlock acl_unused) |
| 61 | { |
nothing calls this directly
no test coverage detected