[lkml]   [2003]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectholding kernel semaphores while in userspace ...

I've two processes that both read/write a shared resource (read via mmap,
write via write) that my device driver controls...

Now I know I could use SYSV semaphores and a shared mem region to
implement read/write semaphores but this seems to me to be a bit
heavyweight - I know I probably want futexes also (but this is 2.4 and I
probably wouldn't get that patch past the people here..)

So I was wondering if I added a couple of ioctls to my driver to wrap
access to a rwsem in the kernel, so four ioctls doing read/write up/down
combinations (are there interruptible versions for rwsems??), or is what
I'm doing stupid and evil .. and should I just be happy with my SYSV
semaphores or just use futexes (do these work acroess processes??)


David Airlie, Software Engineer /
pam_smb / Linux DecStation / Linux VAX / ILUG person

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.036 / U:6.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site