mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-26 13:52:02 +00:00
Implement a mutex_destroy function.
This commit is contained in:
parent
269a145a70
commit
6bd5139cfc
7
miner.h
7
miner.h
@ -885,6 +885,13 @@ static inline void _mutex_init(pthread_mutex_t *lock, const char *file, const ch
|
|||||||
INITLOCK(lock, CGLOCK_MUTEX, file, func, line);
|
INITLOCK(lock, CGLOCK_MUTEX, file, func, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void mutex_destroy(pthread_mutex_t *lock)
|
||||||
|
{
|
||||||
|
/* Ignore return code. This only invalidates the mutex on linux but
|
||||||
|
* releases resources on windows. */
|
||||||
|
pthread_mutex_destroy(lock);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void _rwlock_init(pthread_rwlock_t *lock, const char *file, const char *func, const int line)
|
static inline void _rwlock_init(pthread_rwlock_t *lock, const char *file, const char *func, const int line)
|
||||||
{
|
{
|
||||||
if (unlikely(pthread_rwlock_init(lock, NULL)))
|
if (unlikely(pthread_rwlock_init(lock, NULL)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user