else if ((ret == PIPE_FD_ERROR) &&
((errno == EINTR) || (errno == EAGAIN)))
{
- _ecore_pipe_unhandle(p);
return ECORE_CALLBACK_RENEW;
}
else
ERR("An unhandled error (ret: %i errno: %i [%s])"
"occurred while reading from the pipe the length",
(int)ret, errno, strerror(errno));
- _ecore_pipe_unhandle(p);
return ECORE_CALLBACK_RENEW;
}
#else
LKD(work->mutex);
if (work->hash)
eina_hash_free(work->hash);
- free(work);
+ _ecore_thread_worker_free(work);
}
static void
}
static void
-_ecore_short_job(Ecore_Pipe *end_pipe)
+_ecore_short_job(Ecore_Pipe *end_pipe,
+ PH(thread))
{
Ecore_Pthread_Worker *work;
LKU(_ecore_pending_job_threads_mutex);
+ work->self = thread;
if (!work->cancel)
work->u.short_run.func_blocking((void *)work->data, (Ecore_Thread *)work);
eina_sched_prio_drop();
restart:
- if (_ecore_pending_job_threads) _ecore_short_job(pth->p);
+ if (_ecore_pending_job_threads) _ecore_short_job(pth->p, pth->thread);
if (_ecore_pending_job_threads_feedback) _ecore_feedback_job(pth->p, pth->thread);
/* FIXME: Check if there is feedback running task todo, and switch to feedback run handler. */
work->kill = EINA_FALSE;
work->reschedule = EINA_FALSE;
work->data = data;
+ work->self = 0;
#ifdef EFL_HAVE_THREADS
work->hash = NULL;
worker->feedback_run = EINA_TRUE;
worker->kill = EINA_FALSE;
worker->reschedule = EINA_FALSE;
+ worker->self = 0;
worker->u.feedback_run.send = 0;
worker->u.feedback_run.received = 0;