This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

where to put sigmask of suspend/resume thread


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]