Date: Fri, 06 Oct 2000 09:48:35 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Mike Smith <msmith@FreeBSD.org> Subject: Re: cvs commit: src/sys/alpha/include atomic.h src/sys/i386/incl Message-ID: <XFMail.001006094835.jhb@FreeBSD.org> In-Reply-To: <Pine.BSF.4.21.0010062021030.2593-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.001006094835.jhb>