Re: Q: process concurrency and sigaction()

From: Anton Altaparmakov (aia21@cam.ac.uk)
Date: Mon Apr 09 2001 - 07:34:30 EST


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.

Yes, good point. Saves me a whole variable in my data structs in fact, as I
already have 32 bits worth of mostly unused, atomic flags.

sigprocmask would be rather excessive considering it requires a full
context switch into the kernel to execute and the high frequency of
lock/unlocks in the normal code while the handler only executes once every
5 seconds...

Best regards,

         Anton

-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://sourceforge.net/projects/linux-ntfs/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:11 EST