about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-11-10 15:05:39 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-11-10 15:05:39 +0100
commitc2680fd0a73cb46aadad438d3377738d257ddaa2 (patch)
treeaa782109d49a3de5a375feee213183b9d5b8b697 /src/main.c
parent85c74c6bf8e361108423da996ee62a53ffeb01d1 (diff)
downloadbox64-c2680fd0a73cb46aadad438d3377738d257ddaa2.tar.gz
box64-c2680fd0a73cb46aadad438d3377738d257ddaa2.zip
Added BOX64_FUTEX_WAITV, on by default expect for BAD_SIGNAL build
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index a44f5940..022b92df 100644
--- a/src/main.c
+++ b/src/main.c
@@ -138,6 +138,11 @@ int box64_novulkan = 0;
 int box64_showsegv = 0;
 int box64_showbt = 0;
 int box64_isglibc234 = 0;
+#ifdef BAD_SIGNAL
+int box64_futex_waitv = 0;
+#else
+int box64_futex_waitv = 1;
+#endif
 char* box64_libGL = NULL;
 char* box64_custom_gstreamer = NULL;
 uintptr_t fmod_smc_start = 0;
@@ -899,6 +904,20 @@ void LoadLogEnv()
         if(box64_novulkan)
             printf_log(LOG_INFO, "Disable the use of wrapped vulkan libs\n");
     }
+    p = getenv("BOX64_FUTEX_WAITV");
+    if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='0'+1)
+                box64_futex_waitv = p[0]-'0';
+        }
+        #ifdef BAD_SIGNAL
+        if(box64_futex_waitv)
+            printf_log(LOG_INFO, "Enable the use of futex waitv syscall (if available on the system\n");
+        #else
+        if(!box64_futex_waitv)
+            printf_log(LOG_INFO, "Disable the use of futex waitv syscall\n");
+        #endif
+    }
     p = getenv("BOX64_FIX_64BIT_INODES");
     if(p) {
         if(strlen(p)==1) {