MCPcopy Create free account
hub / github.com/acl-dev/acl / ~locker

Method ~locker

lib_acl_cpp/src/stdlib/locker.cpp:37–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37locker::~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
60void locker::init_mutex(bool use_spinlock acl_unused)
61{

Callers

nothing calls this directly

Calls 2

acl_file_closeFunction · 0.85

Tested by

no test coverage detected