acquiring resources shared or exclusive

Jerry Kelley (jkelley@iei.net)
Tue, 3 Oct 2000 22:30:12 -0500


I have a rudimentary question as I'm new to the Linux kernel. Is there a
resource that can be acquired shared so that multiple threads can read data
from a protected region and not block each other? It seems that the
semaphore in the Linux kernel is only exclusively acquirable. I need to be
able to share read access from several threads to some global structures and
don't want them to block.

I do want blocking whenever I have to modify the structures though. Thus I'm
looking for a way to perform synchronization for reads (shared) and writes
(exclusively) in the kernel. I assume it can be done it's just that I'm not
sure how to do it yet. This is probably a very easy question.

Thanks in advance.

---
Jerry Kelley
jkelley@iei.net

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