Use setfunc to set the cothread function instead of _reset

Original commit message from CVS:
Use setfunc to set the cothread function instead of _reset
This commit is contained in:
Wim Taymans 2002-06-16 17:34:14 +00:00
parent ac889ced82
commit 4d85bfc2df
3 changed files with 7 additions and 6 deletions

View file

@ -50,7 +50,7 @@ typedef cothread_state cothread;
}\
}G_STMT_END
#define do_cothread_reset(cothread, context, func, argc, argv) \
#define do_cothread_setfunc(cothread, context, func, argc, argv) \
cothread_setfunc ((cothread), (func), (argc), (argv))
#define do_cothread_destroy(cothread) cothread_free(cothread)
@ -110,8 +110,8 @@ typedef cothread cothread_context;
new_thread = cothread_create ((func), 0, (void**) (argv), (context)); \
}G_STMT_END
#define do_cothread_reset(cothread, context, func, argc, argv) \
cothread_reset ((cothread), (func), (argc), (void **) (argv), (context))
#define do_cothread_setfunc(cothread, context, func, argc, argv) \
cothread_setfunc ((cothread), (func), (argc), (void **) (argv), (context))
#define do_cothread_destroy(cothread) cothread_destroy(cothread)

View file

@ -637,8 +637,9 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain)
GST_ELEMENT_THREADSTATE (element),
GST_ELEMENT_NAME (element));
} else {
do_cothread_reset (GST_ELEMENT_THREADSTATE (element), chain->sched->context,
wrapper_function, 0, (char **) element);
/* set the cothread wrapper function */
do_cothread_setfunc (GST_ELEMENT_THREADSTATE (element), chain->sched->context,
wrapper_function, 0, (char **) element);
GST_DEBUG (GST_CAT_SCHEDULING, "set wrapper function for '%s' to &%s",
GST_ELEMENT_NAME (element), GST_DEBUG_FUNCPTR_NAME (wrapper_function));
}

View file

@ -308,7 +308,7 @@ gst_fast_scheduler_cothreaded_element (GstBin * bin, GstElement *element)
GST_ELEMENT_NAME (element), GST_DEBUG_FUNCPTR_NAME (wrapper_function));
}
} else {
do_cothread_reset (GST_ELEMENT_THREADSTATE (element), sched->context, wrapper_function, 0, (char **) element);
do_cothread_setfunc (GST_ELEMENT_THREADSTATE (element), sched->context, wrapper_function, 0, (char **) element);
GST_DEBUG (GST_CAT_SCHEDULING, "set wrapper function for '%s' to &%s\n",
GST_ELEMENT_NAME (element), GST_DEBUG_FUNCPTR_NAME (wrapper_function));
}