Changeset 8b243f2 in mainline for kernel/generic/include/ipc/ipc.h


Ignore:
Timestamp:
2007-06-17T19:34:36Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bd72c3e9
Parents:
4680ef5
Message:

Greatly improve comments in the IPC layer.
Now I think I finally start to understand our IPC internals :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ipc/ipc.h

    r4680ef5 r8b243f2  
    3838/* Length of data being transfered with IPC call */
    3939/* - the uspace may not be able to utilize full length */
    40 #define IPC_CALL_LEN    4
     40#define IPC_CALL_LEN            4
    4141
    4242/** Maximum active async calls per thread */
    4343#ifdef CONFIG_DEBUG
    44 # define IPC_MAX_ASYNC_CALLS  4
     44#define IPC_MAX_ASYNC_CALLS     4
    4545#else
    46 # define IPC_MAX_ASYNC_CALLS  4000
     46#define IPC_MAX_ASYNC_CALLS     4000
    4747#endif
    4848
     
    6262#define IPC_CALL_NOTIF          (1 << 5)
    6363
    64 /* Flags of callid (the addresses are aligned at least to 4,
    65  * that is why we can use bottom 2 bits of the call address
    66  */
    67 /** Type of this msg is 'answer' */
     64/*
     65 * Bits used in call hashes.
     66 * The addresses are aligned at least to 4 that is why we can use the 2 least
     67 * significant bits of the call address.
     68 */
     69/** Type of this call is 'answer' */
    6870#define IPC_CALLID_ANSWERED     1
    69 /** Type of this msg is 'notification' */
     71/** Type of this call is 'notification' */
    7072#define IPC_CALLID_NOTIFICATION 2
    7173
    72 /* Return values from IPC_ASYNC */
     74/* Return values from sys_ipc_call_async(). */
    7375#define IPC_CALLRET_FATAL       -1
    7476#define IPC_CALLRET_TEMPORARY   -2
     
    112114 *                     - the caller obtains taskid of the called thread
    113115 */
    114 #define IPC_M_CONNECT_TO_ME     1
     116#define IPC_M_CONNECT_TO_ME     1
    115117/** Protocol for CONNECT - ME - TO
    116118 *
     
    131133 *
    132134 */
    133 #define IPC_M_CONNECT_ME_TO     2
     135#define IPC_M_CONNECT_ME_TO     2
    134136/** This message is sent to answerbox when the phone
    135137 * is hung up
    136138 */
    137 #define IPC_M_PHONE_HUNGUP      3
     139#define IPC_M_PHONE_HUNGUP      3
    138140
    139141/** Send as_area over IPC
     
    145147 * - ARG1 - dst as_area base adress
    146148 */
    147 #define IPC_M_AS_AREA_SEND      5
     149#define IPC_M_AS_AREA_SEND      5
    148150
    149151/** Get as_area over IPC
     
    157159 * - ARG2 - flags that will be used for sharing
    158160 */
    159 #define IPC_M_AS_AREA_RECV      6
     161#define IPC_M_AS_AREA_RECV      6
    160162
    161163
    162164/* Well-known methods */
    163 #define IPC_M_LAST_SYSTEM     511
    164 #define IPC_M_PING            512
     165#define IPC_M_LAST_SYSTEM       511
     166#define IPC_M_PING              512
    165167/* User methods */
    166 #define FIRST_USER_METHOD     1024
     168#define FIRST_USER_METHOD       1024
    167169
    168170#ifdef KERNEL
     
    204206        waitq_t wq;
    205207
    206         /** Phones connected to this answerbox */
     208        /** Phones connected to this answerbox. */
    207209        link_t connected_phones;
    208         /** Received calls */
     210        /** Received calls. */
    209211        link_t calls;                   
    210212        link_t dispatched_calls;        /* Should be hash table in the future */
    211213
    212         /** Answered calls */
     214        /** Answered calls. */
    213215        link_t answers;
    214216
    215217        SPINLOCK_DECLARE(irq_lock);
    216         /** Notifications from IRQ handlers */
     218        /** Notifications from IRQ handlers. */
    217219        link_t irq_notifs;
    218220        /** IRQs with notifications to this answerbox. */
     
    230232        int flags;
    231233
    232         /* Identification of the caller */
     234        /** Identification of the caller. */
    233235        struct task *sender;
    234         /* The caller box is different from sender->answerbox
    235          * for synchronous calls
    236          */
     236        /** The caller box is different from sender->answerbox for synchronous
     237         *  calls. */
    237238        answerbox_t *callerbox;
    238239
    239         /** Private data to internal IPC */
     240        /** Private data to internal IPC. */
    240241        unative_t priv;
    241242
    242         /** Data passed from/to userspace */
     243        /** Data passed from/to userspace. */
    243244        ipc_data_t data;
    244245} call_t;
Note: See TracChangeset for help on using the changeset viewer.