Ignore:
Timestamp:
Nov 19, 2020, 11:45:52 PM (4 years ago)
Author:
alain
Message:

1) Introduce up to 4 command lines arguments in the KSH "load" command.
These arguments are transfered to the user process through the
argc/argv mechanism, using the user space "args" vseg.

2) Introduce the named and anonymous "pipes", for inter-process communication
through the pipe() and mkfifo() syscalls.

3) Introduce the "chat" application to validate the two above mechanisms.

4) Improve printk() and assert() fonctions in printk.c.

File:
1 edited

Legend:

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

    r637 r670  
    22 * sys_readdir.c - Copy one entry from an open VFS directory to an user buffer.
    33 *
    4  * Author    Alain Greiner (2016,2017,2018,2019)
     4 * Author    Alain Greiner (2016,2017,2018,2019,2020)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    5151        process_t * process = this->process;   // client process
    5252
    53 #if (DEBUG_SYS_READDIR || CONFIG_INSTRUMENTATION_SYSCALLS)
     53#if (DEBUG_SYS_READDIR || DEBUG_SYSCALLS_ERROR || CONFIG_INSTRUMENTATION_SYSCALLS)
    5454uint64_t     tm_start = hal_get_cycles();
    5555#endif
     
    6161#endif
    6262 
    63     // check buffer in user space
     63    // check dirent buffer in user space
    6464    error = vmm_get_vseg( process , (intptr_t)buffer, &vseg );
    6565
     
    6868
    6969#if DEBUG_SYSCALLS_ERROR
    70 printk("\n[ERROR] in %s / thread[%x,%x] : user buffer %x unmapped\n",
     70if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
     71printk("\n[ERROR] in %s : thread[%x,%x] / dirent user buffer %x unmapped\n",
    7172__FUNCTION__ , process->pid , this->trdid, buffer );
    7273#endif
     
    8485
    8586#if DEBUG_SYSCALLS_ERROR
    86 printk("\n[ERROR] in %s / thread[%x,%x] : dirp %x not registered\n",
     87if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
     88printk("\n[ERROR] in %s : thread[%x,%x] / dirp %x not registered\n",
    8789__FUNCTION__ , process->pid , this->trdid, dirp );
    8890#endif
     
    106108
    107109#if (DEBUG_SYS_READDIR & 1)
    108 if( DEBUG_SYS_READDIR < tm_start )
     110if( DEBUG_SYS_READDIR < (uint32_t)tm_start )
    109111printk("\n[%s] entries = %d / current = %d / direntp = %x\n",
    110112__FUNCTION__, entries, current, direntp );
     
    126128
    127129#if DEBUG_SYS_READDIR
    128 if( DEBUG_SYS_READDIR < tm_end )
     130if( DEBUG_SYS_READDIR < (uint32_t)tm_end )
    129131printk("\n[%s] thread[%x,%x] exit / cycle %d\n",
    130132__FUNCTION__, process->pid, this->trdid, (uint32_t)tm_end );
Note: See TracChangeset for help on using the changeset viewer.