static Eina_List *_ecore_pending_job_threads = NULL;
static Eina_List *_ecore_pending_job_threads_feedback = NULL;
static LK(_ecore_pending_job_threads_mutex);
+static LK(_ecore_running_job_mutex);
static Eina_Hash *_ecore_thread_global_hash = NULL;
static LRWK(_ecore_thread_global_hash_lock);
work = eina_list_data_get(_ecore_pending_job_threads);
_ecore_pending_job_threads = eina_list_remove_list(_ecore_pending_job_threads,
_ecore_pending_job_threads);
- _ecore_running_job = eina_list_append(_ecore_running_job, work);
LKU(_ecore_pending_job_threads_mutex);
+
+ LKL(_ecore_running_job_mutex);
+ _ecore_running_job = eina_list_append(_ecore_running_job, work);
+ LKU(_ecore_running_job_mutex);
LKL(work->cancel_mutex);
cancel = work->cancel;
if (!cancel)
work->u.short_run.func_blocking((void *) work->data, (Ecore_Thread*) work);
- LKL(_ecore_pending_job_threads_mutex);
+ LKL(_ecore_running_job_mutex);
_ecore_running_job = eina_list_remove(_ecore_running_job, work);
- LKU(_ecore_pending_job_threads_mutex);
+ LKU(_ecore_running_job_mutex);
if (work->reschedule)
{
work = eina_list_data_get(_ecore_pending_job_threads_feedback);
_ecore_pending_job_threads_feedback = eina_list_remove_list(_ecore_pending_job_threads_feedback,
_ecore_pending_job_threads_feedback);
- _ecore_running_job = eina_list_append(_ecore_running_job, work);
LKU(_ecore_pending_job_threads_mutex);
+ LKL(_ecore_running_job_mutex);
+ _ecore_running_job = eina_list_append(_ecore_running_job, work);
+ LKU(_ecore_running_job_mutex);
LKL(work->cancel_mutex);
cancel = work->cancel;
if (!cancel)
work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work);
- LKL(_ecore_pending_job_threads_mutex);
+ LKL(_ecore_running_job_mutex);
_ecore_running_job = eina_list_remove(_ecore_running_job, work);
- LKU(_ecore_pending_job_threads_mutex);
+ LKU(_ecore_running_job_mutex);
if (work->reschedule)
{
LKI(_ecore_pending_job_threads_mutex);
LRWKI(_ecore_thread_global_hash_lock);
LKI(_ecore_thread_global_hash_mutex);
+ LKI(_ecore_running_job_mutex);
CDI(_ecore_thread_global_hash_cond, _ecore_thread_global_hash_mutex);
#endif
}
free(work);
}
+ LKU(_ecore_pending_job_threads_mutex);
+ LKL(_ecore_running_job_mutex);
+
EINA_LIST_FOREACH(_ecore_running_job, l, work)
ecore_thread_cancel((Ecore_Thread*) work);
- LKU(_ecore_pending_job_threads_mutex);
+ LKU(_ecore_running_job_mutex);
do
{
LKD(_ecore_pending_job_threads_mutex);
LRWKD(_ecore_thread_global_hash_lock);
LKD(_ecore_thread_global_hash_mutex);
+ LKD(_ecore_running_job_mutex);
CDD(_ecore_thread_global_hash_cond);
#endif
}