Re: Q: process concurrency and sigaction()

2001-04-09 Thread Anton Altaparmakov
Andi, Thanks a lot for the explanations! All clear now. (-: [snip] At 12:45 09/04/01, Andi Kleen wrote: >It's ok, but you don't really need to spin. A flag is enough. Also you >could use the signal blocking function (sigprocmask), but they're slightly >more expensive than just setting a flag. Y

Re: Q: process concurrency and sigaction()

2001-04-09 Thread Andi Kleen
On Mon, Apr 09, 2001 at 12:32:02PM +0100, Anton Altaparmakov wrote: > 1. On SMP, is it guaranteed that only one (handler vs. normal program code) > executes at the same time? (Or is it possible, for example, that signal > handler runs on CPU1 while the normal program code is executing on CPU2?)

Q: process concurrency and sigaction()

2001-04-09 Thread Anton Altaparmakov
Hi all, I use sigaction() to install a handler for SIGALRM, which is triggered periodically by a timer created using setitimer(ITIMER_REAL). The handler modifies the same data that my program (that registered the signal handler) modifies. So I need to lock one against the other. (The program h