about summary refs log tree commit diff stats
path: root/src/libtools/threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtools/threads.c')
-rwxr-xr-xsrc/libtools/threads.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/libtools/threads.c b/src/libtools/threads.c
index b2ab3b5d..054451ff 100755
--- a/src/libtools/threads.c
+++ b/src/libtools/threads.c
@@ -681,27 +681,27 @@ EXPORT void my__pthread_cleanup_pop(x64emu_t* emu, void* buffer, int exec)
 	_pthread_cleanup_pop(buffer, exec);
 }
 
-//EXPORT int my_pthread_getaffinity_np(x64emu_t* emu, pthread_t thread, int cpusetsize, void* cpuset)
-//{
-//	(void)emu;
-//	int ret = pthread_getaffinity_np(thread, cpusetsize, cpuset);
-//	if(ret<0) {
-//		printf_log(LOG_INFO, "Warning, pthread_getaffinity_np(%p, %d, %p) errored, with errno=%d\n", (void*)thread, cpusetsize, cpuset, errno);
-//	}
-//
-//    return ret;
-//}
+EXPORT int my_pthread_getaffinity_np(x64emu_t* emu, pthread_t thread, size_t cpusetsize, void* cpuset)
+{
+	(void)emu;
+	int ret = pthread_getaffinity_np(thread, cpusetsize, cpuset);
+	if(ret<0) {
+		printf_log(LOG_INFO, "Warning, pthread_getaffinity_np(%p, %zd, %p) errored, with errno=%d\n", (void*)thread, cpusetsize, cpuset, errno);
+	}
 
-//EXPORT int my_pthread_setaffinity_np(x64emu_t* emu, pthread_t thread, int cpusetsize, void* cpuset)
-//{
-//	(void)emu;
-//	int ret = pthread_setaffinity_np(thread, cpusetsize, cpuset);
-//	if(ret<0) {
-//		printf_log(LOG_INFO, "Warning, pthread_setaffinity_np(%p, %d, %p) errored, with errno=%d\n", (void*)thread, cpusetsize, cpuset, errno);
-//	}
-//
-//    return ret;
-//}
+    return ret;
+}
+
+EXPORT int my_pthread_setaffinity_np(x64emu_t* emu, pthread_t thread, size_t cpusetsize, void* cpuset)
+{
+	(void)emu;
+	int ret = pthread_setaffinity_np(thread, cpusetsize, cpuset);
+	if(ret<0) {
+		printf_log(LOG_INFO, "Warning, pthread_setaffinity_np(%p, %zd, %p) errored, with errno=%d\n", (void*)thread, cpusetsize, cpuset, errno);
+	}
+
+    return ret;
+}
 
 //EXPORT int my_pthread_attr_setaffinity_np(x64emu_t* emu, void* attr, uint32_t cpusetsize, void* cpuset)
 //{