Browse Source

Declare the server_lock mutex volatile in addition to static

pull/5350/head
Martin Kroeker GitHub 3 months ago
parent
commit
9bcffbd655
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      driver/others/blas_server.c

+ 3
- 3
driver/others/blas_server.c View File

@@ -119,11 +119,11 @@ static void * blas_thread_buffer[MAX_CPU_NUMBER];

/* Local Variables */
#if defined(USE_PTHREAD_LOCK)
static pthread_mutex_t server_lock = PTHREAD_MUTEX_INITIALIZER;
volatile static pthread_mutex_t server_lock = PTHREAD_MUTEX_INITIALIZER;
#elif defined(USE_PTHREAD_SPINLOCK)
static pthread_spinlock_t server_lock = 0;
volatile static pthread_spinlock_t server_lock = 0;
#else
static unsigned long server_lock = 0;
volatile static unsigned long server_lock = 0;
#endif

#define THREAD_STATUS_SLEEP 2


Loading…
Cancel
Save