Ignore:
Timestamp:
Feb 12, 2013, 6:33:31 PM (11 years ago)
Author:
meunier
Message:

Added support for memspaces and const.
Added an interrupt masking to the "giet_context_switch" syscall
Corrected two bugs in boot/boot_init.c (one minor and one regarding barriers initialization)
Reformatted the code in all files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/sys/exc_handler.c

    r218 r228  
    5454};
    5555
    56 static const char* exc_type[] = {
     56static const char * exc_type[] = {
    5757    "strange unknown cause",
    5858    "illegal read address",
     
    6262    "breakpoint",
    6363    "reserved instruction",
    64     "illegal coproc access"
     64    "illegal coproc access",
    6565    "arithmetic overflow",
    6666};
    6767
    68 static void _display_cause(unsigned int type)
    69 {
     68
     69static void _display_cause(unsigned int type) {
    7070    _get_lock(&_tty_put_lock);
    7171    _puts("\n[GIET] Exception for task ");
    72     _putd( _get_current_task_id() );
     72    _putd(_get_current_task_id());
    7373    _puts(" on processor ");
    74     _putd( _procid() );
     74    _putd(_procid());
    7575    _puts(" at cycle ");
    76     _putd( _proctime() );
     76    _putd(_proctime());
    7777    _puts("\n - type      : ");
    78     _puts( (char*)exc_type[type] );
     78    _puts((char *) exc_type[type]);
    7979    _puts("\n - EPC       : ");
    80     _putx( _get_epc() );
     80    _putx(_get_epc());
    8181    _puts("\n - BVAR      : ");
    82     _putx( _get_bvar() );
     82    _putx(_get_bvar());
    8383    _puts("\n");
    8484    _puts("...Task desactivated\n");
     
    8787    // goes to sleeping state
    8888    unsigned int task_id = _get_current_task_id();
    89     _set_context_slot( task_id, CTX_RUN_ID, 0 );
    90    
     89    _set_context_slot( task_id, CTX_RUN_ID, 0);
     90
    9191    // deschedule
    9292    _ctx_switch();
     
    103103static void _cause_ovf()  { _display_cause(8); }
    104104
     105// Local Variables:
     106// tab-width: 4
     107// c-basic-offset: 4
     108// c-file-offsets:((innamespace . 0)(inline-open . 0))
     109// indent-tabs-mode: nil
     110// End:
     111// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     112
Note: See TracChangeset for help on using the changeset viewer.