forked from enlightenment/efl
eina thread queue - ensure blocks cannot be freed until lock+unlock
just in case... check blocks cannot be freed until locked and unlocked just in case someone still is holding a lock.
This commit is contained in:
parent
0a243671c7
commit
26db5d5056
|
@ -137,8 +137,12 @@ _eina_thread_queue_msg_block_new(int size)
|
||||||
static void
|
static void
|
||||||
_eina_thread_queue_msg_block_real_free(Eina_Thread_Queue_Msg_Block *blk)
|
_eina_thread_queue_msg_block_real_free(Eina_Thread_Queue_Msg_Block *blk)
|
||||||
{
|
{
|
||||||
|
eina_lock_take(&(blk->lock_non_0_ref));
|
||||||
|
eina_lock_release(&(blk->lock_non_0_ref));
|
||||||
eina_lock_free(&(blk->lock_non_0_ref));
|
eina_lock_free(&(blk->lock_non_0_ref));
|
||||||
#ifndef ATOMIC
|
#ifndef ATOMIC
|
||||||
|
eina_lock_take(&(blk->lock_ref));
|
||||||
|
eina_lock_release(&(blk->lock_ref));
|
||||||
eina_spinlock_free(&(blk->lock_ref));
|
eina_spinlock_free(&(blk->lock_ref));
|
||||||
#endif
|
#endif
|
||||||
free(blk);
|
free(blk);
|
||||||
|
|
Loading…
Reference in New Issue