source: soft/giet_vm/hello/main.c @ 191

Last change on this file since 191 was 191, checked in by alain, 12 years ago

Introducing 4 applications

File size: 482 bytes
Line 
1#include "stdio.h"
2
3__attribute__((constructor)) void main()
4{
5        unsigned int    i;
6        char                byte;
7    unsigned int        proc = giet_procid();
8
9        for( i=0 ; i<1000 ; i++ )
10        {
11                if( giet_tty_printf(" hello from processor %d\n", proc) )
12                {
13                        giet_tty_puts("echec tty_printf\n");
14                        giet_exit();
15                }
16        if( giet_tty_getc((void*)&byte) )
17        {
18                        giet_tty_puts("echec tty_getc_irq\n");
19                        giet_exit();
20                } 
21        if ( byte == 'q' ) giet_exit();
22        }
23    giet_exit();
24
25} // end main
26
Note: See TracBrowser for help on using the repository browser.