Changeset d8f7362 in mainline
- Timestamp:
- 2006-06-05T22:19:02Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c74804f
- Parents:
- b65caba1
- Location:
- generic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/ipc/ipc.h
rb65caba1 rd8f7362 226 226 extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox); 227 227 void ipc_cleanup(void); 228 extern int ipc_phone_hangup(phone_t *phone, int aggressive);228 int ipc_phone_hangup(phone_t *phone); 229 229 extern void ipc_backsend_err(phone_t *phone, call_t *call, __native err); 230 230 extern void ipc_print_task(task_id_t taskid); -
generic/src/ipc/ipc.c
rb65caba1 rd8f7362 238 238 * 239 239 * @param phone Phone to be hung up 240 * @param aggressive If false, the phone is only marked hungup, and all241 * messages are allowed to complete.242 * If true, all messages in all queues are discarded. There243 * may still be some messages that will be 'in-transit' on244 * other CPU.245 240 * 246 241 * @return 0 - phone disconnected, -1 - the phone was already disconnected 247 242 */ 248 int ipc_phone_hangup(phone_t *phone , int aggressive)243 int ipc_phone_hangup(phone_t *phone) 249 244 { 250 245 answerbox_t *box; … … 270 265 _ipc_call(phone, box, call); 271 266 } 272 }273 274 if (aggressive && atomic_get(&phone->active_calls) > 0) {275 /* TODO: Do some stuff be VERY aggressive */276 267 } 277 268 … … 383 374 /* Disconnect all our phones ('ipc_phone_hangup') */ 384 375 for (i=0;i < IPC_MAX_PHONES; i++) 385 ipc_phone_hangup(&TASK->phones[i] , 1);376 ipc_phone_hangup(&TASK->phones[i]); 386 377 387 378 /* Disconnect all connected irqs */ … … 422 413 TASK->phones[i].state = IPC_PHONE_FREE; 423 414 415 /* Just for sure, we might have had some 416 * IPC_PHONE_CONNECTING phones */ 424 417 if (TASK->phones[i].state == IPC_PHONE_CONNECTED) 425 ipc_phone_hangup(&TASK->phones[i], 1); 418 ipc_phone_hangup(&TASK->phones[i]); 419 /* If the hangup succeeded, it has sent a HANGUP 420 * message, the IPC is now in HUNGUP state, we 421 * wait for the reply to come */ 426 422 427 423 if (TASK->phones[i].state != IPC_PHONE_FREE) -
generic/src/ipc/irq.c
rb65caba1 rd8f7362 216 216 if (irq_conns[irq].box) { 217 217 call = ipc_call_alloc(FRAME_ATOMIC); 218 if (!call) { 219 spinlock_unlock(&irq_conns[irq].lock); 220 return; 221 } 218 222 call->flags |= IPC_CALL_NOTIF; 219 223 IPC_SET_METHOD(call->data, IPC_M_INTERRUPT); -
generic/src/ipc/sysipc.c
rb65caba1 rd8f7362 493 493 GET_CHECK_PHONE(phone, phoneid, return ENOENT); 494 494 495 if (ipc_phone_hangup(phone , 0))495 if (ipc_phone_hangup(phone)) 496 496 return -1; 497 497
Note:
See TracChangeset
for help on using the changeset viewer.