From c5cce64b7b7fc3f9855d3c8a39481033df4347d1 Mon Sep 17 00:00:00 2001 From: Erik Walthinsen Date: Fri, 27 Apr 2001 01:46:14 +0000 Subject: [PATCH] fixed cothread_current_main so it, um, works. Original commit message from CVS: fixed cothread_current_main so it, um, works. --- gst/cothreads.c | 7 ++++++- gst/cothreads.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gst/cothreads.c b/gst/cothreads.c index 0f689838a5..5c6b215f29 100644 --- a/gst/cothreads.c +++ b/gst/cothreads.c @@ -181,7 +181,12 @@ cothread_main(cothread_context *ctx) return ctx->threads[0]; } -void +/** + * cothread_current)main: + * + * Returns: the #cothread_state of the main (0th) thread in the current pthread + */ +cothread_state* cothread_current_main(void) { cothread_context *ctx = pthread_getspecific(_cothread_key); diff --git a/gst/cothreads.h b/gst/cothreads.h index 06a83f61f8..9b3dbeca34 100644 --- a/gst/cothreads.h +++ b/gst/cothreads.h @@ -90,6 +90,6 @@ gboolean cothread_trylock (cothread_state *thread); void cothread_unlock (cothread_state *thread); cothread_state* cothread_main (cothread_context *ctx); -void cothread_current_main (void); +cothread_state* cothread_current_main (void); #endif /* __COTHREAD_H__ */