Date: Sun, 10 Sep 100 20:15:11 +1100 (EST) From: Darren Reed <darrenr@reed.wattle.id.au> To: smp@freebsd.org Subject: atomic_{add,subtract} functions. Message-ID: <200009100915.UAA03343@avalon.reed.wattle.id.au>
next in thread | raw e-mail | index | archive | help
Someone might want to expand that interface from being atomic_{add,subtract}_{char,short,int,long}() (what happened to quad?) to include these too: atomic_{add,subtract}_{8,16,32,64}() I (and others, I hope) aren't so much fussed with what you can do in half a dozen asm. instructions on architecture X as having an interface which can be used reliably. Afterall, what about {u_,}int{8,16,32,64}_t ? Personally, I don't care if the above macros turn out to be rather heavy on some architectures (386, 486), heck, I'd even support them being something like: #define atomic_add_foo(x, y) { mtx_enter(&mtx_foo, MTX_DEF); x += y; mtx_exit(&mtx_foo); } if that is what was required. Darren 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?200009100915.UAA03343>