Last change
on this file since 734 was
432,
checked in by alain, 10 years ago
|
1) Introduce the "applications" directory.
2) Introduce the fixed format (X_WIDTH / Y_WIDTH / P_WIDTH) for processor index in all applications.
|
File size:
559 bytes
|
Line | |
---|
1 | #include "stdio.h" |
---|
2 | #include "hard_config.h" |
---|
3 | |
---|
4 | __attribute__((constructor)) void main() |
---|
5 | { |
---|
6 | char byte; |
---|
7 | |
---|
8 | // get processor identifiers |
---|
9 | unsigned int x; |
---|
10 | unsigned int y; |
---|
11 | unsigned int lpid; |
---|
12 | giet_proc_xyp( &x, &y, &lpid ); |
---|
13 | |
---|
14 | giet_tty_printf( "*** Starting task hello on processor[%d,%d,%d] at cycle %d\n\n", |
---|
15 | x, y, lpid, giet_proctime() ); |
---|
16 | |
---|
17 | while (1) |
---|
18 | { |
---|
19 | giet_tty_printf(" hello world\n"); |
---|
20 | giet_tty_getc((void*)&byte); |
---|
21 | if ( byte == 'q' ) giet_exit("quit command received"); |
---|
22 | } |
---|
23 | } // end main |
---|
24 | |
---|
Note: See
TracBrowser
for help on using the repository browser.