Fix linux mutexes to be recursive; tombstone the old unix code
parent
cf961d4b3a
commit
a510ae5dce
|
@ -554,7 +554,10 @@ internal System_Mutex
|
|||
system_mutex_make(void){
|
||||
System_Mutex result = {};
|
||||
Linux_Object* object = linux_alloc_object(LinuxObjectKind_Mutex);
|
||||
pthread_mutex_init(&object->mutex, NULL);
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init(&object->mutex, &attr);
|
||||
*(Linux_Object**)&result = object;
|
||||
//LINUX_FN_DEBUG("%p", object);
|
||||
return result;
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
// TOP
|
||||
|
||||
#error IS THIS STILL REAL? (February 27th 2020)
|
||||
|
||||
#if !defined(FD_CHECK)
|
||||
#define FD_CHECK()
|
||||
#endif
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
// TOP
|
||||
|
||||
#error IS THIS STILL REAL? (February 27th 2020)
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
// TOP
|
||||
|
||||
#error IS THIS STILL REAL? (February 27th 2020)
|
||||
|
||||
union Library{
|
||||
void *lib;
|
||||
FixSize(LIBRARY_TYPE_SIZE);
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
// TOP
|
||||
|
||||
#error IS THIS STILL REAL? (February 27th 2020)
|
||||
|
||||
#if !defined(MAC_THREADING_WRAPPER)
|
||||
#define MAC_THREADING_WRAPPER
|
||||
|
||||
|
|
Loading…
Reference in New Issue