We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 334cd24 commit 9bcffbdCopy full SHA for 9bcffbd
driver/others/blas_server.c
@@ -119,11 +119,11 @@ static void * blas_thread_buffer[MAX_CPU_NUMBER];
119
120
/* Local Variables */
121
#if defined(USE_PTHREAD_LOCK)
122
-static pthread_mutex_t server_lock = PTHREAD_MUTEX_INITIALIZER;
+volatile static pthread_mutex_t server_lock = PTHREAD_MUTEX_INITIALIZER;
123
#elif defined(USE_PTHREAD_SPINLOCK)
124
-static pthread_spinlock_t server_lock = 0;
+volatile static pthread_spinlock_t server_lock = 0;
125
#else
126
-static unsigned long server_lock = 0;
+volatile static unsigned long server_lock = 0;
127
#endif
128
129
#define THREAD_STATUS_SLEEP 2
0 commit comments