ReactOS Fundraising Campaign 2012
 
€ 4,060 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

PLIST_ENTRY NTAPI ExInterlockedRemoveHeadList ( IN OUT PLIST_ENTRY  ListHead,
IN OUT PKSPIN_LOCK  Lock 
)

Definition at line 166 of file interlocked.c.

{
    BOOLEAN Enable;
    PLIST_ENTRY ListEntry;

    /* Disable interrupts and acquire the spinlock */
    Enable = _ExiDisableInteruptsAndAcquireSpinlock(Lock);

    /* Check if the list is empty */
    if (IsListEmpty(ListHead))
    {
        /* Return NULL */
        ListEntry = NULL;
    }
    else
    {
        /* Remove the first entry from the list head */
        ListEntry = RemoveHeadList(ListHead);
#if DBG
        ListEntry->Flink = (PLIST_ENTRY)0xBADDD0FF;
        ListEntry->Blink = (PLIST_ENTRY)0xBADDD0FF;
#endif
    }

    /* Release the spinlock and restore interrupts */
    _ExiReleaseSpinLockAndRestoreInterupts(Lock, Enable);

    /* Return the entry */
    return ListEntry;
}

Generated on Tue May 22 2012 06:08:22 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.