Use new pipe syscalls
This commit is contained in:
@ -18,7 +18,7 @@ void tb_runinitscript(void) {
|
||||
|
||||
char buf[100];
|
||||
string_memset(buf, 0, sizeof(buf));
|
||||
r = ipcpipe(tb, IPCPIPE_OUT, IPCPIPE_READ, (uint8_t *)buf, sizeof(buf)-1);
|
||||
r = ipc_piperead(tb, 0, (uint8_t *const)buf, sizeof(buf)-1);
|
||||
if (r > 0) {
|
||||
devctl(&termdev, DEV_TERMDEV_PUTCH, (uint8_t *)buf, string_len(buf), 0);
|
||||
} else {
|
||||
|
||||
@ -120,8 +120,8 @@ bool rt_do(Token *tks) {
|
||||
StringBuffer outbuf;
|
||||
stringbuffer_init(&outbuf);
|
||||
|
||||
ipcpipe(PID, 10, IPCPIPE_MAKE, NULL, 0);
|
||||
ipcpipe(app, IPCPIPE_OUT, IPCPIPE_REPLACE, (uint8_t *)PID, 10);
|
||||
ipc_pipemake(10);
|
||||
ipc_pipeconnect(app, 0, PID, 10);
|
||||
|
||||
processctl(app, PCTL_RUN, 0, 0, 0);
|
||||
|
||||
@ -130,13 +130,13 @@ bool rt_do(Token *tks) {
|
||||
char buf[100];
|
||||
string_memset(buf, 0, sizeof(buf));
|
||||
|
||||
r = ipcpipe(app, IPCPIPE_OUT, IPCPIPE_READ, (uint8_t *)buf, sizeof(buf)-1);
|
||||
r = ipc_piperead(app, 0, (uint8_t *const)buf, sizeof(buf)-1);
|
||||
if (r > 0) {
|
||||
stringbuffer_appendcstr(&outbuf, buf);
|
||||
}
|
||||
}
|
||||
|
||||
ipcpipe(PID, 10, IPCPIPE_DELETE, NULL, 0);
|
||||
ipc_pipedelete(10);
|
||||
|
||||
rtstringv_stackpushcopy(outbuf.data, outbuf.count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user