auto-sync
This commit is contained in:
parent
e2538cdcc3
commit
e3b2362c22
|
@ -276,5 +276,5 @@ int getRusEfiVersion(void) {
|
|||
return 1; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE[0] == 0)
|
||||
return 1; // this is here to make the compiler happy about the unused array
|
||||
return 20150302;
|
||||
return 20150303;
|
||||
}
|
||||
|
|
|
@ -33,10 +33,12 @@ void updateAndSet(State64 *state, uint32_t value) {
|
|||
state->lowBits = value;
|
||||
}
|
||||
|
||||
#if EFI_UNIT_TEST
|
||||
uint64_t Overflow64Counter::update(uint32_t value) {
|
||||
updateAndSet(&state, value);
|
||||
return state.highBits + state.lowBits;
|
||||
}
|
||||
#endif
|
||||
|
||||
// todo: make this a macro? always inline?
|
||||
uint64_t Overflow64Counter::get() {
|
||||
|
|
|
@ -9,8 +9,10 @@
|
|||
#define EFILIB2_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "main.h"
|
||||
|
||||
typedef struct {
|
||||
// todo: would probably be better to keep the high bits as 32 bit field to be sure
|
||||
volatile uint64_t highBits;
|
||||
volatile uint32_t lowBits;
|
||||
} State64;
|
||||
|
@ -23,7 +25,9 @@ class Overflow64Counter
|
|||
Overflow64Counter();
|
||||
|
||||
uint64_t get();
|
||||
#if EFI_UNIT_TEST
|
||||
uint64_t update(uint32_t value);
|
||||
#endif
|
||||
|
||||
State64 state;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue