Use new pipe syscalls

This commit is contained in:
2025-10-14 08:12:43 +02:00
parent ddb31ac5f5
commit a67d80a2d1
2 changed files with 6 additions and 6 deletions

View File

@ -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 {

View File

@ -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);
@ -130,13 +130,13 @@ bool rt_do(Token *tks) {
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);