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.
2 parents 7ae24d0 + 9bcffbd commit 2c0dd24Copy full SHA for 2c0dd24
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