parent
54cca7bbf0
commit
81b3cddb13
|
@ -536,7 +536,6 @@ _ecore_pipe_read(void *data,
|
||||||
else if ((ret == PIPE_FD_ERROR) &&
|
else if ((ret == PIPE_FD_ERROR) &&
|
||||||
((errno == EINTR) || (errno == EAGAIN)))
|
((errno == EINTR) || (errno == EAGAIN)))
|
||||||
{
|
{
|
||||||
_ecore_pipe_unhandle(p);
|
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -544,7 +543,6 @@ _ecore_pipe_read(void *data,
|
||||||
ERR("An unhandled error (ret: %i errno: %i [%s])"
|
ERR("An unhandled error (ret: %i errno: %i [%s])"
|
||||||
"occurred while reading from the pipe the length",
|
"occurred while reading from the pipe the length",
|
||||||
(int)ret, errno, strerror(errno));
|
(int)ret, errno, strerror(errno));
|
||||||
_ecore_pipe_unhandle(p);
|
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -545,7 +545,7 @@ _ecore_thread_kill(Ecore_Pthread_Worker *work)
|
||||||
LKD(work->mutex);
|
LKD(work->mutex);
|
||||||
if (work->hash)
|
if (work->hash)
|
||||||
eina_hash_free(work->hash);
|
eina_hash_free(work->hash);
|
||||||
free(work);
|
_ecore_thread_worker_free(work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -595,7 +595,8 @@ _ecore_notify_handler(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_short_job(Ecore_Pipe *end_pipe)
|
_ecore_short_job(Ecore_Pipe *end_pipe,
|
||||||
|
PH(thread))
|
||||||
{
|
{
|
||||||
Ecore_Pthread_Worker *work;
|
Ecore_Pthread_Worker *work;
|
||||||
|
|
||||||
|
@ -615,6 +616,7 @@ _ecore_short_job(Ecore_Pipe *end_pipe)
|
||||||
|
|
||||||
LKU(_ecore_pending_job_threads_mutex);
|
LKU(_ecore_pending_job_threads_mutex);
|
||||||
|
|
||||||
|
work->self = thread;
|
||||||
if (!work->cancel)
|
if (!work->cancel)
|
||||||
work->u.short_run.func_blocking((void *)work->data, (Ecore_Thread *)work);
|
work->u.short_run.func_blocking((void *)work->data, (Ecore_Thread *)work);
|
||||||
|
|
||||||
|
@ -738,7 +740,7 @@ _ecore_thread_worker(Ecore_Pthread_Data *pth)
|
||||||
eina_sched_prio_drop();
|
eina_sched_prio_drop();
|
||||||
|
|
||||||
restart:
|
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);
|
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. */
|
/* FIXME: Check if there is feedback running task todo, and switch to feedback run handler. */
|
||||||
|
@ -928,6 +930,7 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking,
|
||||||
work->kill = EINA_FALSE;
|
work->kill = EINA_FALSE;
|
||||||
work->reschedule = EINA_FALSE;
|
work->reschedule = EINA_FALSE;
|
||||||
work->data = data;
|
work->data = data;
|
||||||
|
work->self = 0;
|
||||||
|
|
||||||
#ifdef EFL_HAVE_THREADS
|
#ifdef EFL_HAVE_THREADS
|
||||||
work->hash = NULL;
|
work->hash = NULL;
|
||||||
|
@ -1115,6 +1118,7 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
|
||||||
worker->feedback_run = EINA_TRUE;
|
worker->feedback_run = EINA_TRUE;
|
||||||
worker->kill = EINA_FALSE;
|
worker->kill = EINA_FALSE;
|
||||||
worker->reschedule = EINA_FALSE;
|
worker->reschedule = EINA_FALSE;
|
||||||
|
worker->self = 0;
|
||||||
|
|
||||||
worker->u.feedback_run.send = 0;
|
worker->u.feedback_run.send = 0;
|
||||||
worker->u.feedback_run.received = 0;
|
worker->u.feedback_run.received = 0;
|
||||||
|
|
Loading…
Reference in New Issue