Ignore:
Timestamp:
Aug 13, 2018, 1:43:20 PM (6 years ago)
Author:
alain
Message:

Introduce the math library, to support the floating point
data used by the multi-thread fft application.
Fix several bugs regarding the FPU context save/restore.
Introduce support for the %f format in printf.

File:
1 edited

Legend:

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

    r457 r459  
    4646    process_t    * process  = this->process;
    4747
     48#if DEBUG_SYS_OPEN
     49uint32_t     tm_start;
     50uint32_t     tm_end;
     51tm_start = hal_get_cycles();
     52#endif
     53 
    4854    // check fd_array not full
    4955    if( process_fd_array_full() )
     
    6672    hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH );
    6773
     74#if DEBUG_SYS_OPEN
     75if( DEBUG_SYS_OPEN < tm_start )
     76printk("\n[DBG] %s : thread %x in process %x enter / path %s / flags %x / cycle %d\n",
     77__FUNCTION__, this->trdid, process->pid, kbuf, flags, (uint32_t)tm_start );
     78#endif
     79 
    6880    // get cluster and local pointer on reference process
    6981    xptr_t      ref_xp  = process->ref_xp;
     
    8799    if( error )
    88100    {
    89         printk("\n[ERROR] in %s : cannot create file descriptor\n", __FUNCTION__ );
     101        printk("\n[ERROR] in %s : cannot create file descriptor for %s\n",
     102        __FUNCTION__ , kbuf );
    90103        this->errno = ENFILE;
    91104        return -1;
     
    97110    remote_spinlock_unlock( XPTR( local_cxy , &process->fd_array.lock ) );
    98111
     112    hal_fence();
     113
     114#if DEBUG_SYS_OPEN
     115tm_end = hal_get_cycles();
     116if( DEBUG_SYS_OPEN < tm_start )
     117printk("\n[DBG] %s : thread %x in process %x exit / cost %d / cycle %d\n",
     118__FUNCTION__, this->trdid, process->pid, (uint32_t)(tm_end - tm_start), (uint32_t)tm_start );
     119#endif
     120 
    99121    return file_id;
    100122}
Note: See TracChangeset for help on using the changeset viewer.