ports: Add libxshfence port
This commit is contained in:
22
ports/libxshmfence/patches/0002-implement-futex.patch
Normal file
22
ports/libxshmfence/patches/0002-implement-futex.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
diff -ruN libxshmfence-1.3.3/src/xshmfence_futex.h libxshmfence-1.3.3-banan_os/src/xshmfence_futex.h
|
||||
--- libxshmfence-1.3.3/src/xshmfence_futex.h 2024-12-14 04:05:01.000000000 +0200
|
||||
+++ libxshmfence-1.3.3-banan_os/src/xshmfence_futex.h 2026-07-05 09:37:56.106400833 +0300
|
||||
@@ -45,6 +45,18 @@
|
||||
return sys_futex(addr, UMTX_OP_WAIT_UINT, value);
|
||||
}
|
||||
|
||||
+#elif defined(__banan_os__)
|
||||
+
|
||||
+#include <sys/futex.h>
|
||||
+
|
||||
+static inline int futex_wake(int32_t *addr) {
|
||||
+ return futex(FUTEX_WAKE, (const uint32_t*)addr, INT_MAX, nullptr);
|
||||
+}
|
||||
+
|
||||
+static inline int futex_wait(int32_t *addr, int32_t value) {
|
||||
+ return futex(FUTEX_WAIT, (const uint32_t*)addr, value, nullptr);
|
||||
+}
|
||||
+
|
||||
#else
|
||||
|
||||
#include <stdint.h>
|
||||
Reference in New Issue
Block a user