mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
makes for nicer looking code
Original commit message from CVS: makes for nicer looking code
This commit is contained in:
parent
a1b9526640
commit
01c9750b48
1 changed files with 31 additions and 30 deletions
|
@ -31,7 +31,7 @@
|
|||
|
||||
/* unify the structs
|
||||
*
|
||||
* "cothread" and "cothread_context" need to vbe defined
|
||||
* "cothread" and "cothread_context" need to be defined
|
||||
*/
|
||||
typedef cothread_state cothread;
|
||||
|
||||
|
@ -44,11 +44,11 @@ typedef cothread_state cothread;
|
|||
|
||||
#define do_cothread_switch(to) cothread_switch(to)
|
||||
|
||||
#define do_cothread_create(new_thread, context, func, argc, argv) \
|
||||
#define do_cothread_create(new_cothread, context, func, argc, argv) \
|
||||
G_STMT_START{ \
|
||||
new_thread = cothread_create (context); \
|
||||
if (new_thread) { \
|
||||
cothread_setfunc (new_thread, (func), (argc), (argv)); \
|
||||
new_cothread = cothread_create (context); \
|
||||
if (new_cothread) { \
|
||||
cothread_setfunc (new_cothread, (func), (argc), (argv)); \
|
||||
} \
|
||||
}G_STMT_END
|
||||
|
||||
|
@ -111,9 +111,9 @@ typedef cothread cothread_context;
|
|||
} \
|
||||
}G_STMT_END
|
||||
|
||||
#define do_cothread_create(new_thread, context, func, argc, argv) \
|
||||
#define do_cothread_create(new_cothread, context, func, argc, argv) \
|
||||
G_STMT_START{ \
|
||||
new_thread = cothread_create ((func), 0, (void**) (argv), (context)); \
|
||||
new_cothread = cothread_create ((func), 0, (void**) (argv), (context)); \
|
||||
}G_STMT_END
|
||||
|
||||
#define do_cothread_setfunc(cothread, context, func, argc, argv) \
|
||||
|
@ -121,7 +121,8 @@ typedef cothread cothread_context;
|
|||
|
||||
#define do_cothread_destroy(cothread) cothread_destroy(cothread)
|
||||
|
||||
#define do_cothread_context_init() (cothread_create (NULL, 0, NULL, NULL))
|
||||
#define do_cothread_context_init() (cothread_create (NULL, 0, \
|
||||
NULL, NULL))
|
||||
#define do_cothread_context_destroy(context) cothread_destroy (context)
|
||||
|
||||
#define do_cothread_lock(cothread) /* FIXME */
|
||||
|
|
Loading…
Reference in a new issue