pthread_sigmask

"Nathan Falk" <[email protected]> Fri, 2 Aug 2002 15:44:28 -0400
Newsgroups gmane.linux.ngpt.user
Message-ID <[email protected]>
I have a single-threaded process which uses pthread_sigmask for
synchronization.  We have a dispatcher loop which, among other things,
checks a queue of interrupts that need to be dealt with.  Each interrupt
handler adds a function to this queue (this is where the interrupt really
gets "handled", not in the handler registered with the system).  Before
accessing this queue, we make a call to pthread_sigmask(BLOCK), and after,
a call to pthread_sigmask(SETMASK) to restore the previous setting.  This
ensures that no new interrupts can come in while we modify the list.  Can
anyone see anything wrong with doing this?  It's never caused any problems
on AIX, but I'm seeing periodic hangs running Linux with ngpt.

Thanks,

Nate Falk
RS/6000 SP Workload Management/LoadLeveler
845-433-8162 (T/L: 293-8162)