-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
41 lines (32 loc) · 1.01 KB
/
Copy pathmain.cpp
File metadata and controls
41 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "runtime.hpp"
#include "stdfunc.hpp"
static_assert( ( sizeof( void* ) == 4 ), "This is for i386 (32-bit) only" );
EXPORT void _start() {
runtime::result_t l_callbackResult = runtime::init();
do {
if ( l_callbackResult != runtime::result_t::remain ) [[unlikely]] {
break;
}
for ( ;; ) {
// Event handling
{
// Wait-block
runtime::move_t l_move = runtime::waitMove();
l_callbackResult = runtime::event( l_move );
if ( l_callbackResult != runtime::result_t::remain )
[[unlikely]] {
break;
}
}
// Iteration
{
l_callbackResult = runtime::iterate();
if ( l_callbackResult != runtime::result_t::remain )
[[unlikely]] {
break;
}
}
}
} while ( false );
quit( l_callbackResult );
}