From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <7871fcf50610221605y124a0b9dnccd7e3e420a0ad03@mail.gmail.com> Date: Sun, 22 Oct 2006 19:05:55 -0400 From: "Joel Salomon" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [9fans] Semaphores Topicbox-Message-UUID: d1f0e050-ead1-11e9-9d60-3106f5b1d025 Homework help: Could someone point me to an explanation of semaphore implementation? I'm supposed to implement something very like semacquire(2) using TAS spinlocks (the professor says it's OK for me to use lock(2), but not qlock), but in user mode. He suggests using signals for wakeup. I'm looking at /sys/src/9/port/sysproc.c and /sys/doc/sleep.* not quite understanding either. Is there a readable description of queueing on a semaphore in the literature somewhere? Google's mostly turning up assembler-heavy linux kernel one-upsmanship. --Joel -- In googlis non est, ergo non est.