From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 22 Mar 2005 14:40:17 -1000 From: Tim Newsham To: Sergey Reva , Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] How it work? In-Reply-To: <16725440859.20050322210023@mail.ru> Message-ID: References: <16725440859.20050322210023@mail.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Topicbox-Message-UUID: 281146f2-ead0-11e9-9d60-3106f5b1d025 > I try understand synchronization in Plan 9. > I find test-and-set routines (for PC) in l.s, but I can't find where > it used. Also I can't find any reason why it unused... so where it used? The kernel's files are spread out over /sys/src/9/{pc,port,ip}. Take a look at port/{qlock,taslock}.c. > And why rendezvous is syscall, but lock, qlock are library routines > which look like the same as kernel qlock.c There are several types of locks. Some (like spin locks) can operate without any assistance from the kernel (not entirely, they yield with a syscall). Others (like rendezvous) use the kernel to mediate between the processes. The lock(2) man page has more details. Tim N.