Skip to content

Commit

Permalink
upload missing code on prev commit
Browse files Browse the repository at this point in the history
Completing eb51d54
  • Loading branch information
bogdan-iancu committed Sep 6, 2022
1 parent eb51d54 commit 59e3f02
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions mem/shm_mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,39 @@ inline static void shm_info(struct mem_info* mi)
shm_unlock();
}


inline static void shm_force_unlock(void)
{
if (0
#if defined F_MALLOC || defined Q_MALLOC
|| mem_lock
#endif
#ifdef HP_MALLOC
|| mem_locks
#endif
) {
#if defined HP_MALLOC && (defined F_MALLOC || defined Q_MALLOC)
if (mem_allocator_shm == MM_HP_MALLOC ||
mem_allocator_shm == MM_HP_MALLOC_DBG) {
int i;

for (i = 0; i < HP_HASH_SIZE; i++)
lock_release(&mem_locks[i]);
} else {
shm_unlock();
}
#elif defined HP_MALLOC
int i;

for (i = 0; i < HP_HASH_SIZE; i++)
lock_release(&mem_locks[i]);
#else
shm_unlock();
#endif
}
}


/*
* performs a full shared memory pool scan for any corruptions or inconsistencies
*/
Expand Down

0 comments on commit 59e3f02

Please sign in to comment.