Changeset 9ad5b5cc in mainline
- Timestamp:
- 2009-07-21T22:22:45Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c8404d4
- Parents:
- 6e3a44a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/trace.c
r6e3a44a r9ad5b5cc 44 44 #include <mem.h> 45 45 #include <string.h> 46 #include <bool.h> 46 47 #include <loader/loader.h> 47 48 #include <io/console.h> … … 69 70 70 71 int phoneid; 71 intabort_trace;72 bool abort_trace; 72 73 73 74 uintptr_t thash; 74 volatile intpaused;75 fibril_condvar_t state_cv;76 fibril_mutex_t state_lock;77 78 intcev_valid;79 console_event_t cev;75 static bool paused; 76 static fibril_condvar_t state_cv; 77 static fibril_mutex_t state_lock; 78 79 static bool cev_valid; 80 static console_event_t cev; 80 81 81 82 void thread_trace_start(uintptr_t thread_hash); … … 84 85 static task_id_t task_id; 85 86 static loader_t *task_ldr; 86 static inttask_wait_for;87 static bool task_wait_for; 87 88 88 89 /** Combination of events/data to print. */ … … 508 509 printf("Stop event\n"); 509 510 fibril_mutex_lock(&state_lock); 510 paused = 1;511 paused = true; 511 512 fibril_mutex_unlock(&state_lock); 512 513 break; … … 517 518 printf("Thread 0x%lx exited.\n", val0); 518 519 fibril_mutex_lock(&state_lock); 519 abort_trace = 1;520 abort_trace = true; 520 521 fibril_condvar_broadcast(&state_cv); 521 522 fibril_mutex_unlock(&state_lock); … … 628 629 629 630 fibril_mutex_lock(&state_lock); 630 cev_valid = 1;631 cev_valid = true; 631 632 fibril_condvar_broadcast(&state_cv); 632 633 fibril_mutex_unlock(&state_lock); … … 655 656 } 656 657 657 abort_trace = 0;658 abort_trace = false; 658 659 659 660 for (i = 0; i < n_threads; i++) { … … 694 695 case KC_R: 695 696 fibril_mutex_lock(&state_lock); 696 paused = 0;697 paused = false; 697 698 fibril_condvar_broadcast(&state_cv); 698 699 fibril_mutex_unlock(&state_lock); … … 703 704 704 705 printf("\nTerminate debugging session...\n"); 705 abort_trace = 1;706 abort_trace = true; 706 707 udebug_end(phoneid); 707 708 ipc_hangup(phoneid); … … 735 736 736 737 next_thread_id = 1; 737 paused = 0;738 cev_valid = 0;738 paused = false; 739 cev_valid = false; 739 740 740 741 fibril_mutex_initialize(&state_lock); … … 862 863 task_id = strtol(*argv, &err_p, 10); 863 864 task_ldr = NULL; 864 task_wait_for = 0;865 task_wait_for = false; 865 866 if (*err_p) { 866 867 printf("Task ID syntax error\n"); … … 900 901 } 901 902 task_ldr = preload_task(*argv, argv, &task_id); 902 task_wait_for = 1;903 task_wait_for = true; 903 904 904 905 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.