示例#1
0
/*
 * @implemented
 */
LOGICAL
KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
                             OUT PKIRQL OldIrql)
{
#ifndef CONFIG_SMP
    /* Simply raise to dispatch */
    KeRaiseIrql(DISPATCH_LEVEL, OldIrql);

    /* Add an explicit memory barrier to prevent the compiler from reordering
       memory accesses across the borders of spinlocks */
    KeMemoryBarrierWithoutFence();

    /* Always return true on UP Machines */
    return TRUE;
#else
    UNIMPLEMENTED;
    ASSERT(FALSE);
#endif
}
示例#2
0
文件: spinlock.c 项目: RPG-7/reactos
/*
 * @implemented
 */
LOGICAL
FASTCALL
KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
                             OUT PKIRQL OldIrql)
{
#ifdef CONFIG_SMP
    ERROR_DBGBREAK("FIXME: Unused\n"); // FIXME: Unused
    return FALSE;
#endif

    /* Simply raise to dispatch */
    KeRaiseIrql(DISPATCH_LEVEL, OldIrql);

    /* Add an explicit memory barrier to prevent the compiler from reordering
       memory accesses across the borders of spinlocks */
    KeMemoryBarrierWithoutFence();

    /* Always return true on UP Machines */
    return TRUE;
}