mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Remove attribute parameter for pthread_mutex_init
This commit is contained in:
+1
-3
@@ -50,11 +50,9 @@
|
|||||||
#else
|
#else
|
||||||
struct BlockingMutex {
|
struct BlockingMutex {
|
||||||
pthread_mutex_t pthread_mutex;
|
pthread_mutex_t pthread_mutex;
|
||||||
pthread_mutexattr_t pthread_mutexattr;
|
|
||||||
};
|
};
|
||||||
void mutex_init(BlockingMutex *m) {
|
void mutex_init(BlockingMutex *m) {
|
||||||
pthread_mutexattr_init(&m->pthread_mutexattr);
|
pthread_mutex_init(&m->pthread_mutex, nullptr);
|
||||||
pthread_mutex_init(&m->pthread_mutex, &m->pthread_mutexattr);
|
|
||||||
}
|
}
|
||||||
void mutex_destroy(BlockingMutex *m) {
|
void mutex_destroy(BlockingMutex *m) {
|
||||||
pthread_mutex_destroy(&m->pthread_mutex);
|
pthread_mutex_destroy(&m->pthread_mutex);
|
||||||
|
|||||||
Reference in New Issue
Block a user