File:  [DVB] / dietlibc / lib / thrd_current.c
Revision 1.1: download - view: text, annotated - select for diffs
Sat Mar 15 22:18:58 2014 UTC (10 years, 2 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
attempt to implement more current thread primitives

#include <sys/tls.h>
#include <threads.h>

thrd_t thrd_current(void) {
  tcbhead_t* x=__get_cur_tcb();
  if (x->multiple_threads==0) return NULL;
  return (thrd_t)(x+1);
}

LinuxTV legacy CVS <linuxtv.org/cvs>