Date: Fri, 15 Dec 2000 17:38:05 +0100 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Alfred Perlstein <bright@wintelcom.net> Cc: Chuck Paterson <cp@bsdi.com>, Julian Elischer <julian@elischer.org>, smp@FreeBSD.ORG Subject: Re: atomic increment? Message-ID: <3025.976898285@critter> In-Reply-To: Your message of "Fri, 15 Dec 2000 08:29:36 PST." <20001215082936.L19572@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Uhm, I think you guys are talking past each other here. One camp wants code that goes: ... operation (implemented with atom insn) ... The other says, do it this way: ... get_mutex (implemented with atomic insn) operation (normal compiled insn's) release_mutex (implemeted with normal insn) ... It doesn't take a Bruce to see that this is as pointless a dispute as the big vs little endian dispute i Gullivers Travels. But only of course, as long as the operation has no possiblity of blocking, typical examples being "assignment of pointers", arithmetic and so on. My personal take on this is that IFF I i can do it elegantly with simple atomic primitives, I will (see DEVFS), if not I'll use mutexen so that I don't obfuscate the source. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3025.976898285>