From owner-freebsd-bugs Sat Oct 24 05:40:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA08982 for freebsd-bugs-outgoing; Sat, 24 Oct 1998 05:40:07 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA08977 for ; Sat, 24 Oct 1998 05:40:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id FAA24654; Sat, 24 Oct 1998 05:40:00 -0700 (PDT) Date: Sat, 24 Oct 1998 05:40:00 -0700 (PDT) Message-Id: <199810241240.FAA24654@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Daniel Eischen Subject: Re: kern/8375: pthread_cond_wait() spins the CPU Reply-To: Daniel Eischen Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/8375; it has been noted by GNATS. From: Daniel Eischen To: dima@tejblum.dnttm.rssi.ru, jb@cimlogic.com.au Cc: eischen@vigrid.com, freebsd-gnats-submit@FreeBSD.ORG, jb@FreeBSD.ORG Subject: Re: kern/8375: pthread_cond_wait() spins the CPU Date: Sat, 24 Oct 1998 08:30:57 -0400 (EDT) > IMO, is this _SPINUNLOCK is too early or changing the thread state is too late > is not that important :-). Anyway, I would suggest to add 'spinlock_t *' > parameter to _thread_kern_sched_state. _thread_kern_sched_state would set > the state, unlock the spinlock and enter the scheduler. This would be useful > in quite a lot of places. (Richard Seaman sent a patch with a similar idea, but > I don't like something in it). I don't like that idea because it adds complication. It's not necessary in most cases. The thread schedule locking is very simple and could be more generally useful in the future for other things. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message