Relocate declaration of alloc_lock outside ifdef block

This commit is contained in:
Martin Kroeker 2017-01-09 01:10:43 +01:00 committed by GitHub
parent 87c7d10b34
commit 51aa157e64
1 changed files with 11 additions and 9 deletions

View File

@ -381,15 +381,6 @@ static int release_pos = 0;
static int hot_alloc = 0;
#endif
#ifdef ALLOC_MMAP
static void alloc_mmap_free(struct release_t *release){
if (munmap(release -> address, BUFFER_SIZE)) {
printf("OpenBLAS : munmap failed\n");
}
}
/* Global lock for memory allocation */
#if defined(USE_PTHREAD_LOCK)
@ -400,6 +391,17 @@ static pthread_spinlock_t alloc_lock = 0;
static BLASULONG alloc_lock = 0UL;
#endif
#ifdef ALLOC_MMAP
static void alloc_mmap_free(struct release_t *release){
if (munmap(release -> address, BUFFER_SIZE)) {
printf("OpenBLAS : munmap failed\n");
}
}
#ifdef NO_WARMUP
static void *alloc_mmap(void *address){