Changeset a35b458 in mainline for uspace/app/tester/ipc/starve.c
- Timestamp:
- 2018-03-02T20:10:49Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/ipc/starve.c
r3061bc1 ra35b458 42 42 if (console == NULL) 43 43 return "Failed to init connection with console."; 44 44 45 45 struct timeval start; 46 46 gettimeofday(&start, NULL); 47 47 48 48 TPRINTF("Intensive computation shall be imagined (for %ds)...\n", DURATION_SECS); 49 49 TPRINTF("Press a key to terminate prematurely...\n"); … … 51 51 struct timeval now; 52 52 gettimeofday(&now, NULL); 53 53 54 54 if (tv_sub_diff(&now, &start) >= DURATION_SECS * 1000000L) 55 55 break; 56 56 57 57 cons_event_t ev; 58 58 suseconds_t timeout = 0; … … 63 63 } 64 64 } 65 65 66 66 // FIXME - unless a key was pressed, the answer leaked as no one 67 67 // will wait for it. 68 68 // We cannot use async_forget() directly, though. Something like 69 69 // console_forget_pending_kbd_event() shall come here. 70 70 71 71 TPRINTF("Terminating...\n"); 72 72 73 73 console_done(console); 74 74 75 75 return err; 76 76 }
Note:
See TracChangeset
for help on using the changeset viewer.