source: examples/multicore.c @ 4fd45bc

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 4fd45bc was 200fcb3, checked in by Peter A. Buhr <pabuhr@…>, 5 years ago

add auto newline to sout, change endl to nl

  • Property mode set to 100644
File size: 376 bytes
RevLine 
[73abe95]1#include <kernel.hfa>
2#include <thread.hfa>
[8d4f7fe]3
[17af7d1]4struct MyThread { thread_desc __thrd; };
[8d4f7fe]5
6DECL_THREAD(MyThread);
7
8void ?{}( MyThread * this ) {}
9
10void main( MyThread* this ) {
[9e45e46]11        for(int i = 0; i < 1000000; i++) {
[8d4f7fe]12                yield();
13        }
14}
15
16int main(int argc, char* argv[]) {
[200fcb3]17        // sout | "User main begin";
[8d4f7fe]18        {
19                processor p;
20                {
[9013eb0]21                        scoped(MyThread) f[4];
[8d4f7fe]22                }
23        }
[200fcb3]24        // sout | "User main end";
25}
Note: See TracBrowser for help on using the repository browser.