Skip to content

Commit a980953

Browse files
authored
Merge pull request #1785 from brada4/develop
address #1782 2nd loop
2 parents 78c99d5 + 3439158 commit a980953

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver/others/memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,20 +2587,20 @@ void *blas_memory_alloc(int procpos){
25872587

25882588
position = 0;
25892589

2590+
LOCK_COMMAND(&alloc_lock);
25902591
do {
25912592
/* if (!memory[position].used) { */
2592-
LOCK_COMMAND(&alloc_lock);
25932593
/* blas_lock(&memory[position].lock);*/
25942594

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

2597-
UNLOCK_COMMAND(&alloc_lock);
25982597
/* blas_unlock(&memory[position].lock);*/
25992598
/* } */
26002599

26012600
position ++;
26022601

26032602
} while (position < NUM_BUFFERS);
2603+
UNLOCK_COMMAND(&alloc_lock);
26042604

26052605
goto error;
26062606

0 commit comments

Comments
 (0)