Changeset 12573db in mainline for uspace/app
- Timestamp:
- 2011-01-31T20:32:33Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 37cf3792
- Parents:
- 4fe94c66 (diff), 197ef43 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/app
- Files:
-
- 2 deleted
- 18 edited
-
init/init.c (modified) (1 diff)
-
klog/klog.c (modified) (3 diffs)
-
ping/ping.c (modified) (4 diffs)
-
stats/stats.c (modified) (3 diffs)
-
taskdump/taskdump.c (modified) (4 diffs)
-
tasks/Makefile (deleted)
-
tasks/tasks.c (deleted)
-
tester/hw/misc/virtchar1.c (modified) (1 diff)
-
tester/hw/serial/serial1.c (modified) (8 diffs)
-
tester/tester.h (modified) (1 diff)
-
tetris/screen.h (modified) (1 diff)
-
top/screen.c (modified) (3 diffs)
-
top/top.c (modified) (3 diffs)
-
top/top.h (modified) (1 diff)
-
trace/ipc_desc.c (modified) (1 diff)
-
trace/ipcp.h (modified) (1 diff)
-
trace/proto.c (modified) (1 diff)
-
trace/proto.h (modified) (1 diff)
-
trace/syscalls.c (modified) (2 diffs)
-
trace/trace.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
r4fe94c66 r12573db 37 37 #include <stdio.h> 38 38 #include <unistd.h> 39 #include <ipc/ipc.h>40 39 #include <vfs/vfs.h> 41 40 #include <bool.h> -
uspace/app/klog/klog.c
r4fe94c66 r12573db 36 36 37 37 #include <stdio.h> 38 #include <ipc/ipc.h>39 38 #include <async.h> 40 #include <ipc/services.h>41 39 #include <as.h> 42 #include < sysinfo.h>40 #include <ddi.h> 43 41 #include <event.h> 44 42 #include <errno.h> 45 43 #include <str_error.h> 46 44 #include <io/klog.h> 45 #include <sysinfo.h> 47 46 48 47 #define NAME "klog" … … 79 78 int main(int argc, char *argv[]) 80 79 { 81 size_t klog_pages; 82 if (sysinfo_get_value("klog.pages", &klog_pages) != EOK) { 83 printf("%s: Error getting klog address\n", NAME); 84 return -1; 80 size_t pages; 81 int rc = sysinfo_get_value("klog.pages", &pages); 82 if (rc != EOK) { 83 fprintf(stderr, "%s: Unable to get number of klog pages\n", 84 NAME); 85 return rc; 85 86 } 86 87 87 size_t klog_size = klog_pages * PAGE_SIZE; 88 klog_length = klog_size / sizeof(wchar_t); 89 90 klog = (wchar_t *) as_get_mappable_page(klog_size); 91 if (klog == NULL) { 92 printf("%s: Error allocating memory area\n", NAME); 93 return -1; 88 uintptr_t faddr; 89 rc = sysinfo_get_value("klog.faddr", &faddr); 90 if (rc != EOK) { 91 fprintf(stderr, "%s: Unable to get klog physical address\n", 92 NAME); 93 return rc; 94 94 } 95 95 96 int res = async_share_in_start_1_0(PHONE_NS, (void *) klog, 97 klog_size, SERVICE_MEM_KLOG); 98 if (res != EOK) { 99 printf("%s: Error initializing memory area\n", NAME); 100 return -1; 96 size_t size = pages * PAGE_SIZE; 97 klog_length = size / sizeof(wchar_t); 98 99 klog = (wchar_t *) as_get_mappable_page(size); 100 if (klog == NULL) { 101 fprintf(stderr, "%s: Unable to allocate virtual memory area\n", 102 NAME); 103 return ENOMEM; 101 104 } 102 105 103 if (event_subscribe(EVENT_KLOG, 0) != EOK) { 104 printf("%s: Error registering klog notifications\n", NAME); 105 return -1; 106 rc = physmem_map((void *) faddr, (void *) klog, pages, 107 AS_AREA_READ | AS_AREA_CACHEABLE); 108 if (rc != EOK) { 109 fprintf(stderr, "%s: Unable to map klog\n", NAME); 110 return rc; 111 } 112 113 rc = event_subscribe(EVENT_KLOG, 0); 114 if (rc != EOK) { 115 fprintf(stderr, "%s: Unable to register klog notifications\n", 116 NAME); 117 return rc; 106 118 } 107 119 … … 109 121 * Mode "a" would be definitively much better here, but it is 110 122 * not well supported by the FAT driver. 111 *112 123 */ 113 124 log = fopen(LOG_FNAME, "w"); -
uspace/app/ping/ping.c
r4fe94c66 r12573db 35 35 */ 36 36 37 #include <async.h> 37 38 #include <stdio.h> 38 39 #include <str.h> 39 40 #include <task.h> 40 41 #include <time.h> 41 #include <ipc/ipc.h>42 42 #include <ipc/services.h> 43 43 #include <str_error.h> … … 355 355 str_error(ret)); 356 356 357 ipc_hangup(icmp_phone);357 async_hangup(icmp_phone); 358 358 return ret; 359 359 } … … 370 370 str_error(ret)); 371 371 372 ipc_hangup(icmp_phone);372 async_hangup(icmp_phone); 373 373 return ret; 374 374 } … … 390 390 } 391 391 392 ipc_hangup(icmp_phone);392 async_hangup(icmp_phone); 393 393 394 394 return 0; -
uspace/app/stats/stats.c
r4fe94c66 r12573db 1 1 /* 2 2 * Copyright (c) 2010 Stanislav Kozina 3 * Copyright (c) 2010 Martin Decky 3 4 * All rights reserved. 4 5 * … … 36 37 37 38 #include <stdio.h> 39 #include <task.h> 40 #include <thread.h> 38 41 #include <stats.h> 39 #include <sys/time.h> 42 #include <errno.h> 43 #include <stdlib.h> 44 #include <malloc.h> 40 45 #include <inttypes.h> 41 #include <malloc.h> 42 43 #define NAME "sysstat" 46 #include <bool.h> 47 #include <str.h> 48 #include <arg_parse.h> 49 50 #define NAME "stats" 44 51 45 52 #define DAY 86400 … … 47 54 #define MINUTE 60 48 55 49 int main(int argc, char *argv[]) 50 { 51 struct timeval time; 52 if (gettimeofday(&time, NULL) != 0) { 53 fprintf(stderr, "%s: Cannot get time of day\n", NAME); 54 return -1; 55 } 56 57 uint64_t sec = time.tv_sec; 58 printf("%02" PRIu64 ":%02" PRIu64 ":%02" PRIu64, 59 (sec % DAY) / HOUR, (sec % HOUR) / MINUTE, sec % MINUTE); 60 56 static void list_tasks(void) 57 { 58 size_t count; 59 stats_task_t *stats_tasks = stats_get_tasks(&count); 60 61 if (stats_tasks == NULL) { 62 fprintf(stderr, "%s: Unable to get tasks\n", NAME); 63 return; 64 } 65 66 printf("[taskid] [thrds] [resident] [virtual] [ucycles]" 67 " [kcycles] [name\n"); 68 69 size_t i; 70 for (i = 0; i < count; i++) { 71 uint64_t resmem, virtmem, ucycles, kcycles; 72 char resmem_suffix, virtmem_suffix, usuffix, ksuffix; 73 74 order_suffix(stats_tasks[i].resmem, &resmem, &resmem_suffix); 75 order_suffix(stats_tasks[i].virtmem, &virtmem, &virtmem_suffix); 76 order_suffix(stats_tasks[i].ucycles, &ucycles, &usuffix); 77 order_suffix(stats_tasks[i].kcycles, &kcycles, &ksuffix); 78 79 printf("%-8" PRIu64 " %7zu %9" PRIu64 "%c %8" PRIu64 "%c" 80 " %8" PRIu64 "%c %8" PRIu64 "%c %s\n", 81 stats_tasks[i].task_id, stats_tasks[i].threads, 82 resmem, resmem_suffix, virtmem, virtmem_suffix, 83 ucycles, usuffix, kcycles, ksuffix, stats_tasks[i].name); 84 } 85 86 free(stats_tasks); 87 } 88 89 static void list_threads(task_id_t task_id, bool all) 90 { 91 size_t count; 92 stats_thread_t *stats_threads = stats_get_threads(&count); 93 94 if (stats_threads == NULL) { 95 fprintf(stderr, "%s: Unable to get threads\n", NAME); 96 return; 97 } 98 99 printf("[taskid] [threadid] [state ] [prio] [cpu ] [ucycles] [kcycles]\n"); 100 101 size_t i; 102 for (i = 0; i < count; i++) { 103 if ((all) || (stats_threads[i].task_id == task_id)) { 104 uint64_t ucycles, kcycles; 105 char usuffix, ksuffix; 106 107 order_suffix(stats_threads[i].ucycles, &ucycles, &usuffix); 108 order_suffix(stats_threads[i].kcycles, &kcycles, &ksuffix); 109 110 printf("%-8" PRIu64 " %-10" PRIu64 " %-8s %6d ", 111 stats_threads[i].task_id, stats_threads[i].thread_id, 112 thread_get_state(stats_threads[i].state), 113 stats_threads[i].priority); 114 115 if (stats_threads[i].on_cpu) 116 printf("%6u ", stats_threads[i].cpu); 117 else 118 printf("(none) "); 119 120 printf("%8" PRIu64"%c %8" PRIu64"%c\n", 121 ucycles, usuffix, kcycles, ksuffix); 122 } 123 } 124 125 free(stats_threads); 126 } 127 128 static void list_cpus(void) 129 { 130 size_t count; 131 stats_cpu_t *cpus = stats_get_cpus(&count); 132 133 if (cpus == NULL) { 134 fprintf(stderr, "%s: Unable to get CPU statistics\n", NAME); 135 return; 136 } 137 138 printf("[id] [MHz ] [busy cycles] [idle cycles]\n"); 139 140 size_t i; 141 for (i = 0; i < count; i++) { 142 printf("%-4u ", cpus[i].id); 143 if (cpus[i].active) { 144 uint64_t bcycles, icycles; 145 char bsuffix, isuffix; 146 147 order_suffix(cpus[i].busy_cycles, &bcycles, &bsuffix); 148 order_suffix(cpus[i].idle_cycles, &icycles, &isuffix); 149 150 printf("%10" PRIu16 " %12" PRIu64 "%c %12" PRIu64 "%c\n", 151 cpus[i].frequency_mhz, bcycles, bsuffix, 152 icycles, isuffix); 153 } else 154 printf("inactive\n"); 155 } 156 157 free(cpus); 158 } 159 160 static void print_load(void) 161 { 162 size_t count; 163 load_t *load = stats_get_load(&count); 164 165 if (load == NULL) { 166 fprintf(stderr, "%s: Unable to get load\n", NAME); 167 return; 168 } 169 170 printf("%s: Load average: ", NAME); 171 172 size_t i; 173 for (i = 0; i < count; i++) { 174 if (i > 0) 175 printf(" "); 176 177 stats_print_load_fragment(load[i], 2); 178 } 179 180 printf("\n"); 181 182 free(load); 183 } 184 185 static void print_uptime(void) 186 { 61 187 sysarg_t uptime = stats_get_uptime(); 62 printf(" , up %" PRIun " days, %" PRIun " hours, "63 "%" PRIun " minutes, %" PRIun " seconds ",188 printf("%s: Up %" PRIun " days, %" PRIun " hours, " 189 "%" PRIun " minutes, %" PRIun " seconds\n", NAME, 64 190 uptime / DAY, (uptime % DAY) / HOUR, 65 191 (uptime % HOUR) / MINUTE, uptime % MINUTE); 66 67 size_t count; 68 load_t *load = stats_get_load(&count); 69 if (load != NULL) { 70 printf(", load average: "); 71 72 size_t i; 73 for (i = 0; i < count; i++) { 74 if (i > 0) 75 printf(" "); 76 77 stats_print_load_fragment(load[i], 2); 78 } 79 80 free(load); 81 } 82 83 printf("\n"); 192 } 193 194 static void usage(const char *name) 195 { 196 printf( 197 "Usage: %s [-t task_id] [-a] [-c] [-l] [-u]\n" \ 198 "\n" \ 199 "Options:\n" \ 200 "\t-t task_id\n" \ 201 "\t--task=task_id\n" \ 202 "\t\tList threads of the given task\n" \ 203 "\n" \ 204 "\t-a\n" \ 205 "\t--all\n" \ 206 "\t\tList all threads\n" \ 207 "\n" \ 208 "\t-c\n" \ 209 "\t--cpus\n" \ 210 "\t\tList CPUs\n" \ 211 "\n" \ 212 "\t-l\n" \ 213 "\t--load\n" \ 214 "\t\tPrint system load\n" \ 215 "\n" \ 216 "\t-u\n" \ 217 "\t--uptime\n" \ 218 "\t\tPrint system uptime\n" \ 219 "\n" \ 220 "\t-h\n" \ 221 "\t--help\n" \ 222 "\t\tPrint this usage information\n" 223 "\n" \ 224 "Without any options all tasks are listed\n", 225 name 226 ); 227 } 228 229 int main(int argc, char *argv[]) 230 { 231 bool toggle_tasks = true; 232 bool toggle_threads = false; 233 bool toggle_all = false; 234 bool toggle_cpus = false; 235 bool toggle_load = false; 236 bool toggle_uptime = false; 237 238 task_id_t task_id = 0; 239 240 int i; 241 for (i = 1; i < argc; i++) { 242 int off; 243 244 /* Usage */ 245 if ((off = arg_parse_short_long(argv[i], "-h", "--help")) != -1) { 246 usage(argv[0]); 247 return 0; 248 } 249 250 /* All threads */ 251 if ((off = arg_parse_short_long(argv[i], "-a", "--all")) != -1) { 252 toggle_tasks = false; 253 toggle_threads = true; 254 toggle_all = true; 255 continue; 256 } 257 258 /* CPUs */ 259 if ((off = arg_parse_short_long(argv[i], "-c", "--cpus")) != -1) { 260 toggle_tasks = false; 261 toggle_cpus = true; 262 continue; 263 } 264 265 /* Threads */ 266 if ((off = arg_parse_short_long(argv[i], "-t", "--task=")) != -1) { 267 // TODO: Support for 64b range 268 int tmp; 269 int ret = arg_parse_int(argc, argv, &i, &tmp, off); 270 if (ret != EOK) { 271 printf("%s: Malformed task_id '%s'\n", NAME, argv[i]); 272 return -1; 273 } 274 275 task_id = tmp; 276 277 toggle_tasks = false; 278 toggle_threads = true; 279 continue; 280 } 281 282 /* Load */ 283 if ((off = arg_parse_short_long(argv[i], "-l", "--load")) != -1) { 284 toggle_tasks = false; 285 toggle_load = true; 286 continue; 287 } 288 289 /* Uptime */ 290 if ((off = arg_parse_short_long(argv[i], "-u", "--uptime")) != -1) { 291 toggle_tasks = false; 292 toggle_uptime = true; 293 continue; 294 } 295 } 296 297 if (toggle_tasks) 298 list_tasks(); 299 300 if (toggle_threads) 301 list_threads(task_id, toggle_all); 302 303 if (toggle_cpus) 304 list_cpus(); 305 306 if (toggle_load) 307 print_load(); 308 309 if (toggle_uptime) 310 print_uptime(); 311 84 312 return 0; 85 313 } -
uspace/app/taskdump/taskdump.c
r4fe94c66 r12573db 33 33 */ 34 34 35 #include <async.h> 35 36 #include <stdio.h> 36 37 #include <stdlib.h> 37 38 #include <unistd.h> 38 #include <ipc/ipc.h>39 39 #include <errno.h> 40 40 #include <udebug.h> … … 105 105 106 106 udebug_end(phoneid); 107 ipc_hangup(phoneid);107 async_hangup(phoneid); 108 108 109 109 return 0; … … 114 114 int rc; 115 115 116 rc = ipc_connect_kbox(task_id);116 rc = async_connect_kbox(task_id); 117 117 118 118 if (rc == ENOTSUP) { … … 126 126 if (rc < 0) { 127 127 printf("Error connecting\n"); 128 printf(" ipc_connect_task(%" PRIu64 ") -> %d ", task_id, rc);128 printf("async_connect_kbox(%" PRIu64 ") -> %d ", task_id, rc); 129 129 return rc; 130 130 } -
uspace/app/tester/hw/misc/virtchar1.c
r4fe94c66 r12573db 89 89 /* Clean-up. */ 90 90 TPRINTF(" Closing phones and file descriptors\n"); 91 ipc_hangup(phone);91 async_hangup(phone); 92 92 close(fd); 93 93 -
uspace/app/tester/hw/serial/serial1.c
r4fe94c66 r12573db 39 39 #include <stdlib.h> 40 40 #include <stdio.h> 41 #include <ipc/ipc.h>42 41 #include <sys/types.h> 43 42 #include <async.h> … … 88 87 char *buf = (char *) malloc(cnt + 1); 89 88 if (buf == NULL) { 90 ipc_hangup(phone);89 async_hangup(phone); 91 90 devman_hangup_phone(DEVMAN_CLIENT); 92 91 return "Failed to allocate input buffer"; … … 98 97 sysarg_t old_word_size; 99 98 100 res = ipc_call_sync_0_4(phone, SERIAL_GET_COM_PROPS, &old_baud,99 res = async_req_0_4(phone, SERIAL_GET_COM_PROPS, &old_baud, 101 100 &old_par, &old_word_size, &old_stop); 102 101 if (res != EOK) { 103 102 free(buf); 104 ipc_hangup(phone);103 async_hangup(phone); 105 104 devman_hangup_phone(DEVMAN_CLIENT); 106 105 return "Failed to get old serial communication parameters"; 107 106 } 108 107 109 res = ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, 1200,108 res = async_req_4_0(phone, SERIAL_SET_COM_PROPS, 1200, 110 109 SERIAL_NO_PARITY, 8, 1); 111 110 if (EOK != res) { 112 111 free(buf); 113 ipc_hangup(phone);112 async_hangup(phone); 114 113 devman_hangup_phone(DEVMAN_CLIENT); 115 114 return "Failed to set serial communication parameters"; … … 124 123 125 124 if (read < 0) { 126 ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud,125 async_req_4_0(phone, SERIAL_SET_COM_PROPS, old_baud, 127 126 old_par, old_word_size, old_stop); 128 127 free(buf); 129 ipc_hangup(phone);128 async_hangup(phone); 130 129 devman_hangup_phone(DEVMAN_CLIENT); 131 130 return "Failed read from serial device"; … … 133 132 134 133 if ((size_t) read > cnt - total) { 135 ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud,134 async_req_4_0(phone, SERIAL_SET_COM_PROPS, old_baud, 136 135 old_par, old_word_size, old_stop); 137 136 free(buf); 138 ipc_hangup(phone);137 async_hangup(phone); 139 138 devman_hangup_phone(DEVMAN_CLIENT); 140 139 return "Read more data than expected"; … … 155 154 156 155 if (written < 0) { 157 ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud,156 async_req_4_0(phone, SERIAL_SET_COM_PROPS, old_baud, 158 157 old_par, old_word_size, old_stop); 159 158 free(buf); 160 ipc_hangup(phone);159 async_hangup(phone); 161 160 devman_hangup_phone(DEVMAN_CLIENT); 162 161 return "Failed write to serial device"; … … 164 163 165 164 if (written != read) { 166 ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud,165 async_req_4_0(phone, SERIAL_SET_COM_PROPS, old_baud, 167 166 old_par, old_word_size, old_stop); 168 167 free(buf); 169 ipc_hangup(phone);168 async_hangup(phone); 170 169 devman_hangup_phone(DEVMAN_CLIENT); 171 170 return "Written less data than read from serial device"; … … 183 182 ssize_t written = char_dev_write(phone, (void *) EOT, eot_size); 184 183 185 ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud,184 async_req_4_0(phone, SERIAL_SET_COM_PROPS, old_baud, 186 185 old_par, old_word_size, old_stop); 187 186 free(buf); 188 ipc_hangup(phone);187 async_hangup(phone); 189 188 devman_hangup_phone(DEVMAN_CLIENT); 190 189 -
uspace/app/tester/tester.h
r4fe94c66 r12573db 38 38 #include <sys/types.h> 39 39 #include <bool.h> 40 #include <ipc/ipc.h>41 40 42 41 #define IPC_TEST_SERVICE 10240 -
uspace/app/tetris/screen.h
r4fe94c66 r12573db 48 48 49 49 #include <sys/types.h> 50 #include <ipc/ipc.h>51 50 #include <async.h> 52 51 #include <bool.h> -
uspace/app/top/screen.c
r4fe94c66 r12573db 37 37 38 38 #include <stdio.h> 39 #include <ipc/ipc.h>40 39 #include <io/console.h> 41 40 #include <io/style.h> … … 274 273 { 275 274 screen_style_inverted(); 276 printf("[taskid] [thr eads] [virtual] [%%virt] [%%user]"277 " [%% kernel] [name");275 printf("[taskid] [thrds] [resident] [%%resi] [virtual] [%%virt]" 276 " [%%user] [%%kern] [name"); 278 277 screen_newline(); 279 278 screen_style_normal(); … … 295 294 perc_task_t *perc = data->tasks_perc + data->tasks_map[i]; 296 295 296 uint64_t resmem; 297 char resmem_suffix; 298 order_suffix(task->resmem, &resmem, &resmem_suffix); 299 297 300 uint64_t virtmem; 298 301 char virtmem_suffix; 299 302 order_suffix(task->virtmem, &virtmem, &virtmem_suffix); 300 303 301 printf("%-8" PRIu64 " %9zu %8" PRIu64 "%c ", task->task_id, 302 task->threads, virtmem, virtmem_suffix); 304 printf("%-8" PRIu64 " %7zu %9" PRIu64 "%c ", 305 task->task_id, task->threads, resmem, resmem_suffix); 306 print_percent(perc->resmem, 2); 307 printf(" %8" PRIu64 "%c ", virtmem, virtmem_suffix); 303 308 print_percent(perc->virtmem, 2); 304 309 puts(" "); 305 310 print_percent(perc->ucycles, 2); 306 puts(" ");311 puts(" "); 307 312 print_percent(perc->kcycles, 2); 308 313 puts(" "); -
uspace/app/top/top.c
r4fe94c66 r12573db 195 195 196 196 uint64_t virtmem_total = 0; 197 uint64_t resmem_total = 0; 197 198 uint64_t ucycles_total = 0; 198 199 uint64_t kcycles_total = 0; … … 223 224 224 225 virtmem_total += new_data->tasks[i].virtmem; 226 resmem_total += new_data->tasks[i].resmem; 225 227 ucycles_total += new_data->ucycles_diff[i]; 226 228 kcycles_total += new_data->kcycles_diff[i]; … … 232 234 FRACTION_TO_FLOAT(new_data->tasks_perc[i].virtmem, 233 235 new_data->tasks[i].virtmem * 100, virtmem_total); 236 FRACTION_TO_FLOAT(new_data->tasks_perc[i].resmem, 237 new_data->tasks[i].resmem * 100, resmem_total); 234 238 FRACTION_TO_FLOAT(new_data->tasks_perc[i].ucycles, 235 239 new_data->ucycles_diff[i] * 100, ucycles_total); -
uspace/app/top/top.h
r4fe94c66 r12573db 77 77 typedef struct { 78 78 fixed_float virtmem; 79 fixed_float resmem; 79 80 fixed_float ucycles; 80 81 fixed_float kcycles; -
uspace/app/trace/ipc_desc.c
r4fe94c66 r12573db 33 33 */ 34 34 35 #include <ipc/common.h> 35 36 #include <stdlib.h> 36 #include <ipc/ipc.h>37 37 #include "ipc_desc.h" 38 38 -
uspace/app/trace/ipcp.h
r4fe94c66 r12573db 36 36 #define IPCP_H_ 37 37 38 #include <ipc/ipc.h>39 38 #include "proto.h" 40 39 -
uspace/app/trace/proto.c
r4fe94c66 r12573db 35 35 #include <stdio.h> 36 36 #include <stdlib.h> 37 #include <ipc/ipc.h>38 37 #include <adt/hash_table.h> 39 38 -
uspace/app/trace/proto.h
r4fe94c66 r12573db 36 36 #define PROTO_H_ 37 37 38 #include <ipc/common.h> 38 39 #include <adt/hash_table.h> 39 #include <ipc/ipc.h>40 40 #include "trace.h" 41 41 -
uspace/app/trace/syscalls.c
r4fe94c66 r12573db 64 64 [SYS_IPC_POKE] = { "ipc_poke", 0, V_ERRNO }, 65 65 [SYS_IPC_HANGUP] = { "ipc_hangup", 1, V_ERRNO }, 66 [SYS_IPC_REGISTER_IRQ] = { "ipc_register_irq", 4, V_ERRNO },67 [SYS_IPC_UNREGISTER_IRQ] = { "ipc_unregister_irq", 2, V_ERRNO },68 66 69 67 [SYS_EVENT_SUBSCRIBE] = { "event_subscribe", 2, V_ERRNO }, … … 73 71 [SYS_PHYSMEM_MAP] = { "physmem_map", 4, V_ERRNO }, 74 72 [SYS_IOSPACE_ENABLE] = { "iospace_enable", 1, V_ERRNO }, 73 [SYS_REGISTER_IRQ] = { "register_irq", 4, V_ERRNO }, 74 [SYS_UNREGISTER_IRQ] = { "unregister_irq", 2, V_ERRNO }, 75 75 76 76 [SYS_SYSINFO_GET_TAG] = { "sysinfo_get_tag", 2, V_INTEGER }, 77 77 [SYS_SYSINFO_GET_VALUE] = { "sysinfo_get_value", 3, V_ERRNO }, 78 78 [SYS_SYSINFO_GET_DATA_SIZE] = { "sysinfo_get_data_size", 3, V_ERRNO }, 79 [SYS_SYSINFO_GET_DATA] = { "sysinfo_get_data", 4, V_ERRNO },79 [SYS_SYSINFO_GET_DATA] = { "sysinfo_get_data", 5, V_ERRNO }, 80 80 81 81 [SYS_DEBUG_ENABLE_CONSOLE] = { "debug_enable_console", 0, V_ERRNO }, -
uspace/app/trace/trace.c
r4fe94c66 r12573db 36 36 #include <stdlib.h> 37 37 #include <unistd.h> 38 #include <ipc/ipc.h>39 38 #include <fibril.h> 40 39 #include <errno.h> … … 149 148 int rc; 150 149 151 rc = ipc_connect_kbox(task_id);150 rc = async_connect_kbox(task_id); 152 151 153 152 if (rc == ENOTSUP) { … … 745 744 abort_trace = true; 746 745 udebug_end(phoneid); 747 ipc_hangup(phoneid);746 async_hangup(phoneid); 748 747 749 748 ipcp_cleanup();
Note:
See TracChangeset
for help on using the changeset viewer.
