auto-sync

This commit is contained in:
rusEfi 2015-03-04 04:05:24 -06:00
parent 9a2844e54b
commit d4c38b3fbc
2 changed files with 19 additions and 8 deletions

View File

@ -50,7 +50,7 @@
#define CHPRINTF_USE_FLOAT TRUE #define CHPRINTF_USE_FLOAT TRUE
#define EFI_CLOCK_LOCKS TRUE #define EFI_CLOCK_LOCKS FALSE
#if EFI_CLOCK_LOCKS #if EFI_CLOCK_LOCKS

View File

@ -110,14 +110,25 @@ void initErrorHandling(void) {
extern VTList vtlist; extern VTList vtlist;
extern bool_t main_loop_started; extern bool_t main_loop_started;
void assertVtList(void) { int getVtSizeEstimate(void) {
if(!main_loop_started) VirtualTimer *first = vtlist.vt_next;
return; VirtualTimer *cur = first->vt_next;
VirtualTimer *first = vtlist.vt_next;
VirtualTimer *cur = first->vt_next;
int c = 0; int c = 0;
while(c++ < 20 && cur != first) { while (c++ < 20 && cur != first) {
cur = cur->vt_next; cur = cur->vt_next;
} }
efiAssertVoid(c > 3, "VT list?"); return c;
}
int globalVt;
int allReady = 0;
void assertVtList(void) {
if (!main_loop_started)
return;
globalVt = getVtSizeEstimate();
//efiAssertVoid(globalVt > 3, "VT list?");
if(globalVt <=3 ) {
allReady++;
}
} }