Last change
on this file since 200 was
199,
checked in by alain, 12 years ago
|
Introducing the "idle" to improve the exit mechanism.
|
File size:
365 bytes
|
Rev | Line | |
---|
[191] | 1 | #include "stdio.h" |
---|
| 2 | |
---|
| 3 | __attribute__((constructor)) void main() |
---|
| 4 | { |
---|
| 5 | char byte; |
---|
| 6 | unsigned int proc = giet_procid(); |
---|
[199] | 7 | unsigned int* illegal = 0xFFFFFFF0; |
---|
[191] | 8 | |
---|
[199] | 9 | while (1) |
---|
[191] | 10 | { |
---|
[199] | 11 | giet_tty_printf(" hello from processor %d\n", proc); |
---|
| 12 | giet_tty_getc((void*)&byte); |
---|
[191] | 13 | if ( byte == 'q' ) giet_exit(); |
---|
[199] | 14 | if ( byte == 'x' ) *illegal = 1; |
---|
[191] | 15 | } |
---|
| 16 | } // end main |
---|
| 17 | |
---|
Note: See
TracBrowser
for help on using the repository browser.