Thanks to all who replied, I understand rwlocks
a little better now.
-Steve
It's how read and write locks are supposed to work, but your
example isn't necessarily how they should be used.
The idea is that a piece of data can be kept consistent by *either*
• allowing any number of simultaneous readers *or*
• a single writer.
You can't have simultaneous readers and writers
>is this how its susposed to work?
yes. the queued locks are associated with data, not with a process:
one process can acquire the lock and another release it.
that probably isn't used often at all, but it's the best way to think of it.
spin locks have a tighter link with a process because (after
Its quite possible that I'am doing somthing foolish,
but just in case its in the design...
It appears to me that when using rwlocks on plan9
I have to release the read lock before I can take the write lock
in a process - i.e. a single process cannot hold both.
This means that when updating a data