From 414b24d9af79679640b842e4fa6aa89f2e5395c7 Mon Sep 17 00:00:00 2001 From: Josh Kunz Date: Tue, 17 Nov 2015 23:56:51 -0700 Subject: [PATCH] Send valid pshared arg to pthread_spin_init Currently sending 0 which is neither PTHREAD_PROCESS_PRIVATE or PTHREAD_PROCESS_SHARED, the two values mentioned in the man page. --- src/user/cptr_cache_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/cptr_cache_user.c b/src/user/cptr_cache_user.c index 5a5910c..5b7553c 100644 --- a/src/user/cptr_cache_user.c +++ b/src/user/cptr_cache_user.c @@ -50,7 +50,7 @@ void __cptr_init() __spinlocks = calloc(__cache_lines, sizeof(*__spinlocks)); for (i = 0; i < __cache_lines; ++i) { - pthread_spin_init(&__spinlocks[i], 0); + pthread_spin_init(&__spinlocks[i], PTHREAD_PROCESS_PRIVATE); } return; -- GitLab