Lock-free list atomics
Lock-free list atomics
- Subject: Lock-free list atomics
- From: Berni McCoy <email@hidden>
- Date: Thu, 06 Mar 2014 15:02:25 +0000
- Thread-topic: Lock-free list atomics
I noticed there is no longer an OSEnqueueAtomic exposed to KEXTs. Is there an equivalent function for use by KEXTs? I tried using an intrinsic implementation I have (using __sync_val_compare_and_swap), but since that implementation
uses a 128-bit header, it requires cmpxchg16b. Stepping through the code in the kernel, I get a GPF when executing this instruction even though the address it is swapping into is valid. I also have an assembler implementation that works in user-mode, but
it has the same issue as the intrinsic implementation when running in the kernel. In searching the kernel source, I saw no use of the cmpxchg16b instruction. Is there some undocumented restriction for this instruction in kernel mode on OS X?
Thanks in advance,
-Berni
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden