VARIABLE_STORE_HEADER *VariableStoreHeader[2];\r
UINTN Index;\r
\r
- //\r
- // We aquire the lock at the entry of FindVariable as GetVariable, GetNextVariableName\r
- // SetVariable all call FindVariable at entry point. Please move "Aquire Lock" to\r
- // the correct places if this assumption does not hold TRUE anymore.\r
- //\r
- AcquireLockOnlyAtBootTime(&Global->VariableServicesLock);\r
-\r
//\r
// 0: Non-Volatile, 1: Volatile\r
//\r
if (VariableName == NULL || VendorGuid == NULL || DataSize == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
+\r
+ AcquireLockOnlyAtBootTime(&Global->VariableServicesLock);\r
+\r
//\r
// Find existing variable\r
//\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ AcquireLockOnlyAtBootTime(&Global->VariableServicesLock);\r
+\r
Status = FindVariable (VariableName, VendorGuid, &Variable, Global);\r
\r
if (Variable.CurrPtr == NULL || EFI_ERROR (Status)) {\r
} \r
}\r
\r
+ AcquireLockOnlyAtBootTime(&Global->VariableServicesLock);\r
+\r
//\r
// Check whether the input variable is already existed\r
//\r