summaryrefslogtreecommitdiff
path: root/UnixPkg/TimerDxe
diff options
context:
space:
mode:
Diffstat (limited to 'UnixPkg/TimerDxe')
-rw-r--r--UnixPkg/TimerDxe/Timer.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/UnixPkg/TimerDxe/Timer.c b/UnixPkg/TimerDxe/Timer.c
index 53b5656..7f43a36 100644
--- a/UnixPkg/TimerDxe/Timer.c
+++ b/UnixPkg/TimerDxe/Timer.c
@@ -62,7 +62,7 @@ UINT64 mTimerPeriodMs;
VOID
-TimerCallback (UINT64 DeltaMs)
+TimerCallback (UINT64 DeltaMs)
/*++
Routine Description:
@@ -84,12 +84,12 @@ Returns:
--*/
{
EFI_TPL OriginalTPL;
- EFI_TIMER_NOTIFY CallbackFunction;
-
+ EFI_TIMER_NOTIFY CallbackFunction;
+
OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);
- if (OriginalTPL < TPL_HIGH_LEVEL) {
+ if (OriginalTPL < TPL_HIGH_LEVEL) {
CallbackFunction = mTimerNotifyFunction;
//
@@ -99,7 +99,7 @@ Returns:
if (CallbackFunction != NULL) {
CallbackFunction ((UINT64) (DeltaMs * 10000));
}
- }
+ }
gBS->RestoreTPL (OriginalTPL);
@@ -164,13 +164,13 @@ Returns:
return EFI_ALREADY_STARTED;
}
- if (NotifyFunction == NULL) {
- /* Disable timer. */
- gUnix->SetTimer (0, TimerCallback);
- } else if (mTimerNotifyFunction == NULL) {
- /* Enable Timer. */
- gUnix->SetTimer (mTimerPeriodMs, TimerCallback);
- }
+ if (NotifyFunction == NULL) {
+ /* Disable timer. */
+ gUnix->SetTimer (0, TimerCallback);
+ } else if (mTimerNotifyFunction == NULL) {
+ /* Enable Timer. */
+ gUnix->SetTimer (mTimerPeriodMs, TimerCallback);
+ }
mTimerNotifyFunction = NotifyFunction;
return EFI_SUCCESS;
@@ -224,13 +224,13 @@ Returns:
// If TimerPeriod is 0, then the timer thread should be canceled
// If the TimerPeriod is valid, then create and/or adjust the period of the timer thread
//
- if (TimerPeriod == 0
- || ((TimerPeriod > TIMER_MINIMUM_VALUE)
+ if (TimerPeriod == 0
+ || ((TimerPeriod > TIMER_MINIMUM_VALUE)
&& (TimerPeriod < TIMER_MAXIMUM_VALUE))) {
mTimerPeriodMs = DivU64x32 (TimerPeriod + 5000, 10000);
-
- gUnix->SetTimer (mTimerPeriodMs, TimerCallback);
- }
+
+ gUnix->SetTimer (mTimerPeriodMs, TimerCallback);
+ }
return EFI_SUCCESS;
}
@@ -369,6 +369,6 @@ Returns:
if (EFI_ERROR (Status)) {
return Status;
}
-
+
return EFI_SUCCESS;
}