Changeset 9f22213 in mainline for generic/include/ipc/ipc.h


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

More IPC stuff, added correct closing of connections from both sides.

File:
1 edited

Legend:

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

    rb4b45210 r9f22213  
    3838
    3939/* Flags for calls */
    40 #define IPC_CALL_ANSWERED     (1<<0) /**< This is answer to a call */
    41 #define IPC_CALL_STATIC_ALLOC (1<<1) /**< This call will not be freed on error */
    42 #define IPC_CALL_DISPATCHED   (1<<2) /**< Call is in dispatch queue */
     40#define IPC_CALL_ANSWERED       (1<<0) /**< This is answer to a call */
     41#define IPC_CALL_STATIC_ALLOC   (1<<1) /**< This call will not be freed on error */
     42#define IPC_CALL_DISPATCHED     (1<<2) /**< Call is in dispatch queue */
    4343#define IPC_CALL_DISCARD_ANSWER (1<<3) /**< Answer will not be passed to
    4444                                        * userspace, will be discarded */
     45#define IPC_CALL_FORWARDED      (1<<4) /* Call was forwarded */
    4546
    4647/* Flags for ipc_wait_for_call */
     
    156157};
    157158
     159typedef enum {
     160        IPC_BUSY_FREE = 0,
     161        IPC_BUSY_CONNECTING,
     162        IPC_BUSY_CONNECTED
     163} ipc_busy_t;
     164
    158165struct phone_s {
    159166        SPINLOCK_DECLARE(lock);
    160167        link_t list;
    161168        answerbox_t *callee;
    162         int busy;
     169        ipc_busy_t busy;
    163170        atomic_t active_calls;
    164171};
     
    182189extern call_t * ipc_wait_for_call(answerbox_t *box, int flags);
    183190extern void ipc_answer(answerbox_t *box, call_t *request);
    184 extern void ipc_call(phone_t *phone, call_t *request);
     191extern int ipc_call(phone_t *phone, call_t *call);
    185192extern void ipc_call_sync(phone_t *phone, call_t *request);
    186193extern void ipc_phone_init(phone_t *phone);
     
    191198extern void ipc_call_static_init(call_t *call);
    192199extern void task_print_list(void);
    193 extern void ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox);
     200extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox);
    194201
    195202extern answerbox_t *ipc_phone_0;
Note: See TracChangeset for help on using the changeset viewer.