Commit 414b24d9 authored by Josh Kunz's avatar Josh Kunz

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.
parent 7bc0f494
Pipeline #141 passed with stage
...@@ -50,7 +50,7 @@ void __cptr_init() ...@@ -50,7 +50,7 @@ void __cptr_init()
__spinlocks = calloc(__cache_lines, sizeof(*__spinlocks)); __spinlocks = calloc(__cache_lines, sizeof(*__spinlocks));
for (i = 0; i < __cache_lines; ++i) { for (i = 0; i < __cache_lines; ++i) {
pthread_spin_init(&__spinlocks[i], 0); pthread_spin_init(&__spinlocks[i], PTHREAD_PROCESS_PRIVATE);
} }
return; return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment