From cea5e50a9d0e54956fa4b8bc6dc390c6c48cf390 Mon Sep 17 00:00:00 2001 From: Erik Walthinsen <omega@temple-baptist.org> Date: Fri, 27 Apr 2001 01:42:19 +0000 Subject: [PATCH] added cothread_current_main with (void) args Original commit message from CVS: added cothread_current_main with (void) args --- gst/cothreads.c | 7 +++++++ gst/cothreads.h | 1 + 2 files changed, 8 insertions(+) diff --git a/gst/cothreads.c b/gst/cothreads.c index ca1e5d3273..0f689838a5 100644 --- a/gst/cothreads.c +++ b/gst/cothreads.c @@ -181,6 +181,13 @@ cothread_main(cothread_context *ctx) return ctx->threads[0]; } +void +cothread_current_main(void) +{ + cothread_context *ctx = pthread_getspecific(_cothread_key); + return ctx->threads[0]; +} + static void cothread_stub (void) { diff --git a/gst/cothreads.h b/gst/cothreads.h index 40092f5b07..06a83f61f8 100644 --- a/gst/cothreads.h +++ b/gst/cothreads.h @@ -90,5 +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); #endif /* __COTHREAD_H__ */