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