Changeset 9d8a1ed in mainline
- Timestamp:
- 2009-07-21T18:34:05Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 654a30a
- Parents:
- 986c24c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/trace.c
r986c24c r9d8a1ed 45 45 #include <string.h> 46 46 #include <loader/loader.h> 47 #include <io/console.h> 48 #include <io/keycode.h> 47 49 48 50 #include <libc.h> … … 453 455 454 456 if (paused) { 455 printf("Press R to resume (and be patient).\n");457 printf("Press R to resume.\n"); 456 458 while (paused) { 457 usleep(1000000); 458 fibril_yield(); 459 printf("."); 459 async_usleep(1000000); 460 460 } 461 461 printf("Resumed\n"); … … 558 558 static void trace_task(task_id_t task_id) 559 559 { 560 console_event_t ev; 561 bool done; 560 562 int i; 561 563 int rc; 562 int c;563 564 564 565 ipcp_init(); … … 582 583 } 583 584 584 while(1) { 585 c = getchar(); 586 if (c == 'q') break; 587 if (c == 'p') { 585 done = false; 586 587 while (!done) { 588 if (!console_get_event(fphone(stdin), &ev)) 589 return; 590 591 if (ev.type != KEY_PRESS) 592 continue; 593 594 switch (ev.key) { 595 case KC_Q: 596 done = true; 597 break; 598 case KC_P: 588 599 printf("Pause...\n"); 589 paused = 1;590 600 rc = udebug_stop(phoneid, thash); 591 printf("stop -> %d\n", rc); 592 } 593 if (c == 'r') { 601 if (rc == EOK) 602 paused = 1; 603 else 604 printf("stop -> %d\n", rc); 605 break; 606 case KC_R: 594 607 paused = 0; 595 608 printf("Resume...\n"); 609 break; 596 610 } 597 611 }
Note:
See TracChangeset
for help on using the changeset viewer.