Skip to content

Commit

Permalink
Convert another caller of "allocation" to LOCK_COMMAND
Browse files Browse the repository at this point in the history
... as the "allocation" code jumped to now does UNLOCK_COMMAND instead of blas_unlock
  • Loading branch information
martin-frbg authored Sep 9, 2017
1 parent f460776 commit ba1f91f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions driver/others/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,12 +1056,13 @@ void *blas_memory_alloc(int procpos){

do {
if (!memory[position].used && (memory[position].pos == mypos)) {

blas_lock(&memory[position].lock);
LOCK_COMMAND(&alloc_lock);
/* blas_lock(&memory[position].lock);*/

if (!memory[position].used) goto allocation;

blas_unlock(&memory[position].lock);
UNLOCK_COMMAND(&alloc_lock);
/* blas_unlock(&memory[position].lock);*/
}

position ++;
Expand Down

0 comments on commit ba1f91f

Please sign in to comment.