Changes in uspace/app/trace/trace.c [ce7676c:07b7c48] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/trace.c
rce7676c r07b7c48 43 43 #include <mem.h> 44 44 #include <str.h> 45 #include < bool.h>45 #include <stdbool.h> 46 46 #include <loader/loader.h> 47 47 #include <io/console.h> … … 136 136 } 137 137 138 free(task_ldr);139 138 task_ldr = NULL; 140 139 … … 318 317 } 319 318 320 static void sc_ipc_call_sync_fast(sysarg_t *sc_args)321 {322 ipc_call_t question, reply;323 int rc;324 int phoneid;325 326 phoneid = sc_args[0];327 328 IPC_SET_IMETHOD(question, sc_args[1]);329 IPC_SET_ARG1(question, sc_args[2]);330 IPC_SET_ARG2(question, sc_args[3]);331 IPC_SET_ARG3(question, sc_args[4]);332 IPC_SET_ARG4(question, 0);333 IPC_SET_ARG5(question, 0);334 335 memset(&reply, 0, sizeof(reply));336 rc = udebug_mem_read(sess, &reply.args, sc_args[5], sizeof(reply.args));337 if (rc < 0)338 return;339 340 ipcp_call_sync(phoneid, &question, &reply);341 }342 343 static void sc_ipc_call_sync_slow_b(unsigned thread_id, sysarg_t *sc_args)344 {345 ipc_call_t question;346 int rc;347 348 memset(&question, 0, sizeof(question));349 rc = udebug_mem_read(sess, &question.args, sc_args[1],350 sizeof(question.args));351 352 if (rc < 0) {353 printf("Error: mem_read->%d\n", rc);354 return;355 }356 357 thread_ipc_req[thread_id] = question;358 }359 360 static void sc_ipc_call_sync_slow_e(unsigned thread_id, sysarg_t *sc_args)361 {362 ipc_call_t reply;363 int rc;364 365 memset(&reply, 0, sizeof(reply));366 rc = udebug_mem_read(sess, &reply.args, sc_args[2],367 sizeof(reply.args));368 369 if (rc < 0) {370 printf("Error: mem_read->%d\n", rc);371 return;372 }373 374 ipcp_call_sync(sc_args[0], &thread_ipc_req[thread_id], &reply);375 }376 377 319 static void sc_ipc_wait(sysarg_t *sc_args, int sc_rc) 378 320 { … … 405 347 if ((display_mask & DM_SYSCALL) != 0) { 406 348 /* Print syscall name and arguments */ 407 printf("%s", syscall_desc[sc_id].name); 408 print_sc_args(sc_args, syscall_desc[sc_id].n_args); 409 } 410 411 switch (sc_id) { 412 case SYS_IPC_CALL_SYNC_SLOW: 413 sc_ipc_call_sync_slow_b(thread_id, sc_args); 414 break; 415 default: 416 break; 349 if (syscall_desc_defined(sc_id)) { 350 printf("%s", syscall_desc[sc_id].name); 351 print_sc_args(sc_args, syscall_desc[sc_id].n_args); 352 } 353 else { 354 printf("unknown_syscall<%d>", sc_id); 355 print_sc_args(sc_args, 6); 356 } 417 357 } 418 358 } … … 437 377 if ((display_mask & DM_SYSCALL) != 0) { 438 378 /* Print syscall return value */ 439 rv_type = syscall_desc[sc_id].rv_type; 379 if (syscall_desc_defined(sc_id)) 380 rv_type = syscall_desc[sc_id].rv_type; 381 else 382 rv_type = V_PTR; 440 383 print_sc_retval(sc_rc, rv_type); 441 384 } … … 447 390 case SYS_IPC_CALL_ASYNC_SLOW: 448 391 sc_ipc_call_async_slow(sc_args, sc_rc); 449 break;450 case SYS_IPC_CALL_SYNC_FAST:451 sc_ipc_call_sync_fast(sc_args);452 break;453 case SYS_IPC_CALL_SYNC_SLOW:454 sc_ipc_call_sync_slow_e(thread_id, sc_args);455 392 break; 456 393 case SYS_IPC_WAIT: … … 568 505 ldr = loader_connect(); 569 506 if (ldr == NULL) 570 return 0;507 return NULL; 571 508 572 509 /* Get task ID. */ … … 628 565 static int cev_fibril(void *arg) 629 566 { 567 cons_event_t event; 568 630 569 (void) arg; 631 570 … … 638 577 fibril_mutex_unlock(&state_lock); 639 578 640 if (!console_get_ kbd_event(console, &cev))579 if (!console_get_event(console, &event)) 641 580 return -1; 642 581 643 fibril_mutex_lock(&state_lock); 644 cev_valid = true; 645 fibril_condvar_broadcast(&state_cv); 646 fibril_mutex_unlock(&state_lock); 582 if (event.type == CEV_KEY) { 583 fibril_mutex_lock(&state_lock); 584 cev = event.ev.key; 585 cev_valid = true; 586 fibril_condvar_broadcast(&state_cv); 587 fibril_mutex_unlock(&state_lock); 588 } 647 589 } 648 590 }
Note:
See TracChangeset
for help on using the changeset viewer.