Lines Matching defs:Lock
57 * PARAMETERS: Lock - Pointer to a valid RW lock
67 ACPI_RW_LOCK *Lock)
72 Lock->NumReaders = 0;
73 Status = AcpiOsCreateMutex (&Lock->ReaderMutex);
79 Status = AcpiOsCreateMutex (&Lock->WriterMutex);
86 ACPI_RW_LOCK *Lock)
89 AcpiOsDeleteMutex (Lock->ReaderMutex);
90 AcpiOsDeleteMutex (Lock->WriterMutex);
92 Lock->NumReaders = 0;
93 Lock->ReaderMutex = NULL;
94 Lock->WriterMutex = NULL;
103 * PARAMETERS: Lock - Pointer to a valid RW lock
118 ACPI_RW_LOCK *Lock)
123 Status = AcpiOsAcquireMutex (Lock->ReaderMutex, ACPI_WAIT_FOREVER);
131 Lock->NumReaders++;
132 if (Lock->NumReaders == 1)
134 Status = AcpiOsAcquireMutex (Lock->WriterMutex, ACPI_WAIT_FOREVER);
137 AcpiOsReleaseMutex (Lock->ReaderMutex);
144 ACPI_RW_LOCK *Lock)
149 Status = AcpiOsAcquireMutex (Lock->ReaderMutex, ACPI_WAIT_FOREVER);
157 Lock->NumReaders--;
158 if (Lock->NumReaders == 0)
160 AcpiOsReleaseMutex (Lock->WriterMutex);
163 AcpiOsReleaseMutex (Lock->ReaderMutex);
173 * PARAMETERS: Lock - Pointer to a valid RW lock
186 ACPI_RW_LOCK *Lock)
191 Status = AcpiOsAcquireMutex (Lock->WriterMutex, ACPI_WAIT_FOREVER);
198 ACPI_RW_LOCK *Lock)
201 AcpiOsReleaseMutex (Lock->WriterMutex);