From owner-cvs-all Fri Oct 6 9:48:38 2000 Delivered-To: cvs-all@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id D36F737B502; Fri, 6 Oct 2000 09:48:34 -0700 (PDT) Received: from laptop.baldwin.cx (ether.osd.bsdi.com [204.216.28.196]) by pike.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id e96GmHi43191; Fri, 6 Oct 2000 09:48:17 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Fri, 06 Oct 2000 09:48:35 -0700 (PDT) From: John Baldwin To: Bruce Evans Subject: Re: cvs commit: src/sys/alpha/include atomic.h src/sys/i386/incl Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Mike Smith Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 06-Oct-00 Bruce Evans wrote: > On Thu, 5 Oct 2000, Mike Smith wrote: > >> > > >> Add atomic_readandclear_int and atomic_readandclear_long. >> > ... >> > It should be named loadandclear(). "load" is more precise than "read". >> >> It should be called "atomic_exchange()", and this specific case should be >> >> int value = 0; >> atomic_exchange(value, othervalue); >> >> since it's otherwise entirely redundant. > > Perhaps it should just be moved back to a machine-dependent place. The > machine might not have either an atomic exchange or an atomic exchange > with 0. I think it atomic_readandclear_int() is still only used in > setdelayed(), which was MD, and setdelayed is only used in MD clock > interrupt handler code. It is used in the softinterrupt handler code (a trick I borrowed from the alpha) as well as in setdelayed(), which is now a MI function. All of the setsoft*, schedsoft*, and setdelayed() are MI now. They are software interrupts, not hardware interrupts. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message