Ignore:
Timestamp:
Jan 8, 2018, 2:25:39 PM (6 years ago)
Author:
alain
Message:

Fix a bug in hal_kentry.S : the "uzone" pointer in the thread descriptor
must not be modified in case of interrupt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_read.c

    r416 r418  
    6464    reg_t        save_sr;     // required to enable IRQs during syscall
    6565
    66 #if CONFIG_SYSCALL_DEBUG
    67 uint32_t     tm_start;
    68 uint32_t     tm_end;
     66#if CONFIG_READ_DEBUG
     67uint64_t     tm_start;
     68uint64_t     tm_end;
    6969tm_start = hal_get_cycles();
    7070#endif
    7171
    7272#if CONFIG_READ_DEBUG
    73 enter_sys_read = tm_start;
     73enter_sys_read = (uint32_t)tm_start;
    7474#endif
    7575
     
    9898
    9999    // enable IRQs
    100     hal_enable_irq( &save_sr );
     100    // hal_enable_irq( &save_sr );
    101101
    102102    // get extended pointer on remote file descriptor
     
    158158
    159159    // restore IRQs
    160     hal_restore_irq( save_sr );
     160    // hal_restore_irq( save_sr );
    161161
    162162    hal_fence();
    163163
    164 #if CONFIG_SYSCALL_DEBUG
     164#if CONFIG_READ_DEBUG
    165165tm_end = hal_get_cycles();
    166166printk("\n[DBG] %s : core[%x,%d] / thread %x in process %x / cycle %d\n"
     
    171171#endif
    172172
    173 #if CONFIG_READ_DEBUG
    174 exit_sys_read = tm_end;
     173#if CONFIG_READ_DEBUG 
     174exit_sys_read = (uint32_t)tm_end;
    175175
    176176printk("\n@@@@@@@@@@@@ timing to read character %c\n"
Note: See TracChangeset for help on using the changeset viewer.