This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
where to put sigmask of suspend/resume thread
- From: Joël Krähemann <weedlight at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Mon, 24 Mar 2014 16:51:47 +0100
- Subject: where to put sigmask of suspend/resume thread
- Authentication-results: sourceware.org; auth=none
Where to put this code?
sigfillset(&(thread->wait_mask));
sigdelset(&(thread->wait_mask), AGS_THREAD_SUSPEND_SIG);
sigdelset(&(thread->wait_mask), AGS_THREAD_RESUME_SIG);
sigfillset(&(sa.sa_mask));
sa.sa_flags = 0;
sa.sa_handler = ags_thread_resume_handler;
sigaction(AGS_THREAD_RESUME_SIG, &sa, NULL);
sa.sa_handler = ags_thread_suspend_handler;
sigaction(AGS_THREAD_SUSPEND_SIG, &sa, NULL);
In the thread objects instantiation code which isn't run in its own
thread or in threads start routine?
later I'll do:
pthread_kill((thread->thread), AGS_THREAD_SUSPEND_SIG);