auto-sync

This commit is contained in:
rusEfi 2015-03-03 18:09:56 -06:00
parent 5e6892b6d9
commit 67eb699d51
3 changed files with 7 additions and 1 deletions

View File

@ -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;
}

View File

@ -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() {

View File

@ -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;
};