*/}}
Browse Source

Linux fixes.

YimingWu 9 months ago
parent
commit
b9b36d42fe
2 changed files with 4 additions and 3 deletions
  1. 2 2
      la_util.c
  2. 2 1
      la_util.h

+ 2 - 2
la_util.c

@@ -2213,10 +2213,10 @@ void laSpinUnlock(SYSLOCK* lock) {
 #endif
 #ifdef __linux__
 void laSpinInit(SYSLOCK* lock) {
-    laSpinInit(lock);
+    pthread_spin_init(lock, 0);
 }
 void laSpinDestroy(SYSLOCK* lock) {
-    laSpinDestroy(lock);
+    pthread_spin_destroy(lock);
 }
 void laSpinLock(SYSLOCK* lock) {
     pthread_spin_lock(lock);

+ 2 - 1
la_util.h

@@ -41,7 +41,7 @@
 #define SYSTEMDC DC
 #define SYSTEMRC RC
 #define SYSTEMDISPLAY Display
-#define SYSLOCK SYSLOCK
+#define SYSLOCK pthread_spinlock_t
 #endif
 #ifdef _WIN32
 #include <Windows.h>
@@ -56,6 +56,7 @@
 #endif
 
 
+
 #define NEED_STRUCTURE(a) \
 typedef struct _##a a;