Lines Matching defs:tn
307 struct sigev_thread *tn;
318 tn = malloc(sizeof(*tn));
319 tn->tn_cur = NULL;
320 tn->tn_lwpid = -1;
321 tn->tn_refcount = 1;
322 _pthread_cond_init(&tn->tn_cv, NULL);
326 LIST_INSERT_HEAD(&sigev_threads, tn, tn_link);
336 ret = _pthread_create(&tn->tn_thread, &sigev_default_attr,
337 sigev_service_loop, tn);
342 LIST_REMOVE(tn, tn_link);
344 free(tn);
345 tn = NULL;
350 while (tn->tn_lwpid == -1)
351 _pthread_cond_wait(&tn->tn_cv, sigev_list_mtx);
354 return (tn);
368 struct sigev_thread *tn;
374 tn = arg;
375 thr_self(&tn->tn_lwpid);
377 _pthread_cond_broadcast(&tn->tn_cv);
386 if (tn->tn_refcount == 0) {
387 LIST_REMOVE(tn, tn_link);
389 free(tn);
407 tn->tn_cur = sn;
409 tn->tn_cur = NULL;
424 } else if (tn->tn_cur) {
426 while (tn->tn_cur)
427 _pthread_cond_wait(&tn->tn_cv, sigev_list_mtx);