Changeset 80bcaed in mainline for kernel/generic/include/ipc/ipc.h
- Timestamp:
- 2007-02-03T13:22:24Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f619ec11
- Parents:
- fa8e7d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ipc/ipc.h
rfa8e7d2 r80bcaed 48 48 49 49 /* Flags for calls */ 50 #define IPC_CALL_ANSWERED (1<<0) /**< This is answer to a call */ 51 #define IPC_CALL_STATIC_ALLOC (1<<1) /**< This call will not be freed on error */ 52 #define IPC_CALL_DISCARD_ANSWER (1<<2) /**< Answer will not be passed to userspace, will be discarded */ 53 #define IPC_CALL_FORWARDED (1<<3) /**< Call was forwarded */ 54 #define IPC_CALL_CONN_ME_TO (1<<4) /**< Identify connect_me_to answer */ 55 #define IPC_CALL_NOTIF (1<<5) /**< Interrupt notification */ 50 51 /** This is answer to a call */ 52 #define IPC_CALL_ANSWERED (1 << 0) 53 /** This call will not be freed on error */ 54 #define IPC_CALL_STATIC_ALLOC (1 << 1) 55 /** Answer will not be passed to userspace, will be discarded */ 56 #define IPC_CALL_DISCARD_ANSWER (1 << 2) 57 /** Call was forwarded */ 58 #define IPC_CALL_FORWARDED (1 << 3) 59 /** Identify connect_me_to answer */ 60 #define IPC_CALL_CONN_ME_TO (1 << 4) 61 /** Interrupt notification */ 62 #define IPC_CALL_NOTIF (1 << 5) 56 63 57 64 /* Flags of callid (the addresses are aligned at least to 4, 58 65 * that is why we can use bottom 2 bits of the call address 59 66 */ 60 #define IPC_CALLID_ANSWERED 1 /**< Type of this msg is 'answer' */ 61 #define IPC_CALLID_NOTIFICATION 2 /**< Type of this msg is 'notification' */ 67 /** Type of this msg is 'answer' */ 68 #define IPC_CALLID_ANSWERED 1 69 /** Type of this msg is 'notification' */ 70 #define IPC_CALLID_NOTIFICATION 2 62 71 63 72 /* Return values from IPC_ASYNC */ 64 #define IPC_CALLRET_FATAL 65 #define IPC_CALLRET_TEMPORARY 73 #define IPC_CALLRET_FATAL -1 74 #define IPC_CALLRET_TEMPORARY -2 66 75 67 76 68 77 /* Macros for manipulating calling data */ 69 #define IPC_SET_RETVAL(data, retval) 70 #define IPC_SET_METHOD(data, val) 71 #define IPC_SET_ARG1(data, val) 72 #define IPC_SET_ARG2(data, val) 73 #define IPC_SET_ARG3(data, val) 74 75 #define IPC_GET_METHOD(data) 76 #define IPC_GET_RETVAL(data) 77 78 #define IPC_GET_ARG1(data) 79 #define IPC_GET_ARG2(data) 80 #define IPC_GET_ARG3(data) 78 #define IPC_SET_RETVAL(data, retval) ((data).args[0] = (retval)) 79 #define IPC_SET_METHOD(data, val) ((data).args[0] = (val)) 80 #define IPC_SET_ARG1(data, val) ((data).args[1] = (val)) 81 #define IPC_SET_ARG2(data, val) ((data).args[2] = (val)) 82 #define IPC_SET_ARG3(data, val) ((data).args[3] = (val)) 83 84 #define IPC_GET_METHOD(data) ((data).args[0]) 85 #define IPC_GET_RETVAL(data) ((data).args[0]) 86 87 #define IPC_GET_ARG1(data) ((data).args[1]) 88 #define IPC_GET_ARG2(data) ((data).args[2]) 89 #define IPC_GET_ARG3(data) ((data).args[3]) 81 90 82 91 /* Well known phone descriptors */ 83 #define PHONE_NS 92 #define PHONE_NS 0 84 93 85 94 /* System-specific methods - only through special syscalls … … 167 176 168 177 typedef enum { 169 IPC_PHONE_FREE = 0, /**< Phone is free and can be allocated */ 170 IPC_PHONE_CONNECTING, /**< Phone is connecting somewhere */ 171 IPC_PHONE_CONNECTED, /**< Phone is connected */ 172 IPC_PHONE_HUNGUP, /**< Phone is hung up, waiting for answers to come */ 173 IPC_PHONE_SLAMMED /**< Phone was hungup from server */ 178 /** Phone is free and can be allocated */ 179 IPC_PHONE_FREE = 0, 180 /** Phone is connecting somewhere */ 181 IPC_PHONE_CONNECTING, 182 /** Phone is connected */ 183 IPC_PHONE_CONNECTED, 184 /** Phone is hung up, waiting for answers to come */ 185 IPC_PHONE_HUNGUP, 186 /** Phone was hungup from server */ 187 IPC_PHONE_SLAMMED 174 188 } ipc_phone_state_t; 175 189 … … 190 204 waitq_t wq; 191 205 192 link_t connected_phones; /**< Phones connected to this answerbox */ 193 link_t calls; /**< Received calls */ 206 /** Phones connected to this answerbox */ 207 link_t connected_phones; 208 /** Received calls */ 209 link_t calls; 194 210 link_t dispatched_calls; /* Should be hash table in the future */ 195 211 196 link_t answers; /**< Answered calls */ 212 /** Answered calls */ 213 link_t answers; 197 214 198 215 SPINLOCK_DECLARE(irq_lock); 199 link_t irq_notifs; /**< Notifications from IRQ handlers */ 200 link_t irq_head; /**< IRQs with notifications to this answerbox. */ 216 /** Notifications from IRQ handlers */ 217 link_t irq_notifs; 218 /** IRQs with notifications to this answerbox. */ 219 link_t irq_head; 201 220 } answerbox_t; 202 221 … … 218 237 answerbox_t *callerbox; 219 238 220 unative_t priv; /**< Private data to internal IPC */ 221 222 ipc_data_t data; /**< Data passed from/to userspace */ 239 /** Private data to internal IPC */ 240 unative_t priv; 241 242 /** Data passed from/to userspace */ 243 ipc_data_t data; 223 244 } call_t; 224 245
Note:
See TracChangeset
for help on using the changeset viewer.