kernel - change print*() functions for ipc to generic ipc hook functions.

- used to implement ipc stats tracking code
This commit is contained in:
Ben Gras
2011-02-08 13:54:33 +00:00
parent fa59fc6eb4
commit b2d1109737
5 changed files with 164 additions and 34 deletions

View File

@@ -79,8 +79,8 @@ PRIVATE void kernel_call_finish(struct proc * caller, message *msg, int result)
/* copy the result as a message to the original user buffer */
msg->m_source = SYSTEM;
msg->m_type = result; /* report status of call */
#if DEBUG_DUMPIPC
printmsgkresult(msg, caller);
#if DEBUG_IPC_HOOK
hook_ipc_msgkresult(msg, caller);
#endif
if (copy_msg_to_user(caller, msg,
(message *)caller->p_delivermsg_vir)) {
@@ -99,8 +99,8 @@ PRIVATE int kernel_call_dispatch(struct proc * caller, message *msg)
int result = OK;
int call_nr;
#if DEBUG_DUMPIPC
printmsgkcall(msg, caller);
#if DEBUG_IPC_HOOK
hook_ipc_msgkcall(msg, caller);
#endif
call_nr = msg->m_type - KERNEL_CALL;
@@ -553,6 +553,11 @@ register struct proc *rc; /* slot of process to clean up */
{
if(isemptyp(rc)) panic("clear_proc: empty process: %d", rc->p_endpoint);
#if DEBUG_IPC_HOOK
hook_ipc_clear(rc);
#endif
/* Make sure that the exiting process is no longer scheduled. */
RTS_SET(rc, RTS_NO_ENDPOINT);
if (priv(rc)->s_flags & SYS_PROC)