マルチスレッドのプログラミング

thr_continue の構文

#include <thread.h>

int thr_continue(thread_t tid);

停止しているスレッドは、シグナルでは呼び起こされません。送られたシグナルは、そのスレッドが thr_continue() で再開されるまで保留されます。

pthread で定義されている pthread_t tid と Solaris スレッドの thread_t tid が同じです。tid 値は、代入によっても型変換によっても使用できます。

thread_t tid; /* tid from thr_create()*/

/* pthreads equivalent of Solaris tid from thread created */
/* with pthread_create()*/
pthread_t ptid;

int ret;

ret = thr_continue(tid);

/* using pthreads ID variable with a cast */
ret = thr_continue((thread_t) ptid)