Skip to content

Commit d4b74ea

Browse files
committed
ref: move shmem lock init
Signed-off-by: Jose Martins <[email protected]>
1 parent b90e2c3 commit d4b74ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/shmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ static void shmem_alloc(void)
1313
{
1414
for (size_t i = 0; i < shmem_table_size; i++) {
1515
struct shmem* shmem = &shmem_table[i];
16-
shmem->lock = SPINLOCK_INITVAL;
1716
if (!shmem->place_phys) {
1817
size_t n_pg = NUM_PAGES(shmem->size);
1918
struct ppages ppages = mem_alloc_ppages(shmem->colors, n_pg, false);
@@ -42,6 +41,7 @@ void shmem_init()
4241
shmem_alloc();
4342

4443
for (size_t i = 0; i < config.shmemlist_size; i++) {
44+
config.shmemlist[i].lock = SPINLOCK_INITVAL;
4545
config.shmemlist[i].cpu_masters = 0;
4646
}
4747
}

0 commit comments

Comments
 (0)