Date: Sat, 2 Dec 1995 19:50:57 +0200 (EET) From: Jukka Ukkonen <jau@jau.csc.fi> To: questions@freebsd.org, hackers@freebsd.org Subject: msleep(2) & mwakeup(2) ??? Message-ID: <199512021750.TAA22091@jau.csc.fi>
next in thread | raw e-mail | index | archive | help
Hi all! Does anyone know whatever happened to those synchronization primitives that are mentioned in 4.4BSD Architecture Manual (see PSD:5-11)? After writing initial versions of POSIX.4 shm_open() and shm_unlink() I thought about implementing POSIX.4 counting semaphores using mmap()'ed shared memory and msleep(), mwakeup(), mset(), and mclear(), but when I checked none of these synchronization routines were present in source files. Or maybe I just did not look for them in the correct place. At least they were not in the source trees of FreeBSD-2.0.5 or 4.4BSD-Lite, which I have on CD at home. I did not check FreeBSD-2.1.0 yet. Does anybody have a better idea where to look? At the bottom of the manual page that I mentioned above there is a note "All currently unimplemented, no entry points exist." Is this still true or has someone already tried adding them? Supposedly it would not be terribly difficult to add these binary semaphores though. At the first glance it looked to me that only msleep() and mwakeup() would really need to be supported by the kernel unless one wants also something like mtimedsleep() to be a single system call instead of two calls, the first one to set a timer and then msleep(). Mset() and mclear() could (when efficiency is concerned they presumably even should) be plain wrappers to bus-interlocked machine instructions in the style of test-and-clear. Cheers, // jau ------ / Jukka A. Ukkonen, FUNET / Centre for Scientific Computing /__ M.Sc. (sw-eng & cs) Tel: (Home) +358-0-6215280 / Internet: ukkonen@csc.fi (Work) +358-0-4573208 / Internet: jau@funet.fi (Mobile) +358-400-606671 v X.400: c=fi, admd=fumail, no prmd, org=csc, pn=jukka.ukkonen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512021750.TAA22091>