Rev 1502 | Rev 1573 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1502 | Rev 1568 | ||
|---|---|---|---|
| Line 176... | Line 176... | ||
| 176 | SPINLOCK_DECLARE(irq_lock); |
176 | SPINLOCK_DECLARE(irq_lock); |
| 177 | link_t irq_notifs; /**< Notifications from IRQ handlers */ |
177 | link_t irq_notifs; /**< Notifications from IRQ handlers */ |
| 178 | }; |
178 | }; |
| 179 | 179 | ||
| 180 | typedef enum { |
180 | typedef enum { |
| 181 | IPC_BUSY_FREE = 0, |
181 | IPC_PHONE_FREE = 0, /**< Phone is free and can be allocated */ |
| 182 | IPC_BUSY_CONNECTING, |
182 | IPC_PHONE_CONNECTING, /**< Phone is connecting somewhere */ |
| 183 | IPC_BUSY_CONNECTED |
183 | IPC_PHONE_CONNECTED, /**< Phone is connected */ |
| - | 184 | IPC_PHONE_HUNGUP, /**< Phone is hung up, waiting for answers to come */ |
|
| - | 185 | IPC_PHONE_SLAMMED /**< Phone was hungup from server */ |
|
| 184 | } ipc_busy_t; |
186 | } ipc_phone_state_t; |
| 185 | 187 | ||
| 186 | struct phone_s { |
188 | struct phone_s { |
| 187 | SPINLOCK_DECLARE(lock); |
189 | SPINLOCK_DECLARE(lock); |
| 188 | link_t list; |
190 | link_t list; |
| 189 | answerbox_t *callee; |
191 | answerbox_t *callee; |
| 190 | ipc_busy_t busy; |
192 | ipc_phone_state_t state; |
| 191 | atomic_t active_calls; |
193 | atomic_t active_calls; |
| 192 | }; |
194 | }; |
| 193 | 195 | ||
| 194 | typedef struct { |
196 | typedef struct { |
| 195 | link_t list; |
197 | link_t list; |
| Line 220... | Line 222... | ||
| 220 | extern void ipc_answerbox_init(answerbox_t *box); |
222 | extern void ipc_answerbox_init(answerbox_t *box); |
| 221 | extern void ipc_call_static_init(call_t *call); |
223 | extern void ipc_call_static_init(call_t *call); |
| 222 | extern void task_print_list(void); |
224 | extern void task_print_list(void); |
| 223 | extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox); |
225 | extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox); |
| 224 | extern void ipc_cleanup(task_t *task); |
226 | extern void ipc_cleanup(task_t *task); |
| 225 | extern int ipc_phone_hangup(phone_t *phone); |
227 | extern int ipc_phone_hangup(phone_t *phone, int aggressive); |
| 226 | extern void ipc_backsend_err(phone_t *phone, call_t *call, __native err); |
228 | extern void ipc_backsend_err(phone_t *phone, call_t *call, __native err); |
| 227 | 229 | ||
| 228 | extern answerbox_t *ipc_phone_0; |
230 | extern answerbox_t *ipc_phone_0; |
| 229 | 231 | ||
| 230 | #endif |
232 | #endif |