Ignore:
Timestamp:
Nov 7, 2017, 3:08:12 PM (5 years ago)
Author:
alain
Message:

First implementation of fork/exec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/chdev.h

    r346 r407  
    6666
    6767/******************************************************************************************
    68  * This define the generic prototypes for the two functions that must be defined
    69  * by all drivers implementing a generic device:
    70  * - "cmd"     : start an I/O operation.
     68 * This define the generic prototypes for the three functions that must be defined
     69 * by the drivers implementing a generic device:
     70 * - "cmd"     : start a blocking I/O operation.
    7171 * - "isr"     : complete an I/O operation.
    72  * The "cmd" and "isr" are registered in the generic chdev descriptor at kernel init,
    73  * and are called to start and complete an I/O operation. 
     72 * - "aux"     : not for all drivers (implement special functions)
     73 * The "cmd", "isr", and "aux" driver functions are registered in the generic chdev
     74 * descriptor at kernel init, and are called to start and complete an I/O operation. 
    7475*****************************************************************************************/
    7576
     
    7778typedef void (dev_cmd_t) ( xptr_t thread ); 
    7879typedef void (dev_isr_t) ( struct chdev_s * dev ); 
     80typedef void (dev_aux_t) ( void * args ); 
    7981
    8082/******************************************************************************************
     
    121123        uint32_t             impl;        /*! peripheral inplementation subtype              */
    122124    uint32_t             channel;     /*! channel index                                  */
    123     bool_t               is_rx;       /*! relevant for NIC peripheral channels only      */
     125    bool_t               is_rx;       /*! relevant for NIC and TXT peripherals           */
    124126        xptr_t               base;        /*! extended pointer on channel device segment     */
    125127    char                 name[16];    /*! name (required by DEVFS)                       */
    126128
    127     dev_cmd_t          * cmd;         /*! local pointer on driver command function       */
    128     dev_isr_t          * isr;         /*! local pointer on driver ISR function           */ 
     129    dev_cmd_t          * cmd;         /*! local pointer on driver CMD function           */
     130    dev_isr_t          * isr;         /*! local pointer on driver ISR function           */
     131    dev_aux_t          * aux;         /*! local pointer on driver AUX function           */
     132
    129133    struct thread_s    * server;      /*! local pointer on associated server thread      */
    130134
     
    165169    xptr_t   pic;                                // external / single channel / shared
    166170
    167     xptr_t   txt[CONFIG_MAX_TXT_CHANNELS];       // external / multi-channels / shared
    168171    xptr_t   ioc[CONFIG_MAX_IOC_CHANNELS];       // external / multi-channels / shared
    169172    xptr_t   fbf[CONFIG_MAX_FBF_CHANNELS];       // external / multi-channels / shared
     173    xptr_t   txt_rx[CONFIG_MAX_TXT_CHANNELS];    // external / multi-channels / shared
     174    xptr_t   txt_tx[CONFIG_MAX_TXT_CHANNELS];    // external / multi-channels / shared
    170175    xptr_t   nic_rx[CONFIG_MAX_NIC_CHANNELS];    // external / multi-channels / shared
    171176    xptr_t   nic_tx[CONFIG_MAX_NIC_CHANNELS];    // external / multi-channels / shared
     
    211216
    212217/******************************************************************************************
    213  * This function registers a local client thread in the waiting queue of a remote
     218 * This function registers the calling thread in the waiting queue of a remote
    214219 * chdev descriptor, activates (i.e. unblock) the server thread associated to chdev,
    215220 * and blocks itself on the THREAD_BLOCKED_IO condition.
    216221 ******************************************************************************************
    217222 * @ chdev_xp  : extended pointer on remote chdev descriptor.
    218  * @ thread    : local pointer on client thread.
    219  *****************************************************************************************/
    220 void chdev_register_command( xptr_t            chdev_xp,
    221                              struct thread_s * thread );
     223 *****************************************************************************************/
     224void chdev_register_command( xptr_t chdev_xp );
    222225
    223226/******************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.