Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2945 → Rev 2946

/branches/tracing/uspace/app/debug/main.c
105,6 → 105,10
len = strlen(cmd_argv[0]);
cmp_len = 1;
 
/* Silence warnings */
num_found = 0;
idx_found = 0;
 
while (cmp_len <= len + 1) {
 
num_found = 0;
198,8 → 202,8
static int get_thread_list(thash_t **thash_buf_ptr, int *n)
{
int rc;
int tb_copied;
int tb_needed;
size_t tb_copied;
size_t tb_needed;
int i;
size_t tb_size;
thash_t *thash_buf;
207,7 → 211,7
tb_size = THASH_BUF_INIT_LENGTH * sizeof(thash_t);
thash_buf = malloc(tb_size);
 
rc = udebug_thread_read(app_phone, (sysarg_t)thash_buf,
rc = udebug_thread_read(app_phone, thash_buf,
tb_size, &tb_copied, &tb_needed);
if (rc < 0) return rc;
 
226,7 → 230,7
 
/* Try again */
rc = udebug_thread_read(app_phone, (sysarg_t)thash_buf,
rc = udebug_thread_read(app_phone, thash_buf,
tb_size, &tb_copied, &tb_needed);
 
if (rc < 0) return rc;
247,7 → 251,7
return 0;
}
 
void event_thread_b(unsigned hash)
static void event_thread_b(unsigned hash)
{
async_serialize_start();
cons_printf("new thread, hash 0x%x\n", hash);
256,8 → 260,6
thread_debug_start(hash);
}
 
static unsigned buffer[1024];
 
static void debug_event(thash_t thash, udebug_event_t ev_type, sysarg_t val0)
{
switch (ev_type) {
284,11 → 286,10
}
}
 
void debug_loop(void *dt_arg)
static int debug_loop(void *dt_arg)
{
int rc;
udebug_event_t ev_type;
unsigned thread_buf_idx;
unsigned val0, val1;
dthread_t *dt;
 
309,6 → 310,7
}
 
cons_printf("debug_loop(%d) exiting\n", dt->id);
return 0;
}
 
void thread_debug_start(unsigned thash)
327,12 → 329,11
fibril_add_ready(fid);
}
 
void debug_active_task(void)
static void debug_active_task(void)
{
int taskid;
int i;
int rc;
int c;
 
thash_t *thash_buffer;
int n_threads;