Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2837 → Rev 2836

/branches/tracing/kernel/generic/src/ipc/ipc.c
614,18 → 614,13
{
call_t *call;
int method;
bool done;
ipl_t ipl;
 
(void)arg;
klog_printf("kbox_thread_proc()");
done = false;
 
while (!done) {
while (1) {
klog_printf("kbox: wait for call");
call = ipc_wait_for_call(&TASK->kernel_box, SYNCH_NO_TIMEOUT,
SYNCH_FLAGS_NONE);
 
if (call != NULL) {
method = IPC_GET_METHOD(call->data);
 
632,29 → 627,8
if (method == IPC_M_DEBUG_ALL) {
udebug_call_receive(call);
}
 
if (method == IPC_M_PHONE_HUNGUP) {
klog_printf("kbox: handle hangup message\n");
IPC_SET_RETVAL(call->data, 0);
ipc_answer(&TASK->kernel_box, call);
 
ipl = interrupts_disable();
spinlock_lock(&TASK->lock);
spinlock_lock(&TASK->answerbox.lock);
if (list_empty(&TASK->answerbox.connected_phones)) {
/* Last phone has been disconnected */
TASK->kb_thread = NULL;
done = true;
printf("phone list is empty\n");
}
spinlock_unlock(&TASK->answerbox.lock);
spinlock_unlock(&TASK->lock);
interrupts_restore(ipl);
}
}
}
 
klog_printf("kbox: finished");
}
 
/**
691,7 → 665,6
if (!ta->kb_thread)
return ENOMEM;
 
thread_detach(ta->kb_thread);
thread_ready(ta->kb_thread);
}
 
/branches/tracing/uspace/app/sctrace/sctrace.c
127,8 → 127,6
abort_trace = 1;
printf("keyboard fibril sending debug_end()\n");
debug_end(phoneid);
printf("keyboard fibril hanging up phone\n");
ipc_hangup(phoneid);
printf("keyboard fibril exitting\n");
 
return EOK;