Browse Source

Remove attribute parameter for `pthread_mutex_init`

gingerBill 4 years ago
parent
commit
740995df3d
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/common.cpp

+ 1 - 3
src/common.cpp

@@ -50,11 +50,9 @@
 #else
 	struct BlockingMutex {
 		pthread_mutex_t pthread_mutex;
-		pthread_mutexattr_t pthread_mutexattr;
 	};
 	void mutex_init(BlockingMutex *m) {
-		pthread_mutexattr_init(&m->pthread_mutexattr);
-		pthread_mutex_init(&m->pthread_mutex, &m->pthread_mutexattr);
+		pthread_mutex_init(&m->pthread_mutex, nullptr);
 	}
 	void mutex_destroy(BlockingMutex *m) {
 		pthread_mutex_destroy(&m->pthread_mutex);