Changeset 445 for trunk/kernel/syscalls


Ignore:
Timestamp:
May 29, 2018, 9:27:23 AM (6 years ago)
Author:
alain
Message:

Restructure the mini_libc.

Location:
trunk/kernel/syscalls
Files:
12 added
1 deleted
4 edited

Legend:

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

    r443 r445  
    244244        chdev_dir_display();
    245245    }
     246    ////////////////////////////////
     247    else if( type == DISPLAY_DQDT )
     248    {
     249        dqdt_display();
     250    }
    246251    ////
    247252    else
  • trunk/kernel/syscalls/sys_exit.c

    r443 r445  
    8686        thread_delete( XPTR( local_cxy , this ) , pid , true );
    8787    }
    88          
     88
    8989    // remove process from TXT list
    9090    process_txt_detach( owner_xp );
  • trunk/kernel/syscalls/sys_thread_yield.c

    r421 r445  
    2222 */
    2323
     24#include <hal_types.h>
     25#include <hal_special.h>
    2426#include <scheduler.h>
     27#include <thread.h>
    2528
    2629int sys_thread_yield()
    2730{
     31 
     32#if DEBUG_SYS_THREAD_YIELD
     33uint64_t     tm_start;
     34uint64_t     tm_end;
     35tm_start = hal_get_cycles();
     36if( DEBUG_SYS_THREAD_YIELD < tm_start )
     37printk("\n[DBG] %s : thread %x deschedule / process %x / cycle %d\n",
     38__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, (uint32_t)tm_start );
     39#endif
     40
     41    // deschedule
    2842        sched_yield("user request");
     43
     44#if DEBUG_SYS_THREAD_YIELD
     45tm_end = hal_get_cycles();
     46if( DEBUG_SYS_THREAD_YIELD < tm_start )
     47printk("\n[DBG] %s : thread %x resume / process %x / cycle %d\n",
     48__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, (uint32_t)tm_end );
     49#endif
     50
    2951        return 0;
    3052}
  • trunk/kernel/syscalls/syscalls.h

    r443 r445  
    195195 ******************************************************************************************
    196196 * @ pathname   : pathname (can be relative or absolute).
    197  * @ flags      : bit vector attributes (see below).
     197 * @ flags      : bit vector attributes (see in shared_fcntl.h file)
    198198 * @ mode       : access rights.
    199199 * @ return file descriptor index in fd_array if success / return -1 if failure.
     
    572572 * - DISPLAY_VFS             : all files registered in the VFS cache.
    573573 * - DISPLAY_CHDEV           : all registered channel devices.
     574 * - DISPLAY_DQDT            : all DQDT nodes.
    574575 ******************************************************************************************
    575576 * type      : [in] type of display
     
    622623int sys_fg( pid_t   pid );
    623624
     625/******************************************************************************************
     626 * [49] TBD
     627 ******************************************************************************************
     628 * @ cxy    : cluster identifier.
     629 * @ lid    : core local index.
     630 * @ return 0 if success / return -1 if failure.
     631 *****************************************************************************************/
    624632int sys_place( uint32_t cxy,
    625633               uint32_t lid );
Note: See TracChangeset for help on using the changeset viewer.