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/kernel_init.c

    r662 r669  
    140140    "KHM_STATE",             //  6
    141141    "HTAB_STATE",            //  7
    142 
    143     "VFS_CTX",               //  8
    144     "PPM_FREE",              //  9
    145     "THREAD_JOIN",           // 10
    146     "XHTAB_STATE",           // 11
    147     "CHDEV_QUEUE",           // 12
    148     "CHDEV_TXT0",            // 13
    149     "CHDEV_TXTLIST",         // 14
    150     "PAGE_STATE",            // 15
    151     "MUTEX_STATE",           // 16
    152     "CONDVAR_STATE",         // 17
    153     "SEM_STATE",             // 18
    154     "PROCESS_CWD",           // 19
    155     "BARRIER_STATE",         // 20
    156     "LISTEN_SOCKET",         // 21
    157 
    158     "CLUSTER_PREFTBL",       // 22
    159 
    160     "SOCKET_STATE",          // 23
    161     "PPM_DIRTY",             // 24
    162     "CLUSTER_LOCALS",        // 25
    163     "CLUSTER_COPIES",        // 26
    164     "PROCESS_CHILDREN",      // 27
    165     "PROCESS_USERSYNC",      // 28
    166     "PROCESS_FDARRAY",       // 29
    167     "PROCESS_DIR",           // 30
    168     "VMM_VSL",               // 31
    169 
    170     "PROCESS_THTBL",         // 32
    171 
    172     "MAPPER_STATE",          // 33
    173     "VFS_SIZE",              // 34
    174     "VFS_FILE",              // 35
    175     "VFS_MAIN",              // 36
    176     "FATFS_FAT",             // 37
    177     "FBF_WINDOWS",           // 38
     142    "CORE_ALARMS",           //  8
     143
     144    "VFS_CTX",               //  9
     145    "PPM_FREE",              // 10
     146    "THREAD_JOIN",           // 11
     147    "XHTAB_STATE",           // 12
     148    "CHDEV_QUEUE",           // 13
     149    "CHDEV_TXT0",            // 14
     150    "CHDEV_TXTLIST",         // 15
     151    "PAGE_STATE",            // 16
     152    "MUTEX_STATE",           // 17
     153    "CONDVAR_STATE",         // 18
     154    "SEM_STATE",             // 19
     155    "PROCESS_CWD",           // 20
     156    "BARRIER_STATE",         // 21
     157    "LISTEN_SOCKET",         // 22
     158
     159    "CLUSTER_PREFTBL",       // 23
     160
     161    "SOCKET_STATE",          // 24
     162    "PPM_DIRTY",             // 25
     163    "CLUSTER_LOCALS",        // 26
     164    "CLUSTER_COPIES",        // 27
     165    "PROCESS_CHILDREN",      // 28
     166    "PROCESS_USERSYNC",      // 29
     167    "PROCESS_FDARRAY",       // 30
     168    "PROCESS_DIR",           // 31
     169    "VMM_VSL",               // 32
     170
     171    "PROCESS_THTBL",         // 33
     172
     173    "MAPPER_STATE",          // 34
     174    "VFS_SIZE",              // 35
     175    "VFS_FILE",              // 36
     176    "VFS_MAIN",              // 37
     177    "FATFS_FAT",             // 38
     178    "FBF_WINDOWS",           // 39
    178179};       
    179180
     
    303304                                  LOCK_CHDEV_TXT0 );
    304305           
     306            // make TXT specific initialisations
     307            dev_txt_init( &txt0_tx_chdev );                 
     308
    305309            // initialize TXT_RX[0] chdev
    306310            txt0_rx_chdev.func    = func;
     
    313317           
    314318            // make TXT specific initialisations
    315             dev_txt_init( &txt0_tx_chdev );                 
    316319            dev_txt_init( &txt0_rx_chdev );
    317320
     
    12281231
    12291232            hal_remote_s32( XPTR( CONFIG_VFS_ROOT_CXY , &vfs_root_inode_ptr->type ),
    1230                             INODE_TYPE_DIR );
     1233                            FILE_TYPE_DIR );
    12311234
    12321235            hal_remote_spt( XPTR( CONFIG_VFS_ROOT_CXY , &vfs_root_inode_ptr->extend ),
     
    13721375
    13731376// check local FATFS and VFS context copies
    1374 assert( (((fatfs_ctx_t *)vfs_fat_ctx_ptr->extend)->sectors_per_cluster == 8),
    1375 "illegal FATFS context in cluster %x\n", local_cxy );
     1377assert( __FUNCTION__, (((fatfs_ctx_t *)vfs_fat_ctx_ptr->extend)->sectors_per_cluster == 8),
     1378"illegal FATFS context" );
    13761379
    13771380        }
     
    14681471    if( (core_lid == 0) && (local_cxy == 0) )
    14691472    {
    1470        process_init_create();
     1473        process_init_create();
    14711474    }
    14721475
Note: See TracChangeset for help on using the changeset viewer.