Rev 1090 | Rev 1281 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1090 | Rev 1258 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | #define IPC_CALL_STATIC_ALLOC (1<<1) /**< This call will not be freed on error */ |
41 | #define IPC_CALL_STATIC_ALLOC (1<<1) /**< This call will not be freed on error */ |
42 | #define IPC_CALL_DISCARD_ANSWER (1<<2) /**< Answer will not be passed to |
42 | #define IPC_CALL_DISCARD_ANSWER (1<<2) /**< Answer will not be passed to |
43 | * userspace, will be discarded */ |
43 | * userspace, will be discarded */ |
44 | #define IPC_CALL_FORWARDED (1<<3) /* Call was forwarded */ |
44 | #define IPC_CALL_FORWARDED (1<<3) /* Call was forwarded */ |
45 | #define IPC_CALL_CONN_ME_TO (1<<4) /* Identify connect_me_to */ |
45 | #define IPC_CALL_CONN_ME_TO (1<<4) /* Identify connect_me_to */ |
- | 46 | #define IPC_CALL_NOTIF (1<<5) /* Interrupt notification */ |
|
46 | 47 | ||
47 | /* Flags for ipc_wait_for_call */ |
48 | /* Flags for ipc_wait_for_call */ |
48 | #define IPC_WAIT_NONBLOCKING 1 |
49 | #define IPC_WAIT_NONBLOCKING 1 |
49 | 50 | ||
50 | /* Flags of callid (the addresses are aligned at least to 4, |
51 | /* Flags of callid (the addresses are aligned at least to 4, |
Line 117... | Line 118... | ||
117 | #define IPC_M_CONNECT_ME_TO 2 |
118 | #define IPC_M_CONNECT_ME_TO 2 |
118 | /** This message is sent to answerbox when the phone |
119 | /** This message is sent to answerbox when the phone |
119 | * is hung up |
120 | * is hung up |
120 | */ |
121 | */ |
121 | #define IPC_M_PHONE_HUNGUP 3 |
122 | #define IPC_M_PHONE_HUNGUP 3 |
- | 123 | /** Interrupt notification */ |
|
- | 124 | #define IPC_M_INTERRUPT 4 |
|
122 | 125 | ||
123 | 126 | ||
124 | /* Well-known methods */ |
127 | /* Well-known methods */ |
125 | #define IPC_M_LAST_SYSTEM 511 |
128 | #define IPC_M_LAST_SYSTEM 511 |
126 | #define IPC_M_PING 512 |
129 | #define IPC_M_PING 512 |
Line 152... | Line 155... | ||
152 | link_t connected_phones; /**< Phones connected to this answerbox */ |
155 | link_t connected_phones; /**< Phones connected to this answerbox */ |
153 | link_t calls; /**< Received calls */ |
156 | link_t calls; /**< Received calls */ |
154 | link_t dispatched_calls; /* Should be hash table in the future */ |
157 | link_t dispatched_calls; /* Should be hash table in the future */ |
155 | 158 | ||
156 | link_t answers; /**< Answered calls */ |
159 | link_t answers; /**< Answered calls */ |
- | 160 | ||
- | 161 | SPINLOCK_DECLARE(irq_lock); |
|
- | 162 | link_t irq_notifs; /**< Notifications from IRQ handlers */ |
|
157 | }; |
163 | }; |
158 | 164 | ||
159 | typedef enum { |
165 | typedef enum { |
160 | IPC_BUSY_FREE = 0, |
166 | IPC_BUSY_FREE = 0, |
161 | IPC_BUSY_CONNECTING, |
167 | IPC_BUSY_CONNECTING, |
Line 193... | Line 199... | ||
193 | extern int ipc_call(phone_t *phone, call_t *call); |
199 | extern int ipc_call(phone_t *phone, call_t *call); |
194 | extern void ipc_call_sync(phone_t *phone, call_t *request); |
200 | extern void ipc_call_sync(phone_t *phone, call_t *request); |
195 | extern void ipc_phone_init(phone_t *phone); |
201 | extern void ipc_phone_init(phone_t *phone); |
196 | extern void ipc_phone_connect(phone_t *phone, answerbox_t *box); |
202 | extern void ipc_phone_connect(phone_t *phone, answerbox_t *box); |
197 | extern void ipc_call_free(call_t *call); |
203 | extern void ipc_call_free(call_t *call); |
198 | extern call_t * ipc_call_alloc(void); |
204 | extern call_t * ipc_call_alloc(int flags); |
199 | extern void ipc_answerbox_init(answerbox_t *box); |
205 | extern void ipc_answerbox_init(answerbox_t *box); |
200 | extern void ipc_call_static_init(call_t *call); |
206 | extern void ipc_call_static_init(call_t *call); |
201 | extern void task_print_list(void); |
207 | extern void task_print_list(void); |
202 | extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox); |
208 | extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox); |
203 | extern void ipc_cleanup(task_t *task); |
209 | extern void ipc_cleanup(task_t *task); |
204 | extern int ipc_phone_hangup(phone_t *phone); |
210 | extern int ipc_phone_hangup(phone_t *phone); |
205 | extern void ipc_backsend_err(phone_t *phone, call_t *call, __native err); |
211 | extern void ipc_backsend_err(phone_t *phone, call_t *call, __native err); |
206 | 212 | ||
- | 213 | extern int ipc_irq_register(answerbox_t *box, int irq); |
|
- | 214 | extern void ipc_irq_send_notif(int irq); |
|
- | 215 | extern void ipc_irq_unregister(answerbox_t *box, int irq); |
|
- | 216 | ||
- | 217 | ||
207 | extern answerbox_t *ipc_phone_0; |
218 | extern answerbox_t *ipc_phone_0; |
208 | 219 | ||
209 | #endif |
220 | #endif |
210 | 221 | ||
211 | #endif |
222 | #endif |