about summary refs log tree commit diff stats
path: root/src/include/box64context.h
diff options
context:
space:
mode:
authorAlexandre Julliard <julliard@winehq.org>2023-06-24 18:20:24 +0200
committerGitHub <noreply@github.com>2023-06-24 18:20:24 +0200
commit770cba7e2b46d3bbd0ce309dbc253f7a4517087a (patch)
treeb32abe8503710fba68ef11964f1226e9ac4bb96f /src/include/box64context.h
parent8aa98d3f53600ce978a2a4a41d51f394ef312fd8 (diff)
downloadbox64-770cba7e2b46d3bbd0ce309dbc253f7a4517087a.tar.gz
box64-770cba7e2b46d3bbd0ce309dbc253f7a4517087a.zip
A few cosmetic fixes (#858)
* [DYNAREC] Don't include pthread.h in C files.

It's already included from box64context.h.

Since there's no pthread.h on Win32, including it only once avoids
having to add ifdefs everywhere.

* [DYNAREC] Remove some duplicate definitions of the GETG helper macros.

* Declare void functions with an explicit void.

To avoid 'function declaration is not a prototype' warnings when using
-Wstrict-prototypes.

* Avoid including bridge_private.h in files that don't need it.

* Avoid defining ZYDIS_RUNTIME_ADDRESS_NONE.

It's not used, and conflicts with the original Zydis headers.
Diffstat (limited to 'src/include/box64context.h')
-rwxr-xr-xsrc/include/box64context.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/box64context.h b/src/include/box64context.h
index 954d93cb..5b2c5a63 100755
--- a/src/include/box64context.h
+++ b/src/include/box64context.h
@@ -217,7 +217,7 @@ typedef struct box64context_s {
 #define mutex_trylock(A)    pthread_mutex_trylock(A)
 #define mutex_unlock(A)     pthread_mutex_unlock(A)
 #else
-int GetTID();
+int GetTID(void);
 #define mutex_lock(A)       {uint32_t tid = (uint32_t)GetTID(); while(native_lock_storeifnull_d(A, tid)) sched_yield();}
 #define mutex_trylock(A)    native_lock_storeifnull_d(A, (uint32_t)GetTID())
 #define mutex_unlock(A)     native_lock_storeifref_d(A, 0, (uint32_t)GetTID())
@@ -243,10 +243,10 @@ int AddTLSPartition(box64context_t* context, int tlssize);
 
 // defined in fact in threads.c
 void thread_set_emu(x64emu_t* emu);
-x64emu_t* thread_get_emu();
+x64emu_t* thread_get_emu(void);
 
 // unlock mutex that are locked by current thread (for signal handling). Return a mask of unlock mutex
-int unlockMutex();
+int unlockMutex(void);
 // relock the muxtex that were unlocked
 void relockMutex(int locks);