Ignore:
Timestamp:
Nov 19, 2020, 11:44:34 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/kern/scheduler.c

    r651 r669  
    8585
    8686// check kernel threads list
    87 assert( (count < sched->k_threads_nr), "bad kernel threads list" );
     87assert( __FUNCTION__, (count < sched->k_threads_nr), "bad kernel threads list" );
    8888
    8989            // get next entry in kernel list
     
    119119
    120120// check user threads list
    121 assert( (count < sched->u_threads_nr), "bad user threads list" );
     121assert( __FUNCTION__, (count < sched->u_threads_nr), "bad user threads list" );
    122122
    123123            // get next entry in user list
     
    196196
    197197// check target thread blocked
    198 assert( (thread->blocked & THREAD_BLOCKED_GLOBAL) , "thread not blocked" );
     198assert( __FUNCTION__, (thread->blocked & THREAD_BLOCKED_GLOBAL) , "thread not blocked" );
    199199 
    200200            // decrement response counter
     
    210210
    211211// check calling thread != target thread
    212 assert( (thread != CURRENT_THREAD) , "calling thread cannot delete itself" );
     212assert( __FUNCTION__, (thread != CURRENT_THREAD) , "calling thread cannot delete itself" );
    213213 
    214214            // get thread process descriptor
     
    287287
    288288// check process descriptor is local kernel process
    289 assert( ( thread->process == &process_zero ) , "illegal process descriptor");
     289assert( __FUNCTION__, ( thread->process == &process_zero ) , "illegal process descriptor");
    290290
    291291            // get thread ltid
     
    322322
    323323// check th_nr value
    324 assert( (process_zero.th_nr > 0) , "kernel process th_nr cannot be 0" );
     324assert( __FUNCTION__, (process_zero.th_nr > 0) , "kernel process th_nr cannot be 0" );
    325325
    326326            // remove thread from process th_tbl[]
     
    495495// This assert should always be true, as this check has been
    496496// done before, by any function that can possibly deschedule...
    497 assert( (current->busylocks == 0),
     497assert( __FUNCTION__, (current->busylocks == 0),
    498498"current thread hold %d busylocks\n", current->busylocks );
    499499
     
    511511
    512512// check next thread kernel_stack overflow
    513 assert( (next->signature == THREAD_SIGNATURE),
     513assert( __FUNCTION__, (next->signature == THREAD_SIGNATURE),
    514514"kernel stack overflow for thread %x on core[%x,%d]", next, local_cxy, lid );
    515515
    516516// check next thread attached to same core as the current thread
    517 assert( (next->core == current->core),
     517assert( __FUNCTION__, (next->core == current->core),
    518518"next_core_lid %d / current_core_lid %d", current->core->lid, next->core->lid );
    519519   
    520520// check next thread not blocked when type != IDLE
    521 assert( ((next->blocked == 0) || (next->type == THREAD_IDLE)) ,
     521assert( __FUNCTION__, ((next->blocked == 0) || (next->type == THREAD_IDLE)) ,
    522522"next thread %x (%s) is blocked on core[%x,%d]",
    523523next->trdid , thread_type_str(next->type) , local_cxy , lid );
Note: See TracChangeset for help on using the changeset viewer.