Ignore:
File:
1 edited

Legend:

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

    r3 r1  
    2525#define _DEV_IOC_H
    2626
    27 #include <almos_config.h>
    2827#include <hal_types.h>
    2928
    3029/****  Forward declarations  ****/
    3130
    32 struct chdev_s;
     31struct device_s;
    3332
    3433/*****************************************************************************************
     
    105104
    106105/******************************************************************************************
    107  * This function completes the IOC chdev descriptor initialisation,
     106 * This function completes the IOC device descriptor initialisation,
    108107 * namely the link with the implementation specific driver.
    109  * The func, impl, channel, is_rx, base fields have been previously initialised.
     108 * The func, impl, channel, is_rxt, base, and size fields must be previously initialised.
    110109 * It calls the specific driver initialisation function, to initialise the hardware
    111110 * device and the specific data structures when required.
    112  * It creates the associated server thread and allocates a WTI from local ICU.
    113  * It must de executed by a local thread.
     111 * It creates the associated server thread.
     112 * It can be executed in another cluster than the cluster containing the device descriptor
     113 * or the hardware device itself.
    114114 ******************************************************************************************
    115  * @ chdev     : local pointer on IOC chdev descriptor.
     115 * @ xp_dev     : extended pointer on IOC device descriptor.
    116116 *****************************************************************************************/
    117 void dev_ioc_init( struct chdev_s * chdev );
     117void dev_ioc_init( xptr_t  xp_dev );
    118118
    119119/******************************************************************************************
     
    149149                       uint32_t       count );
    150150
     151/******************************************************************************************
     152 * This function is executed by the server thread associated to the IOC device descriptor.
     153 * This thread is created and activated by the dev_ioc_init() function.
     154 * It executes an infinite loop to handle sequencially all commands registered
     155 * by the client threads in the device waiting queue, calling the driver CMD function.
     156 * 
     157 * - If the peripheral can only handle one single command, the driver block the server
     158 *   thread on the THREAD_BLOCKED_DEV_ISR condition, waiting I/O operation conmpletion.
     159 *   The server thread must be reacticated by the driver ISR function.
     160 * - If the peripheral can handle several commands in parallel (AHCI is an example), the
     161 *   driver does not block the server thread (it is only descheduled if the number of
     162 *   commands exceeeds the max number of parallel commands supported by the peripheral.
     163 *
     164 * When the waiting queue is empty, the server thread blocks on the THREAD_BLOCKED_CMD
     165 * condition and deschedule. It is re-activated by a client thread registering a command.
     166 ******************************************************************************************
     167 * @ dev     : local pointer on IOC device descriptor.
     168 *****************************************************************************************/
     169void dev_ioc_server( struct device_s * dev );
     170
    151171#endif  /* _DEV_IOC_H */
Note: See TracChangeset for help on using the changeset viewer.