看板 FB_hackers 關於我們 聯絡資訊
Peter Jeremy 歞鷿 > On Sat, Feb 02, 2008 at 11:31:31AM +0200, Alexander Motin wrote: >> To check UMA dependency I have made a trivial one-element cache which in my >> test case allows to avoid two for four allocations per packet. > > You should be able to implement this lockless using atomic(9). I haven't > verified it, but the following should work. I have tried this, but man 9 atomic talks: The atomic_readandclear() functions are not implemented for the types ``char'', ``short'', ``ptr'', ``8'', and ``16'' and do not have any variants with memory barriers at this time. -- Alexander Motin _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"