added cothread_current_main with (void) args

Original commit message from CVS:
added cothread_current_main with (void) args
This commit is contained in:
Erik Walthinsen 2001-04-27 01:42:19 +00:00
parent 1b34ed4622
commit cea5e50a9d
2 changed files with 8 additions and 0 deletions

View file

@ -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)
{

View file

@ -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__ */