Lines Matching refs:current_tid
57 static volatile int current_tid = MASTER_THREAD;
174 current_tid = MASTER_THREAD;
175 lthreads[current_tid].state = STATE_RUNNABLE;
177 (unsigned)lthreads[current_tid].context);
185 PDEBUG ("thread_yield: current tid=%d", current_tid);
191 (unsigned)lthreads[current_tid].context); \
192 if(setjmp(lthreads[current_tid].context) == 0) { \
193 current_tid = new; \
204 for (i = current_tid + 1; i < MAX_THREADS; i++) {
208 if (current_tid != 0) {
209 for (i = 0; i <= current_tid; i++) {
241 if (current_tid == id)
251 (unsigned)lthreads[current_tid].func);
253 lthreads[current_tid].retval =
254 lthreads[current_tid].func (lthreads[current_tid].arg);
256 PDEBUG ("thread_launcher: tid %d terminated", current_tid);
258 lthreads[current_tid].state = STATE_TERMINATED;
275 if (setjmp (lthreads[current_tid].context) == 0) {
277 current_tid = id;
295 if (current_tid == id)