Ignore:
Timestamp:
Dec 5, 2017, 4:20:07 PM (6 years ago)
Author:
alain
Message:

Fix several bugs in the fork() syscall.

File:
1 edited

Legend:

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

    r407 r408  
    6161        xptr_t       file_xp;     // remote file extended pointer
    6262    uint32_t     nbytes;      // number of bytes actually read
    63 
     63    reg_t        save_sr;     // required to enable IRQs during syscall
    6464        uint32_t     tm_start;
    6565        uint32_t     tm_end;
     
    9393                return -1;
    9494    }
     95
     96    // enable IRQs
     97    hal_enable_irq( &save_sr );
    9598
    9699    // get extended pointer on remote file descriptor
     
    150153        return -1;
    151154    }
     155
     156    // restore IRQs
     157    hal_restore_irq( save_sr );
    152158
    153159    hal_fence();
     
    190196#endif
    191197
    192 syscall_dmsg("\n[DBG] %s : core[%x,%d] / thread %x / nbytes = %d / cycle %d\n"
    193 " first byte = %c / file_id = %d / cost = %d\n",
    194 __FUNCTION__ , local_cxy , this->core->lid , this->trdid , nbytes , tm_start ,
    195 *((char *)(intptr_t)paddr) , file_id , tm_end - tm_start );
     198syscall_dmsg("\n[DBG] %s : core[%x,%d] / thread %x in process %x / cycle %d\n"
     199"nbytes = %d / first byte = %c / file_id = %d / cost = %d\n",
     200__FUNCTION__ , local_cxy , this->core->lid , this->trdid , this->process->pid ,
     201tm_start , nbytes , *((char *)(intptr_t)paddr) , file_id , tm_end - tm_start );
    196202 
    197203        return nbytes;
Note: See TracChangeset for help on using the changeset viewer.