source: soft/giet_vm/apps/hello/main.c @ 165

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

Introducing various modifications in kernel initialisation

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