ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 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

NTSTATUS NTAPI FsRtlFastUnlockAllByKey ( IN PFILE_LOCK  FileLock,
IN PFILE_OBJECT  FileObject,
IN PEPROCESS  Process,
IN ULONG  Key,
IN PVOID Context  OPTIONAL 
)

Definition at line 967 of file filelock.c.

Referenced by FsRtlProcessFileLock().

{
    PCOMBINED_LOCK_ELEMENT Entry;
    PLOCK_INFORMATION InternalInfo = FileLock->LockInformation;
    
    DPRINT("FsRtlFastUnlockAllByKey(%wZ,Key %x)\n", &FileObject->FileName, Key);
    
    // XXX Synchronize somehow
    if (!FileLock->LockInformation) return STATUS_RANGE_NOT_LOCKED; // no locks
    for (Entry = RtlEnumerateGenericTable(&InternalInfo->RangeTable, TRUE);
         Entry;
         Entry = RtlEnumerateGenericTable(&InternalInfo->RangeTable, FALSE))
    {
        LARGE_INTEGER Length;
        // We'll take the first one to be the list head, and free the others first...
        Length.QuadPart = 
            Entry->Exclusive.FileLock.EndingByte.QuadPart - 
            Entry->Exclusive.FileLock.StartingByte.QuadPart;
        if (Entry->Exclusive.FileLock.Key == Key && 
            Entry->Exclusive.FileLock.ProcessId == Process->UniqueProcessId)
        {
            FsRtlFastUnlockSingle
                (FileLock, 
                 Entry->Exclusive.FileLock.FileObject,
                 &Entry->Exclusive.FileLock.StartingByte,
                 &Length,
                 Entry->Exclusive.FileLock.ProcessId,
                 Entry->Exclusive.FileLock.Key,
                 Context,
                 TRUE);
        }
    }
    
    return STATUS_SUCCESS;
}

Generated on Sat May 26 2012 06:05:56 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.