Ignore:
Timestamp:
Nov 19, 2020, 11:45:52 PM (3 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_barrier.c

    r637 r670  
    3333#include <remote_barrier.h>
    3434
    35 //////////////////////////////////////////////////////
    36 static char * sys_barrier_op_str( uint32_t operation )
    37 {
    38         if     ( operation == BARRIER_INIT    ) return "INIT";
    39         else if( operation == BARRIER_DESTROY ) return "DESTROY";
    40         else if( operation == BARRIER_WAIT    ) return "WAIT";
    41         else                                    return "undefined";
    42 }
    43 
    4435//////////////////////////////////
    4536int sys_barrier( intptr_t   vaddr,
     
    5546    process_t * process = this->process;
    5647
    57 #if (DEBUG_SYS_BARRIER || CONFIG_INSTRUMENTATION_SYSCALLS)
     48#if DEBUG_SYS_BARRIER || DEBUG_SYSCALLS_ERROR || CONFIG_INSTRUMENTATION_SYSCALLS
    5849uint64_t     tm_start = hal_get_cycles();
    5950#endif
     
    7263
    7364#if DEBUG_SYSCALLS_ERROR
     65if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
    7466printk("\n[ERROR] in %s for %s : unmapped barrier %x / thread[%x,%x]\n",
    7567__FUNCTION__, sys_barrier_op_str(operation), vaddr, process->pid, this->trdid );
     
    9284
    9385#if DEBUG_SYSCALLS_ERROR
     86if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
    9487printk("\n[ERROR] in %s for INIT : unmapped barrier attributes %x / thread[%x,%x]\n",
    9588__FUNCTION__ , attr , process->pid , this->trdid );
     
    108101
    109102#if DEBUG_SYSCALLS_ERROR
     103if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
    110104printk("\n[ERROR] in %s for INIT : count (%d) != x_size (%d) * y_size (%d) * nthreads (%x)\n",
    111105__FUNCTION__, count, k_attr.x_size, k_attr.y_size, k_attr.nthreads );
     
    128122
    129123#if DEBUG_SYSCALLS_ERROR
     124if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
    130125printk("\n[ERROR] in %s for INIT : cannot create barrier %x / thread[%x,%x]\n",
    131126__FUNCTION__ , vaddr , process->pid , this->trdid );
     
    145140
    146141#if DEBUG_SYSCALLS_ERROR
     142if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
    147143printk("\n[ERROR] in %s for WAIT : barrier %x not registered / thread[%x,%x]\n",
    148144__FUNCTION__ , (intptr_t)vaddr , process->pid, this->trdid );
     
    166162
    167163#if DEBUG_SYSCALLS_ERROR
     164if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start )
    168165printk("\n[ERROR] in %s for DESTROY : barrier %x not registered / thread[%x,%x]\n",
    169166__FUNCTION__ , (intptr_t)vaddr , process->pid, this->trdid );
     
    181178        default:
    182179        {
    183             assert ( false, "illegal operation type <%x>", operation );
     180            assert( __FUNCTION__, false, "illegal operation type <%x>", operation );
    184181        }
    185182        }  // end switch
Note: See TracChangeset for help on using the changeset viewer.