Skip to content
Snippets Groups Projects
Select Git revision
  • c15ad650c77ef3213d723efec4e1dca89efba6cd
  • passt default
  • master
  • pu
  • todo
  • next
  • maint
  • v2.8.0-rc1
  • v2.8.0-rc0
  • v2.7.2
  • v2.7.1
  • v2.7.0
  • v2.6.5
  • v2.7.0-rc3
  • v2.7.0-rc2
  • v2.7.0-rc1
  • v2.7.0-rc0
  • v2.6.4
  • v2.6.3
  • v2.6.2
  • v2.6.1
  • v2.3.10
  • v2.5.4
  • v2.4.10
  • v2.6.0
  • v2.6.0-rc3
  • v2.5.3
27 results

git-gui

Blame
  • f.cc 692 B
    #include "os.h"
    #include "test/test.h"
    
    DeclareTask(H1);
    DeclareTask(H2);
    DeclareTask(H3);
    DeclareAlarm(A1);
    DeclareCounter(C1);
    
    TEST_MAKE_OS_MAIN(StartOS(0))
    
    volatile int a;
    
    TASK(H1) {
    	test_trace('X');
    	TerminateTask();
    }
    
    TASK(H2) {
    #ifndef FAIL
    	a++;
    #else
    	// Stop immedately
    	a = 100;
    #endif
    	test_trace('0' + a);
    	ActivateTask(H3);
    	Machine::nop();
    	TerminateTask();
    }
    
    TASK(H3) {
    	test_trace('.');
    	while (a <= 3) {};
    	test_trace(':');
    	TerminateTask();
    }
    
    void PreIdleHook() {
    	/* The testcase has finished, check the output */
    	static int cycle_count;
    	cycle_count++;
    
    	if (cycle_count > 5) {
    		test_trace_assert("1.234:5.:6.:7.:8.:");
    		test_finish();
    		ShutdownMachine();
    	}
    }