Re: [9fans] channel_lock

2008-07-14 Thread Russ Cox
> locks are not necessary between threads in the same proc > because only one of them can run at a time and they are > cooperatively scheduled. It is important to note that using cooperatively scheduled threads doesn't automatically mean you don't need locking. If your threads can go to sleep wit

Re: [9fans] channel_lock

2008-07-14 Thread Russ Cox
> I have been looking and the implementation of channels/alt in Plan9, > and I have a question. Does lock()/unlock() work across procs (not just > threads)? For example, in channel.c there is a static Lock *channel_lock. > Does this provide exclusive to channel data across procs? Yes: Locks are

Re: [9fans] channel_lock

2008-07-14 Thread erik quanstrom
> I have been looking and the implementation of channels/alt in Plan9, > and I have a question. Does lock()/unlock() work across procs (not > just threads)? For example, in channel.c there is a static Lock > *channel_lock. Does this provide exclusive to channel data across > procs? > > I assum