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

First implementation of fork/exec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_txt.h

    r254 r407  
    3636 *
    3737 * This multi-channels generic TXT device provides access to a text terminal.
    38  * It supports three operation types :
     38 *
     39 * It supports two operations that must be implemented by the driver cmd() function:
    3940 * - TXT_READ : read a single character from the text terminal identified by its channel
    4041 *   index, using a descheduling strategy for the calling thread.
    4142 * - TXT_WRITE : write a character string to the text terminal identified by its channel
    4243 *   index, using a descheduling strategy for the calling thread.
    43  * - TXT_SYNC_WRITE : write a character string to the terminal identified by its channel
    44  *   index, using a busy waiting strategy for the calling thread.
     44 *
     45 * It supports one operation, that must be implemented by the driver aux() function 
     46 * - TXT_SYNC_WRITE write a character string to the TXT0 kernel terminal, using a busy
     47 *   waiting strategy for the calling thread.
    4548 *****************************************************************************************/
    4649
     
    5861
    5962/******************************************************************************************
    60  * This defines the (implementation independent) command passed to the driver.
     63 * This defines the arguments passed to the driver CMD function.
    6164 *****************************************************************************************/
    6265
     
    6568    TXT_READ       = 0,
    6669    TXT_WRITE      = 1,
    67     TXT_SYNC_WRITE = 2,
    6870};
    6971
     
    7779}
    7880txt_command_t;
     81
     82/******************************************************************************************
     83 * This defines the arguments passed to the driver AUX function.
     84 * This function implement the TXT_SYNC_WRITE operation.
     85 *****************************************************************************************/
     86
     87typedef struct txt_aux_s
     88{
     89    xptr_t      dev_xp;    /*! extended pointer on the TXT0 device descriptor            */
     90    char      * buffer;    /*! local pointer on characters array                         */
     91    uint32_t    count;     /*! number of characters in buffer                            */
     92}
     93txt_aux_t;
    7994
    8095/******************************************************************************************
     
    122137
    123138/***************************************************************************************
    124  * This low-level blocking function is used by the kernel to display one string on a
    125  * given TXT channel without descheduling the calling thread, without registering it
    126  * in the TXT device waiting queue, and without using the TXT irq.
     139 * This blocking function is used by the kernel to display a string on the TXT0
     140 * terminal, without descheduling the calling thread, without registering it
     141 * in the TXT0 device waiting queue, without using the TXT0 irq, and without
     142 * interfering with another possible TXT access to another terminal.
     143 * As it is used for debug, the command arguments <buffer> and <count> are registerd
     144 * in a specific "dbg_cmd" field of the calling thread.
     145 * other TXT accesses.
    127146 ****************************************************************************************
    128  * @ channel   : TXT channel index.
    129147 * @ buffer    : local pointer on source buffer containing the string.
    130148 * @ count     : number of characters.
    131149 * @ returns 0 if success / returns EINVAL if error.
    132150 ***************************************************************************************/
    133 error_t dev_txt_sync_write( uint32_t   channel,
    134                             char     * buffer,
     151error_t dev_txt_sync_write( char     * buffer,
    135152                            uint32_t   count );
    136153
Note: See TracChangeset for help on using the changeset viewer.