From owner-freebsd-arch Wed Sep 13 0:45:22 2000 Delivered-To: freebsd-arch@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 30F0337B42C; Wed, 13 Sep 2000 00:45:19 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id BAA63430; Wed, 13 Sep 2000 01:45:15 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id BAA86075; Wed, 13 Sep 2000 01:44:45 -0600 (MDT) Message-Id: <200009130744.BAA86075@harmony.village.org> To: Joerg Micheel Subject: Re: cvs commit: src/sys/conf files src/sys/sys random.h src/sys/dev/randomdev hash.c hash.h harvest.c randomdev.c yarrow.c yarro Cc: Greg Lehey , Matthew Jacob , Frank Mayhar , John Baldwin , Mark Murray , FreeBSD-arch@FreeBSD.ORG In-reply-to: Your message of "Tue, 12 Sep 2000 14:52:55 +1200." <20000912145255.A41113@cs.waikato.ac.nz> References: <20000912145255.A41113@cs.waikato.ac.nz> <200009120101.e8C11nN56928@realtime.exit.com> <20000912121105.J88615@wantadilla.lemis.com> Date: Wed, 13 Sep 2000 01:44:45 -0600 From: Warner Losh Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000912145255.A41113@cs.waikato.ac.nz> Joerg Micheel writes: : I liked the model Sun chose for Solaris. They have mutex', rw_locks, : condition variables. I don't like semaphores. Mutexes are for short : locks. Condition variables are for long-term waits, they are associated : with a mutex. You can only sleep/wakeup a CV when holding the associated : with it, which prevents races. When having to sleep on a CV the kernel : would unlock the mutex and reaquire it for the running thread before : returning. I've found that these are about as easy to use as spl/splx. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message