tb Spin efficiently with new schedrelease() syscall
This commit is contained in:
@ -239,7 +239,9 @@ bool interp_runstring(const char *string, InterpResult **res, bool logcmds) {
|
||||
|
||||
processctl(app, PCTL_RUN, 0, 0, 0);
|
||||
|
||||
while(processctl(app, PCTL_POLLSTATE, 0, 0, 0) != 4);
|
||||
while(processctl(app, PCTL_POLLSTATE, 0, 0, 0) != 4) {
|
||||
schedrelease();
|
||||
}
|
||||
|
||||
cleanup:
|
||||
for (size_t j = 0; j < argslen1; j++) {
|
||||
|
@ -124,6 +124,8 @@ void do_mode_interactive(void) {
|
||||
uprintf(ANSIQ_SCR_CLR_ALL);
|
||||
goto begin;
|
||||
break;
|
||||
} else {
|
||||
schedrelease();
|
||||
}
|
||||
|
||||
if (b == '\n') {
|
||||
|
Reference in New Issue
Block a user