]>
git.proxmox.com Git - efi-boot-shim.git/blob - gnu-efi/lib/runtime/rtlock.c
3 Copyright (c) 1998 Intel Corporation
25 #pragma RUNTIME_CODE(RtAcquireLock)
35 Raising to the task priority level of the mutual exclusion
36 lock, and then acquires ownership of the lock.
40 Lock - The lock to acquire
49 if (BS
->RaiseTPL
!= NULL
) {
50 Lock
->OwnerTpl
= uefi_call_wrapper(BS
->RaiseTPL
, 1, Lock
->Tpl
);
54 if (LibRuntimeRaiseTPL
!= NULL
) {
55 Lock
->OwnerTpl
= LibRuntimeRaiseTPL(Lock
->Tpl
);
59 ASSERT (Lock
->Lock
== 1);
64 #pragma RUNTIME_CODE(RtAcquireLock)
74 Releases ownership of the mutual exclusion lock, and
75 restores the previous task priority level.
79 Lock - The lock to release
90 ASSERT(Lock
->Lock
== 1);
93 if (BS
->RestoreTPL
!= NULL
) {
94 uefi_call_wrapper(BS
->RestoreTPL
, 1, Tpl
);
98 if (LibRuntimeRestoreTPL
!= NULL
) {
99 LibRuntimeRestoreTPL(Tpl
);