[gst-devel] Scheduler unification / cothreads
Benjamin Otte
in7y118 at public.uni-hamburg.de
Tue Apr 23 08:24:04 CEST 2002
Hi,
I was thinking about unifying the API of our two cothreads packages, so
that we only need one source file and can compile both schedulers with a
little Makefile magic.
I don't think there is a reason why we have to seperated them because both
cothread packages are functionally equivalent.
And I don't like having fixes only applied to one scheduler either :)
After I looked at it, I found out that the naming of functions / structs
is slightly different.
I've listed those, that are currently used below (Left side is the old
cothreads, right side the
new one):
structs
- cothread_state vs cothread
- cothread_context vs not used
functions
- cothread_context_init vs cothreads_init (prototype is different)
- cothread_context_free vs not used
- cothread_switch (different prototype)
- cothread_create (arguments are given in other order)
- cothread_setfunc vs cothread_reset (different prototype)
- cothread_free vs cothread_destroy
- cothread_lock vs not used
- cothread_unlock vs not used
- cothread_current_main vs saving main cothread in scheduler struct
- cothread_set_private (this functions is used in the scheduler but isn't
necessary)
So the question is:
What is the preferred way of our thread package maintainers to achieve
this unification?
Benjamin
PS: Yes, thomasvs, this has something to do with events ;)
More information about the gstreamer-devel
mailing list