diff --git a/cen64.c b/cen64.c index 51014a42..ca6bda19 100644 --- a/cen64.c +++ b/cen64.c @@ -483,7 +483,7 @@ int run_device(struct cen64_device *device, bool no_video) { } CEN64_THREAD_RETURN_TYPE run_device_thread(void *opaque) { - cen64_thread_setname(NULL, "device"); + cen64_thread_setname((cen64_thread)NULL, "device"); struct cen64_device *device = (struct cen64_device *) opaque; device_run(device); diff --git a/device/device.c b/device/device.c index cd5a046c..c9158466 100644 --- a/device/device.c +++ b/device/device.c @@ -224,7 +224,7 @@ CEN64_THREAD_RETURN_TYPE run_rcp_thread(void *opaque) { } CEN64_THREAD_RETURN_TYPE run_vr4300_thread(void *opaque) { - cen64_thread_setname(NULL, "vr4300"); + cen64_thread_setname((cen64_thread)NULL, "vr4300"); struct cen64_device *device = (struct cen64_device *) opaque; while (likely(device->running)) { @@ -351,4 +351,4 @@ int device_debug_spin(struct cen64_device *device) { cen64_cold void device_connect_debugger(struct cen64_device *device, void* break_handler_data, vr4300_debug_break_handler break_handler) { vr4300_connect_debugger(device->vr4300, break_handler_data, break_handler); -} \ No newline at end of file +} diff --git a/gdb/gdb.c b/gdb/gdb.c index 021784d5..0e8d188d 100644 --- a/gdb/gdb.c +++ b/gdb/gdb.c @@ -79,7 +79,7 @@ bool gdb_parse_packet(const char* input, int len, const char** command_start, co } CEN64_THREAD_RETURN_TYPE gdb_thread(void *opaque) { - cen64_thread_setname(NULL, "gdb"); + cen64_thread_setname((cen64_thread)NULL, "gdb"); struct gdb *gdb = (struct gdb *) opaque; cen64_mutex_lock(&gdb->client_mutex); @@ -257,4 +257,4 @@ cen64_cold void gdb_destroy(struct gdb* gdb) { gdb->device = NULL; free(gdb); -} \ No newline at end of file +} diff --git a/os/posix/thread.h b/os/posix/thread.h index 2a261c65..e8e61449 100644 --- a/os/posix/thread.h +++ b/os/posix/thread.h @@ -45,9 +45,9 @@ static inline int cen64_thread_join(cen64_thread *t) { #ifdef __APPLE__ int pthread_setname_np(const char*); #elif __NETBSD__ -int pthread_setname_np(cen64_thread*, const char*, const char*); +int pthread_setname_np(cen64_thread, const char*, const char*); #else -int pthread_setname_np(cen64_thread*, const char*); +int pthread_setname_np(cen64_thread, const char*); #endif // Sets the name of the thread to a specific value @@ -56,7 +56,7 @@ int pthread_setname_np(cen64_thread*, const char*); // If you call it at the wrong time or your OS doesn't support custom thread names // the return value will be non-zero. // If cen64_thread is not set the name of the current thread will be changed. -static inline int cen64_thread_setname(cen64_thread *t, const char *name) { +static inline int cen64_thread_setname(cen64_thread t, const char *name) { #ifdef __APPLE__ if (t == NULL) return pthread_setname_np(name); diff --git a/os/winapi/thread.h b/os/winapi/thread.h index d7c162a1..128d9354 100644 --- a/os/winapi/thread.h +++ b/os/winapi/thread.h @@ -57,7 +57,7 @@ static inline int cen64_thread_join(cen64_thread *t) { // // Windows isn't supported for the moment. // -static inline int cen64_thread_setname(cen64_thread *t, const char *name) { +static inline int cen64_thread_setname(cen64_thread t, const char *name) { return ENOSYS; }