Changeset 2ba7810 in mainline for generic/include/ipc/ipc.h


Ignore:
Timestamp:
2006-03-16T12:24:20Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b7dcabb
Parents:
d764ddc
Message:

Changed ipc to use spinlocks instead of mutexes again.
Fixed loading inits to set nameservice as the first loaded process.
Lot of TODO in ipc done.

File:
1 edited

Legend:

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

    rd764ddc r2ba7810  
    7272 * These methods have special behaviour
    7373 */
    74 #define IPC_M_IAMCONNECTING   0
    7574/** Protocol for CONNECT - TO - ME
    7675 *
     
    7877 * so that it can start initiating new messages.
    7978 *
    80  * The protocol for negotiating is as follows:
     79 * The protocol for negotiating is:
    8180 * - sys_connecttome - sends a message IPC_M_CONNECTTOME
    8281 * - sys_wait_for_call - upon receipt tries to allocate new phone
     
    8685 *                       error is sent back to caller. Otherwise
    8786 *                       the call is accepted and the response is sent back.
    88  *                     - the allocated phoneid is passed to userspace as
    89  *                       ARG3 of the call.
     87 *                     - the allocated phoneid is passed to userspace
     88 *                       (on the receiving sid) as ARG3 of the call.
    9089 *                     - the caller obtains taskid of the called thread
    9190 */
    9291#define IPC_M_CONNECTTOME     1
     92/** Protocol for CONNECT - ME - TO
     93 *
     94 * Calling process asks the callee to create for him a new connection.
     95 * E.g. the caller wants a name server to connect him to print server.
     96 *
     97 * The protocol for negotiating is:
     98 * - sys_connect_me_to - send a synchronous message to name server
     99 *                       indicating that it wants to be connected to some
     100 *                       service
     101 *   recepient         -  if ipc_answer == 0, then accept connection
     102 *                     -  otherwise connection refused
     103 *                     -  recepient may forward message. Forwarding
     104 *                        system message
     105 *
     106 */
    93107#define IPC_M_CONNECTMETO     2
     108/* Control messages that the server sends to the processes
     109 * about their connections.
     110 */
    94111
    95112
    96113/* Well-known methods */
    97 #define IPC_M_FIRST_USER      512
     114#define IPC_M_LAST_SYSTEM     511
    98115#define IPC_M_PING            512
    99116/* User methods */
     
    124141        task_t *task;
    125142
    126         mutex_t mutex;
    127         condvar_t cv;
     143        waitq_t wq;
    128144
    129145        link_t connected_phones; /**< Phones connected to this answerbox */
     
    138154        link_t list;
    139155        answerbox_t *callee;
     156        int busy;
    140157} phone_t;
    141158
     
    146163extern void ipc_call_sync(phone_t *phone, call_t *request);
    147164extern void ipc_phone_destroy(phone_t *phone);
    148 extern void ipc_phone_init(phone_t *phone, answerbox_t *box);
     165extern void ipc_phone_init(phone_t *phone);
     166extern void ipc_phone_connect(phone_t *phone, answerbox_t *box);
    149167extern void ipc_call_free(call_t *call);
    150168extern call_t * ipc_call_alloc(void);
    151169extern void ipc_answerbox_init(answerbox_t *box);
    152 extern void ipc_phone_init(phone_t *phone, answerbox_t *box);
    153170extern void ipc_call_init(call_t *call);
     171extern void ipc_forward(call_t *call, answerbox_t *newbox,answerbox_t *oldbox);
    154172
    155173extern answerbox_t *ipc_phone_0;
Note: See TracChangeset for help on using the changeset viewer.