check some really unlikely alloc errors and semaphore deadlock errors
and report if that has happened. just in case.
else
{
if (errno != EINTR)
- break;
+ {
+ if (errno == EDEADLK)
+ EINA_LOCK_DEADLOCK_DEBUG(sem_wait, sem);
+ break;
+ }
}
}
return ok;
blk = malloc(sizeof(Eina_Thread_Queue_Msg_Block) -
sizeof(Eina_Thread_Queue_Msg) +
size);
- if (!blk) return NULL;
+ if (!blk)
+ {
+ ERR("Thread queue block buffer of size %i allocation failed", size);
+ return NULL;
+ }
blk->next = NULL;
#ifndef ATOMIC
eina_spinlock_new(&(blk->lock_ref));
Eina_Thread_Queue *thq;
thq = calloc(1, sizeof(Eina_Thread_Queue));
- if (!thq) return NULL;
+ if (!thq)
+ {
+ ERR("Allocation of Thread queue structure failed");
+ return NULL;
+ }
thq->fd = -1;
if (!eina_semaphore_new(&(thq->sem), 0))
{