Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2945 → Rev 2946

/branches/tracing/uspace/app/sctrace/sctrace.c
68,7 → 68,7
 
static proto_t *proto_console;
 
int task_connect(int taskid)
static int task_connect(int taskid)
{
int rc;
 
91,16 → 91,15
return 0;
}
 
int get_thread_list(void)
static int get_thread_list(void)
{
int rc;
int tb_copied;
int tb_needed;
size_t tb_copied;
size_t tb_needed;
int i;
 
 
printf("send IPC_M_DEBUG_THREAD_READ message\n");
rc = udebug_thread_read(phoneid, (unsigned)thread_hash_buf,
rc = udebug_thread_read(phoneid, thread_hash_buf,
THBUF_SIZE*sizeof(unsigned), &tb_copied, &tb_needed);
printf("-> %d\n", rc);
if (rc < 0) return rc;
116,7 → 115,7
return 0;
}
 
void print_sc_retval(int retval, rv_type_t rv_type)
static void print_sc_retval(int retval, rv_type_t rv_type)
{
printf (" -> ");
if (rv_type == RV_INTEGER) {
143,7 → 142,7
putchar('\n');
}
 
void print_sc_args(unsigned *sc_args, int n)
static void print_sc_args(unsigned *sc_args, int n)
{
int i;
 
155,7 → 154,7
putchar(')');
}
 
void sc_ipc_call_async_fast(unsigned *sc_args, int sc_rc)
static void sc_ipc_call_async_fast(unsigned *sc_args, int sc_rc)
{
ipc_call_t call;
int phoneid;
175,7 → 174,7
ipcp_call_out(phoneid, &call, sc_rc);
}
 
void sc_ipc_call_async_slow(unsigned *sc_args, int sc_rc)
static void sc_ipc_call_async_slow(unsigned *sc_args, int sc_rc)
{
ipc_call_t call;
int rc;
191,7 → 190,7
}
}
 
void sc_ipc_call_sync_fast(unsigned *sc_args)
static void sc_ipc_call_sync_fast(unsigned *sc_args)
{
ipc_call_t question, reply;
int rc;
219,7 → 218,7
ipcp_call_sync(phoneidx, &question, &reply);
}
 
void sc_ipc_call_sync_slow(unsigned *sc_args)
static void sc_ipc_call_sync_slow(unsigned *sc_args)
{
ipc_call_t question, reply;
int rc;
237,12 → 236,12
ipcp_call_sync(sc_args[0], &question, &reply);
}
 
void sc_ipc_wait(unsigned *sc_args, int sc_rc)
static void sc_ipc_wait(unsigned *sc_args, int sc_rc)
{
ipc_call_t call;
int rc;
 
if (sc_rc == 0) return 0;
if (sc_rc == 0) return;
 
memset(&call, 0, sizeof(call));
rc = udebug_mem_read(phoneid, &call, sc_args[0], sizeof(call));
254,10 → 253,9
}
}
 
void event_syscall_b(unsigned thread_id, unsigned thread_hash, unsigned sc_id, int sc_rc)
static void event_syscall_b(unsigned thread_id, unsigned thread_hash, unsigned sc_id, int sc_rc)
{
unsigned sc_args[6];
int rv_type;
int rc;
 
/* Read syscall arguments */
280,7 → 278,7
async_serialize_end();
}
 
void event_syscall_e(unsigned thread_id, unsigned thread_hash, unsigned sc_id, int sc_rc)
static void event_syscall_e(unsigned thread_id, unsigned thread_hash, unsigned sc_id, int sc_rc)
{
unsigned sc_args[6];
int rv_type;
325,7 → 323,7
async_serialize_end();
}
 
void event_thread_b(unsigned hash)
static void event_thread_b(unsigned hash)
{
async_serialize_start();
printf("new thread, hash 0x%x\n", hash);
334,7 → 332,7
thread_trace_start(hash);
}
 
void trace_loop(void *thread_hash_arg)
static int trace_loop(void *thread_hash_arg)
{
int rc;
unsigned ev_type;
393,6 → 391,7
}
 
printf("trace_loop(%d) exiting\n", thread_id);
return 0;
}
 
void thread_trace_start(unsigned thread_hash)
408,7 → 407,7
fibril_add_ready(fid);
}
 
void trace_active_task(void)
static void trace_active_task(void)
{
int taskid;
int i;