Fix a malloc_mutex dependency in mtx.
This commit is contained in:
parent
dfecadf4b2
commit
a2be4779b1
@ -14,7 +14,7 @@ mtx_init(mtx_t *mtx)
|
|||||||
|
|
||||||
if (pthread_mutexattr_init(&attr) != 0)
|
if (pthread_mutexattr_init(&attr) != 0)
|
||||||
return (true);
|
return (true);
|
||||||
pthread_mutexattr_settype(&attr, MALLOC_MUTEX_TYPE);
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_DEFAULT);
|
||||||
if (pthread_mutex_init(&mtx->lock, &attr) != 0) {
|
if (pthread_mutex_init(&mtx->lock, &attr) != 0) {
|
||||||
pthread_mutexattr_destroy(&attr);
|
pthread_mutexattr_destroy(&attr);
|
||||||
return (true);
|
return (true);
|
||||||
|
Loading…
Reference in New Issue
Block a user