mirror of
https://github.com/darlinghq/darling-libplatform.git
synced 2024-11-23 03:59:40 +00:00
Add back Darling specific changes.
This commit is contained in:
parent
53b3cfe92e
commit
ef0b4e2b16
@ -252,6 +252,7 @@ OS_ATOMIC_FUNCTION_START(OSAtomicDequeue, 2)
|
||||
* void OSAtomicFifoEnqueue( OSFifoQueueHead *list, void *new, size_t offset);
|
||||
*/
|
||||
OS_ATOMIC_FUNCTION_START(OSAtomicFifoEnqueue$VARIANT$PFZ, 2)
|
||||
#ifndef DARLING // Linux has not preemption free zone (PFZ), this needs to be rewrittenc
|
||||
pushq %rbx
|
||||
xorl %ebx,%ebx // clear "preemption pending" flag
|
||||
movq _commpage_pfz_base(%rip),%rcx
|
||||
@ -262,11 +263,13 @@ OS_ATOMIC_FUNCTION_START(OSAtomicFifoEnqueue$VARIANT$PFZ, 2)
|
||||
call _preempt // call into the kernel to pfz_exit
|
||||
1:
|
||||
popq %rbx
|
||||
#endif
|
||||
ret
|
||||
|
||||
|
||||
/* void* OSAtomicFifoDequeue( OSFifoQueueHead *list, size_t offset); */
|
||||
OS_ATOMIC_FUNCTION_START(OSAtomicFifoDequeue$VARIANT$PFZ, 2)
|
||||
#ifndef DARLING
|
||||
pushq %rbx
|
||||
xorl %ebx,%ebx // clear "preemption pending" flag
|
||||
movq _commpage_pfz_base(%rip), %rcx
|
||||
@ -278,6 +281,7 @@ OS_ATOMIC_FUNCTION_START(OSAtomicFifoDequeue$VARIANT$PFZ, 2)
|
||||
call _preempt // call into the kernel to pfz_exit
|
||||
1:
|
||||
popq %rbx
|
||||
#endif
|
||||
ret // ptr to 1st element in Q in %rax
|
||||
|
||||
// Local Variables:
|
||||
|
@ -57,7 +57,7 @@ ffsll(long long mask)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if VARIANT_DYLD && TARGET_OS_SIMULATOR
|
||||
// #if VARIANT_DYLD && TARGET_OS_SIMULATOR
|
||||
int
|
||||
ffsl(long mask)
|
||||
{
|
||||
@ -99,5 +99,5 @@ ffs(int mask)
|
||||
return (bit);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
|
@ -57,7 +57,7 @@ flsll(long long mask)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if VARIANT_DYLD && TARGET_OS_SIMULATOR
|
||||
// #if VARIANT_DYLD && TARGET_OS_SIMULATOR
|
||||
int
|
||||
flsl(long mask)
|
||||
{
|
||||
@ -99,4 +99,4 @@ fls(int mask)
|
||||
return (bit);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
// #endif
|
||||
|
Loading…
Reference in New Issue
Block a user