summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--legacy/ecore/src/lib/ecore/Ecore.h20
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_thread.c63
-rw-r--r--legacy/eio/src/lib/eio_dir.c12
-rw-r--r--legacy/eio/src/lib/eio_file.c30
-rw-r--r--legacy/eio/src/lib/eio_private.h12
-rw-r--r--legacy/eio/src/lib/eio_single.c40
6 files changed, 90 insertions, 87 deletions
diff --git a/legacy/ecore/src/lib/ecore/Ecore.h b/legacy/ecore/src/lib/ecore/Ecore.h
index c96babd945..d39e71fb31 100644
--- a/legacy/ecore/src/lib/ecore/Ecore.h
+++ b/legacy/ecore/src/lib/ecore/Ecore.h
@@ -205,15 +205,15 @@ extern "C" {
205 */ 205 */
206 typedef Eina_Bool (*Ecore_Event_Handler_Cb) (void *data, int type, void *event); 206 typedef Eina_Bool (*Ecore_Event_Handler_Cb) (void *data, int type, void *event);
207 /** 207 /**
208 * @typedef Ecore_Thread_Heavy_Cb Ecore_Thread_Heavy_Cb 208 * @typedef Ecore_Thread_Cb Ecore_Thread_Cb
209 * A callback used to run cpu intensive or blocking I/O operations. 209 * A callback used by Ecore_Thread helper.
210 */ 210 */
211 typedef void (*Ecore_Thread_Heavy_Cb) (Ecore_Thread *thread, void *data); 211 typedef void (*Ecore_Thread_Cb) (void *data, Ecore_Thread *thread);
212 /** 212 /**
213 * @typedef Ecore_Thread_Notify_Cb Ecore_Thread_Notify_Cb 213 * @typedef Ecore_Thread_Notify_Cb Ecore_Thread_Notify_Cb
214 * A callback used by the main loop to receive data sent by an @ref Ecore_Thread_Group. 214 * A callback used by the main loop to receive data sent by an @ref Ecore_Thread_Group.
215 */ 215 */
216 typedef void (*Ecore_Thread_Notify_Cb) (Ecore_Thread *thread, void *msg_data, void *data); 216 typedef void (*Ecore_Thread_Notify_Cb) (void *data, Ecore_Thread *thread, void *msg_data);
217 /** 217 /**
218 * @typedef Ecore_Task_Cb Ecore_Task_Cb 218 * @typedef Ecore_Task_Cb Ecore_Task_Cb
219 * A callback run for a task (timer, idler, poller, animater, etc) 219 * A callback run for a task (timer, idler, poller, animater, etc)
@@ -482,14 +482,14 @@ extern "C" {
482 * @{ 482 * @{
483 */ 483 */
484 484
485 EAPI Ecore_Thread *ecore_thread_run(Ecore_Thread_Heavy_Cb func_blocking, 485 EAPI Ecore_Thread *ecore_thread_run(Ecore_Thread_Cb func_blocking,
486 Ecore_Cb func_end, 486 Ecore_Thread_Cb func_end,
487 Ecore_Cb func_cancel, 487 Ecore_Thread_Cb func_cancel,
488 const void *data); 488 const void *data);
489 EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Heavy_Cb func_heavy, 489 EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
490 Ecore_Thread_Notify_Cb func_notify, 490 Ecore_Thread_Notify_Cb func_notify,
491 Ecore_Cb func_end, 491 Ecore_Thread_Cb func_end,
492 Ecore_Cb func_cancel, 492 Ecore_Thread_Cb func_cancel,
493 const void *data, 493 const void *data,
494 Eina_Bool try_no_queue); 494 Eina_Bool try_no_queue);
495 EAPI Eina_Bool ecore_thread_cancel(Ecore_Thread *thread); 495 EAPI Eina_Bool ecore_thread_cancel(Ecore_Thread *thread);
diff --git a/legacy/ecore/src/lib/ecore/ecore_thread.c b/legacy/ecore/src/lib/ecore/ecore_thread.c
index 6793d17790..6981c4d314 100644
--- a/legacy/ecore/src/lib/ecore/ecore_thread.c
+++ b/legacy/ecore/src/lib/ecore/ecore_thread.c
@@ -35,10 +35,10 @@ struct _Ecore_Pthread_Worker
35{ 35{
36 union { 36 union {
37 struct { 37 struct {
38 Ecore_Thread_Heavy_Cb func_blocking; 38 Ecore_Thread_Cb func_blocking;
39 } short_run; 39 } short_run;
40 struct { 40 struct {
41 Ecore_Thread_Heavy_Cb func_heavy; 41 Ecore_Thread_Cb func_heavy;
42 Ecore_Thread_Notify_Cb func_notify; 42 Ecore_Thread_Notify_Cb func_notify;
43 Ecore_Pipe *notify; 43 Ecore_Pipe *notify;
44 44
@@ -47,8 +47,8 @@ struct _Ecore_Pthread_Worker
47 } feedback_run; 47 } feedback_run;
48 } u; 48 } u;
49 49
50 Ecore_Cb func_cancel; 50 Ecore_Thread_Cb func_cancel;
51 Ecore_Cb func_end; 51 Ecore_Thread_Cb func_end;
52#ifdef EFL_HAVE_PTHREAD 52#ifdef EFL_HAVE_PTHREAD
53 pthread_t self; 53 pthread_t self;
54 Eina_Hash *hash; 54 Eina_Hash *hash;
@@ -119,7 +119,7 @@ _ecore_thread_pipe_del(void *data __UNUSED__, int type __UNUSED__, void *event _
119} 119}
120 120
121static void 121static void
122_ecore_thread_end(Ecore_Pthread_Data *pth) 122_ecore_thread_end(Ecore_Pthread_Data *pth, __UNUSED__ Ecore_Thread *work)
123{ 123{
124 Ecore_Pipe *p; 124 Ecore_Pipe *p;
125 125
@@ -138,12 +138,12 @@ _ecore_thread_kill(Ecore_Pthread_Worker *work)
138 if (work->cancel) 138 if (work->cancel)
139 { 139 {
140 if (work->func_cancel) 140 if (work->func_cancel)
141 work->func_cancel((void *) work->data); 141 work->func_cancel((void *) work->data, (Ecore_Thread *) work);
142 } 142 }
143 else 143 else
144 { 144 {
145 if (work->func_end) 145 if (work->func_end)
146 work->func_end((void *) work->data); 146 work->func_end((void *) work->data, (Ecore_Thread *) work);
147 } 147 }
148 148
149 if (work->feedback_run) 149 if (work->feedback_run)
@@ -188,7 +188,7 @@ _ecore_notify_handler(void *data, void *buffer, unsigned int nbyte)
188 work->u.feedback_run.received++; 188 work->u.feedback_run.received++;
189 189
190 if (work->u.feedback_run.func_notify) 190 if (work->u.feedback_run.func_notify)
191 work->u.feedback_run.func_notify((Ecore_Thread *) work, user_data, (void *) work->data); 191 work->u.feedback_run.func_notify((void *) work->data, (Ecore_Thread *) work, user_data);
192 192
193 /* Force reading all notify event before killing the thread */ 193 /* Force reading all notify event before killing the thread */
194 if (work->kill && work->u.feedback_run.send == work->u.feedback_run.received) 194 if (work->kill && work->u.feedback_run.send == work->u.feedback_run.received)
@@ -219,7 +219,7 @@ _ecore_short_job(Ecore_Pipe *end_pipe)
219 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex); 219 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex);
220 220
221 if (!work->cancel) 221 if (!work->cancel)
222 work->u.short_run.func_blocking((Ecore_Thread*) work, (void *) work->data); 222 work->u.short_run.func_blocking((void *) work->data, (Ecore_Thread*) work);
223 223
224 ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *)); 224 ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
225 } 225 }
@@ -248,7 +248,7 @@ _ecore_feedback_job(Ecore_Pipe *end_pipe, pthread_t thread)
248 248
249 work->self = thread; 249 work->self = thread;
250 if (!work->cancel) 250 if (!work->cancel)
251 work->u.feedback_run.func_heavy((Ecore_Thread *) work, (void *) work->data); 251 work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work);
252 252
253 ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *)); 253 ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
254 } 254 }
@@ -275,7 +275,7 @@ _ecore_direct_worker(Ecore_Pthread_Worker *work)
275 pth->thread = pthread_self(); 275 pth->thread = pthread_self();
276 276
277 work->self = pth->thread; 277 work->self = pth->thread;
278 work->u.feedback_run.func_heavy((Ecore_Thread *) work, (void *) work->data); 278 work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work);
279 279
280 ecore_pipe_write(pth->p, &work, sizeof (Ecore_Pthread_Worker *)); 280 ecore_pipe_write(pth->p, &work, sizeof (Ecore_Pthread_Worker *));
281 281
@@ -401,14 +401,14 @@ _ecore_thread_shutdown(void)
401 EINA_LIST_FREE(_ecore_pending_job_threads, work) 401 EINA_LIST_FREE(_ecore_pending_job_threads, work)
402 { 402 {
403 if (work->func_cancel) 403 if (work->func_cancel)
404 work->func_cancel((void *)work->data); 404 work->func_cancel((void *)work->data, (Ecore_Thread *) work);
405 free(work); 405 free(work);
406 } 406 }
407 407
408 EINA_LIST_FREE(_ecore_pending_job_threads_feedback, work) 408 EINA_LIST_FREE(_ecore_pending_job_threads_feedback, work)
409 { 409 {
410 if (work->func_cancel) 410 if (work->func_cancel)
411 work->func_cancel((void *)work->data); 411 work->func_cancel((void *)work->data, (Ecore_Thread *) work);
412 free(work); 412 free(work);
413 } 413 }
414 414
@@ -466,9 +466,9 @@ _ecore_thread_shutdown(void)
466 * host CPU can handle. 466 * host CPU can handle.
467 */ 467 */
468EAPI Ecore_Thread * 468EAPI Ecore_Thread *
469ecore_thread_run(Ecore_Thread_Heavy_Cb func_blocking, 469ecore_thread_run(Ecore_Thread_Cb func_blocking,
470 Ecore_Cb func_end, 470 Ecore_Thread_Cb func_end,
471 Ecore_Cb func_cancel, 471 Ecore_Thread_Cb func_cancel,
472 const void *data) 472 const void *data)
473{ 473{
474 Ecore_Pthread_Worker *work; 474 Ecore_Pthread_Worker *work;
@@ -482,7 +482,7 @@ ecore_thread_run(Ecore_Thread_Heavy_Cb func_blocking,
482 if (!work) 482 if (!work)
483 { 483 {
484 if (func_cancel) 484 if (func_cancel)
485 func_cancel((void *) data); 485 func_cancel((void *) data, NULL);
486 return NULL; 486 return NULL;
487 } 487 }
488 488
@@ -539,7 +539,7 @@ ecore_thread_run(Ecore_Thread_Heavy_Cb func_blocking,
539 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex); 539 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex);
540 540
541 if (work->func_cancel) 541 if (work->func_cancel)
542 work->func_cancel((void *) work->data); 542 work->func_cancel((void *) work->data, (Ecore_Thread *) work);
543 free(work); 543 free(work);
544 work = NULL; 544 work = NULL;
545 } 545 }
@@ -549,8 +549,11 @@ ecore_thread_run(Ecore_Thread_Heavy_Cb func_blocking,
549 If no thread and as we don't want to break app that rely on this 549 If no thread and as we don't want to break app that rely on this
550 facility, we will lock the interface until we are done. 550 facility, we will lock the interface until we are done.
551 */ 551 */
552 func_blocking((Ecore_Thread *) work, (void *)data); 552 func_blocking((void *)data, (Ecore_Thread *) work);
553 func_end((void *)data); 553 if (work->cancel == EINA_FALSE) func_end((void *)data, (Ecore_Thread *) work);
554 else func_end((void *)data, (Ecore_Thread *) work);
555
556 free(work);
554 557
555 return NULL; 558 return NULL;
556#endif 559#endif
@@ -608,7 +611,7 @@ ecore_thread_cancel(Ecore_Thread *thread)
608 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex); 611 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex);
609 612
610 if (work->func_cancel) 613 if (work->func_cancel)
611 work->func_cancel((void *) work->data); 614 work->func_cancel((void *) work->data, (Ecore_Thread *) work);
612 free(work); 615 free(work);
613 616
614 return EINA_TRUE; 617 return EINA_TRUE;
@@ -624,7 +627,7 @@ ecore_thread_cancel(Ecore_Thread *thread)
624 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex); 627 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex);
625 628
626 if (work->func_cancel) 629 if (work->func_cancel)
627 work->func_cancel((void *) work->data); 630 work->func_cancel((void *) work->data, (Ecore_Thread *) work);
628 free(work); 631 free(work);
629 632
630 return EINA_TRUE; 633 return EINA_TRUE;
@@ -688,10 +691,10 @@ ecore_thread_check(Ecore_Thread *thread)
688 * the CPU down, so be careful with that. Of course if it can't start a new thread, it will 691 * the CPU down, so be careful with that. Of course if it can't start a new thread, it will
689 * try to use one from the pool. 692 * try to use one from the pool.
690 */ 693 */
691EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Heavy_Cb func_heavy, 694EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
692 Ecore_Thread_Notify_Cb func_notify, 695 Ecore_Thread_Notify_Cb func_notify,
693 Ecore_Cb func_end, 696 Ecore_Thread_Cb func_end,
694 Ecore_Cb func_cancel, 697 Ecore_Thread_Cb func_cancel,
695 const void *data, 698 const void *data,
696 Eina_Bool try_no_queue) 699 Eina_Bool try_no_queue)
697{ 700{
@@ -768,7 +771,7 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Heavy_Cb func_heavy,
768 worker); 771 worker);
769 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex); 772 pthread_mutex_unlock(&_ecore_pending_job_threads_mutex);
770 773
771 if (func_cancel) func_cancel((void *) data); 774 if (func_cancel) func_cancel((void *) data, NULL);
772 775
773 if (worker) 776 if (worker)
774 { 777 {
@@ -800,10 +803,10 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Heavy_Cb func_heavy,
800 worker.feedback_run = EINA_TRUE; 803 worker.feedback_run = EINA_TRUE;
801 worker.kill = EINA_FALSE; 804 worker.kill = EINA_FALSE;
802 805
803 func_heavy((Ecore_Thread *) &worker, (void *)data); 806 func_heavy((void *)data, (Ecore_Thread *) &worker);
804 807
805 if (worker.func_cancel) func_cancel((void *)data); 808 if (worker.cancel) func_cancel((void *)data, (Ecore_Thread *) &worker);
806 else func_end((void *)data); 809 else func_end((void *)data, (Ecore_Thread *) &worker);
807 810
808 return NULL; 811 return NULL;
809#endif 812#endif
@@ -837,7 +840,7 @@ ecore_thread_feedback(Ecore_Thread *thread, const void *data)
837 840
838 return EINA_TRUE; 841 return EINA_TRUE;
839#else 842#else
840 worker->u.feedback_run.func_notify(thread, (void*) data, (void*) worker->data); 843 worker->u.feedback_run.func_notify((void*) worker->data, thread, (void*) data);
841 844
842 return EINA_TRUE; 845 return EINA_TRUE;
843#endif 846#endif
diff --git a/legacy/eio/src/lib/eio_dir.c b/legacy/eio/src/lib/eio_dir.c
index 288c628c5e..2d0a238bd6 100644
--- a/legacy/eio/src/lib/eio_dir.c
+++ b/legacy/eio/src/lib/eio_dir.c
@@ -389,7 +389,7 @@ _eio_dir_chmod(Ecore_Thread *thread, Eio_Dir_Copy *order,
389} 389}
390 390
391static void 391static void
392_eio_dir_copy_heavy(Ecore_Thread *thread, void *data) 392_eio_dir_copy_heavy(void *data, Ecore_Thread *thread)
393{ 393{
394 Eio_Dir_Copy *copy = data; 394 Eio_Dir_Copy *copy = data;
395 const char *file = NULL; 395 const char *file = NULL;
@@ -475,7 +475,7 @@ _eio_dir_copy_heavy(Ecore_Thread *thread, void *data)
475} 475}
476 476
477static void 477static void
478_eio_dir_copy_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *data) 478_eio_dir_copy_notify(void *data, Ecore_Thread *thread __UNUSED__, void *msg_data)
479{ 479{
480 Eio_Dir_Copy *copy = data; 480 Eio_Dir_Copy *copy = data;
481 Eio_Progress *progress = msg_data; 481 Eio_Progress *progress = msg_data;
@@ -492,7 +492,7 @@ _eio_dir_copy_free(Eio_Dir_Copy *copy)
492} 492}
493 493
494static void 494static void
495_eio_dir_copy_end(void *data) 495_eio_dir_copy_end(void *data, Ecore_Thread *thread __UNUSED__)
496{ 496{
497 Eio_Dir_Copy *copy = data; 497 Eio_Dir_Copy *copy = data;
498 498
@@ -502,7 +502,7 @@ _eio_dir_copy_end(void *data)
502} 502}
503 503
504static void 504static void
505_eio_dir_copy_error(void *data) 505_eio_dir_copy_error(void *data, Ecore_Thread *thread __UNUSED__)
506{ 506{
507 Eio_Dir_Copy *copy = data; 507 Eio_Dir_Copy *copy = data;
508 508
@@ -512,7 +512,7 @@ _eio_dir_copy_error(void *data)
512} 512}
513 513
514static void 514static void
515_eio_dir_move_heavy(Ecore_Thread *thread, void *data) 515_eio_dir_move_heavy(void *data, Ecore_Thread *thread)
516{ 516{
517 Eio_Dir_Copy *move = data; 517 Eio_Dir_Copy *move = data;
518 const char *file = NULL; 518 const char *file = NULL;
@@ -622,7 +622,7 @@ _eio_dir_move_heavy(Ecore_Thread *thread, void *data)
622} 622}
623 623
624static void 624static void
625_eio_dir_rmrf_heavy(Ecore_Thread *thread, void *data) 625_eio_dir_rmrf_heavy(void *data, Ecore_Thread *thread)
626{ 626{
627 Eio_Dir_Copy *rmrf = data; 627 Eio_Dir_Copy *rmrf = data;
628 const char *file = NULL; 628 const char *file = NULL;
diff --git a/legacy/eio/src/lib/eio_file.c b/legacy/eio/src/lib/eio_file.c
index d00d536ed0..d1f02ba626 100644
--- a/legacy/eio/src/lib/eio_file.c
+++ b/legacy/eio/src/lib/eio_file.c
@@ -114,7 +114,7 @@
114 */ 114 */
115 115
116static void 116static void
117_eio_file_heavy(Ecore_Thread *thread, void *data) 117_eio_file_heavy(void *data, Ecore_Thread *thread)
118{ 118{
119 Eio_File_Char_Ls *async = data; 119 Eio_File_Char_Ls *async = data;
120 Eina_Iterator *ls; 120 Eina_Iterator *ls;
@@ -147,7 +147,7 @@ _eio_file_heavy(Ecore_Thread *thread, void *data)
147} 147}
148 148
149static void 149static void
150_eio_file_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *data) 150_eio_file_notify(void *data, Ecore_Thread *thread __UNUSED__, void *msg_data)
151{ 151{
152 Eio_File_Char_Ls *async = data; 152 Eio_File_Char_Ls *async = data;
153 const char *file = msg_data; 153 const char *file = msg_data;
@@ -197,7 +197,7 @@ _eio_file_eina_ls_heavy(Ecore_Thread *thread, Eio_File_Direct_Ls *async, Eina_It
197} 197}
198 198
199static void 199static void
200_eio_file_direct_heavy(Ecore_Thread *thread, void *data) 200_eio_file_direct_heavy(void *data, Ecore_Thread *thread)
201{ 201{
202 Eio_File_Direct_Ls *async = data; 202 Eio_File_Direct_Ls *async = data;
203 Eina_Iterator *ls; 203 Eina_Iterator *ls;
@@ -208,7 +208,7 @@ _eio_file_direct_heavy(Ecore_Thread *thread, void *data)
208} 208}
209 209
210static void 210static void
211_eio_file_stat_heavy(Ecore_Thread *thread, void *data) 211_eio_file_stat_heavy(void *data, Ecore_Thread *thread)
212{ 212{
213 Eio_File_Direct_Ls *async = data; 213 Eio_File_Direct_Ls *async = data;
214 Eina_Iterator *ls; 214 Eina_Iterator *ls;
@@ -219,7 +219,7 @@ _eio_file_stat_heavy(Ecore_Thread *thread, void *data)
219} 219}
220 220
221static void 221static void
222_eio_file_direct_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *data) 222_eio_file_direct_notify(void *data, Ecore_Thread *thread __UNUSED__, void *msg_data)
223{ 223{
224 Eio_File_Direct_Ls *async = data; 224 Eio_File_Direct_Ls *async = data;
225 Eina_File_Direct_Info *info = msg_data; 225 Eina_File_Direct_Info *info = msg_data;
@@ -230,7 +230,7 @@ _eio_file_direct_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *d
230} 230}
231 231
232static void 232static void
233_eio_file_end(void *data) 233_eio_file_end(void *data, Ecore_Thread *thread __UNUSED__)
234{ 234{
235 Eio_File_Ls *async = data; 235 Eio_File_Ls *async = data;
236 236
@@ -241,7 +241,7 @@ _eio_file_end(void *data)
241} 241}
242 242
243static void 243static void
244_eio_file_error(void *data) 244_eio_file_error(void *data, Ecore_Thread *thread __UNUSED__)
245{ 245{
246 Eio_File_Ls *async = data; 246 Eio_File_Ls *async = data;
247 247
@@ -356,7 +356,7 @@ _eio_file_copy_splice(Ecore_Thread *thread, Eio_File_Progress *op, int in, int o
356#endif 356#endif
357 357
358static void 358static void
359_eio_file_copy_heavy(Ecore_Thread *thread, void *data) 359_eio_file_copy_heavy(void *data, Ecore_Thread *thread)
360{ 360{
361 Eio_File_Progress *copy = data; 361 Eio_File_Progress *copy = data;
362 362
@@ -364,7 +364,7 @@ _eio_file_copy_heavy(Ecore_Thread *thread, void *data)
364} 364}
365 365
366static void 366static void
367_eio_file_copy_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *data) 367_eio_file_copy_notify(void *data, Ecore_Thread *thread __UNUSED__, void *msg_data)
368{ 368{
369 Eio_File_Progress *copy = data; 369 Eio_File_Progress *copy = data;
370 370
@@ -380,7 +380,7 @@ _eio_file_copy_free(Eio_File_Progress *copy)
380} 380}
381 381
382static void 382static void
383_eio_file_copy_end(void *data) 383_eio_file_copy_end(void *data, Ecore_Thread *thread __UNUSED__)
384{ 384{
385 Eio_File_Progress *copy = data; 385 Eio_File_Progress *copy = data;
386 386
@@ -390,7 +390,7 @@ _eio_file_copy_end(void *data)
390} 390}
391 391
392static void 392static void
393_eio_file_copy_error(void *data) 393_eio_file_copy_error(void *data, Ecore_Thread *thread __UNUSED__)
394{ 394{
395 Eio_File_Progress *copy = data; 395 Eio_File_Progress *copy = data;
396 396
@@ -463,7 +463,7 @@ _eio_file_move_copy_error(void *data, int error)
463} 463}
464 464
465static void 465static void
466_eio_file_move_heavy(Ecore_Thread *thread, void *data) 466_eio_file_move_heavy(void *data, Ecore_Thread *thread)
467{ 467{
468 Eio_File_Move *move = data; 468 Eio_File_Move *move = data;
469 469
@@ -474,7 +474,7 @@ _eio_file_move_heavy(Ecore_Thread *thread, void *data)
474} 474}
475 475
476static void 476static void
477_eio_file_move_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *data) 477_eio_file_move_notify(void *data, Ecore_Thread *thread __UNUSED__, void *msg_data)
478{ 478{
479 Eio_File_Move *move = data; 479 Eio_File_Move *move = data;
480 480
@@ -482,7 +482,7 @@ _eio_file_move_notify(Ecore_Thread *thread __UNUSED__, void *msg_data, void *dat
482} 482}
483 483
484static void 484static void
485_eio_file_move_end(void *data) 485_eio_file_move_end(void *data, Ecore_Thread *thread __UNUSED__)
486{ 486{
487 Eio_File_Move *move = data; 487 Eio_File_Move *move = data;
488 488
@@ -492,7 +492,7 @@ _eio_file_move_end(void *data)
492} 492}
493 493
494static void 494static void
495_eio_file_move_error(void *data) 495_eio_file_move_error(void *data, Ecore_Thread *thread __UNUSED__)
496{ 496{
497 Eio_File_Move *move = data; 497 Eio_File_Move *move = data;
498 498
diff --git a/legacy/eio/src/lib/eio_private.h b/legacy/eio/src/lib/eio_private.h
index 038a4a2f0c..3d0b8fac9e 100644
--- a/legacy/eio/src/lib/eio_private.h
+++ b/legacy/eio/src/lib/eio_private.h
@@ -166,19 +166,19 @@ Eina_Bool eio_file_set(Eio_File *common,
166 Eio_Done_Cb done_cb, 166 Eio_Done_Cb done_cb,
167 Eio_Error_Cb error_cb, 167 Eio_Error_Cb error_cb,
168 const void *data, 168 const void *data,
169 Ecore_Thread_Heavy_Cb job_cb, 169 Ecore_Thread_Cb job_cb,
170 Ecore_Cb end_cb, 170 Ecore_Thread_Cb end_cb,
171 Ecore_Cb cancel_cb); 171 Ecore_Thread_Cb cancel_cb);
172 172
173/* Be aware that ecore_thread_run could call cancel_cb if something goes wrong. */ 173/* Be aware that ecore_thread_run could call cancel_cb if something goes wrong. */
174Eina_Bool eio_long_file_set(Eio_File *common, 174Eina_Bool eio_long_file_set(Eio_File *common,
175 Eio_Done_Cb done_cb, 175 Eio_Done_Cb done_cb,
176 Eio_Error_Cb error_cb, 176 Eio_Error_Cb error_cb,
177 const void *data, 177 const void *data,
178 Ecore_Thread_Heavy_Cb heavy_cb, 178 Ecore_Thread_Cb heavy_cb,
179 Ecore_Thread_Notify_Cb notify_cb, 179 Ecore_Thread_Notify_Cb notify_cb,
180 Ecore_Cb end_cb, 180 Ecore_Thread_Cb end_cb,
181 Ecore_Cb cancel_cb); 181 Ecore_Thread_Cb cancel_cb);
182 182
183void eio_file_error(Eio_File *common); 183void eio_file_error(Eio_File *common);
184void eio_file_thread_error(Eio_File *common, Ecore_Thread *thread); 184void eio_file_thread_error(Eio_File *common, Ecore_Thread *thread);
diff --git a/legacy/eio/src/lib/eio_single.c b/legacy/eio/src/lib/eio_single.c
index 3404361782..a39091ece0 100644
--- a/legacy/eio/src/lib/eio_single.c
+++ b/legacy/eio/src/lib/eio_single.c
@@ -30,7 +30,7 @@
30 */ 30 */
31 31
32static void 32static void
33_eio_file_mkdir(Ecore_Thread *thread, void *data) 33_eio_file_mkdir(void *data, Ecore_Thread *thread)
34{ 34{
35 Eio_File_Mkdir *m = data; 35 Eio_File_Mkdir *m = data;
36 36
@@ -46,7 +46,7 @@ _eio_mkdir_free(Eio_File_Mkdir *m)
46} 46}
47 47
48static void 48static void
49_eio_file_mkdir_done(void *data) 49_eio_file_mkdir_done(void *data, Ecore_Thread *thread __UNUSED__)
50{ 50{
51 Eio_File_Mkdir *m = data; 51 Eio_File_Mkdir *m = data;
52 52
@@ -57,7 +57,7 @@ _eio_file_mkdir_done(void *data)
57} 57}
58 58
59static void 59static void
60_eio_file_mkdir_error(void *data) 60_eio_file_mkdir_error(void *data, Ecore_Thread *thread __UNUSED__)
61{ 61{
62 Eio_File_Mkdir *m = data; 62 Eio_File_Mkdir *m = data;
63 63
@@ -66,7 +66,7 @@ _eio_file_mkdir_error(void *data)
66} 66}
67 67
68static void 68static void
69_eio_file_unlink(Ecore_Thread *thread, void *data) 69_eio_file_unlink(void *data, Ecore_Thread *thread)
70{ 70{
71 Eio_File_Unlink *l = data; 71 Eio_File_Unlink *l = data;
72 72
@@ -82,7 +82,7 @@ _eio_unlink_free(Eio_File_Unlink *l)
82} 82}
83 83
84static void 84static void
85_eio_file_unlink_done(void *data) 85_eio_file_unlink_done(void *data, Ecore_Thread *thread __UNUSED__)
86{ 86{
87 Eio_File_Unlink *l = data; 87 Eio_File_Unlink *l = data;
88 88
@@ -93,7 +93,7 @@ _eio_file_unlink_done(void *data)
93} 93}
94 94
95static void 95static void
96_eio_file_unlink_error(void *data) 96_eio_file_unlink_error(void *data, Ecore_Thread *thread __UNUSED__)
97{ 97{
98 Eio_File_Unlink *l = data; 98 Eio_File_Unlink *l = data;
99 99
@@ -102,7 +102,7 @@ _eio_file_unlink_error(void *data)
102} 102}
103 103
104static void 104static void
105_eio_file_stat(Ecore_Thread *thread, void *data) 105_eio_file_stat(void *data, Ecore_Thread *thread)
106{ 106{
107 Eio_File_Stat *s = data; 107 Eio_File_Stat *s = data;
108 108
@@ -118,7 +118,7 @@ _eio_stat_free(Eio_File_Stat *s)
118} 118}
119 119
120static void 120static void
121_eio_file_stat_done(void *data) 121_eio_file_stat_done(void *data, Ecore_Thread *thread __UNUSED__)
122{ 122{
123 Eio_File_Stat *s = data; 123 Eio_File_Stat *s = data;
124 124
@@ -129,7 +129,7 @@ _eio_file_stat_done(void *data)
129} 129}
130 130
131static void 131static void
132_eio_file_stat_error(void *data) 132_eio_file_stat_error(void *data, Ecore_Thread *thread __UNUSED__)
133{ 133{
134 Eio_File_Stat *s = data; 134 Eio_File_Stat *s = data;
135 135
@@ -138,7 +138,7 @@ _eio_file_stat_error(void *data)
138} 138}
139 139
140static void 140static void
141_eio_file_chmod(Ecore_Thread *thread, void *data) 141_eio_file_chmod(void *data, Ecore_Thread *thread)
142{ 142{
143 Eio_File_Chmod *ch = data; 143 Eio_File_Chmod *ch = data;
144 144
@@ -147,7 +147,7 @@ _eio_file_chmod(Ecore_Thread *thread, void *data)
147} 147}
148 148
149static void 149static void
150_eio_file_chown(Ecore_Thread *thread, void *data) 150_eio_file_chown(void *data, Ecore_Thread *thread)
151{ 151{
152 Eio_File_Chown *own = data; 152 Eio_File_Chown *own = data;
153 char *tmp; 153 char *tmp;
@@ -213,7 +213,7 @@ _eio_chown_free(Eio_File_Chown *ch)
213} 213}
214 214
215static void 215static void
216_eio_file_chown_done(void *data) 216_eio_file_chown_done(void *data, Ecore_Thread *thread __UNUSED__)
217{ 217{
218 Eio_File_Chown *ch = data; 218 Eio_File_Chown *ch = data;
219 219
@@ -224,7 +224,7 @@ _eio_file_chown_done(void *data)
224} 224}
225 225
226static void 226static void
227_eio_file_chown_error(void *data) 227_eio_file_chown_error(void *data, Ecore_Thread *thread __UNUSED__)
228{ 228{
229 Eio_File_Chown *ch = data; 229 Eio_File_Chown *ch = data;
230 230
@@ -263,10 +263,10 @@ eio_long_file_set(Eio_File *common,
263 Eio_Done_Cb done_cb, 263 Eio_Done_Cb done_cb,
264 Eio_Error_Cb error_cb, 264 Eio_Error_Cb error_cb,
265 const void *data, 265 const void *data,
266 Ecore_Thread_Heavy_Cb heavy_cb, 266 Ecore_Thread_Cb heavy_cb,
267 Ecore_Thread_Notify_Cb notify_cb, 267 Ecore_Thread_Notify_Cb notify_cb,
268 Ecore_Cb end_cb, 268 Ecore_Thread_Cb end_cb,
269 Ecore_Cb cancel_cb) 269 Ecore_Thread_Cb cancel_cb)
270{ 270{
271 Ecore_Thread *thread; 271 Ecore_Thread *thread;
272 272
@@ -276,7 +276,7 @@ eio_long_file_set(Eio_File *common,
276 common->error = 0; 276 common->error = 0;
277 common->thread = NULL; 277 common->thread = NULL;
278 278
279 /* Be aware that ecore_thread_run could call cancel_cb if something goes wrong. 279 /* Be aware that ecore_thread_feedback_run could call cancel_cb if something goes wrong.
280 This means that common would be destroyed if thread == NULL. 280 This means that common would be destroyed if thread == NULL.
281 */ 281 */
282 thread = ecore_thread_feedback_run(heavy_cb, 282 thread = ecore_thread_feedback_run(heavy_cb,
@@ -294,9 +294,9 @@ eio_file_set(Eio_File *common,
294 Eio_Done_Cb done_cb, 294 Eio_Done_Cb done_cb,
295 Eio_Error_Cb error_cb, 295 Eio_Error_Cb error_cb,
296 const void *data, 296 const void *data,
297 Ecore_Thread_Heavy_Cb job_cb, 297 Ecore_Thread_Cb job_cb,
298 Ecore_Cb end_cb, 298 Ecore_Thread_Cb end_cb,
299 Ecore_Cb cancel_cb) 299 Ecore_Thread_Cb cancel_cb)
300{ 300{
301 Ecore_Thread *thread; 301 Ecore_Thread *thread;
302 302