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