Resolve hisenbugs regarding GCC and -Os

This commit is contained in:
2025-09-17 21:48:16 +02:00
parent 0a5523f234
commit 91e65bb35a
13 changed files with 74 additions and 93 deletions

View File

@ -24,20 +24,19 @@ void main(void) {
ipcpipe(IPCPIPE_SELFPID, 10, IPCPIPE_MAKE, NULL, 0);
ipcpipe(IPCPIPE_SELFPID, 10, IPCPIPE_ADD_BCAST, NULL, 1);
processctl(tb, PCTL_RUN, 0, 0, 0);
#define OUTBUF_MAX 1024
char *outbuf = dlmalloc(1024);
char *outbuf = dlmalloc(OUTBUF_MAX);
while(processctl(tb, PCTL_POLLSTATE, 0, 0, 0) != 4) {
processctl(tb, PCTL_RUN, 0, 0, 0);
for(;;) {
string_memset(outbuf, 0, OUTBUF_MAX);
int32_t nrd = ipcpipe(PID, SUBPROC_PIPE_OUT, IPCPIPE_READ, (uint8_t *)outbuf, sizeof(outbuf));
if (nrd > 0) {
uprintf("%s", outbuf);
}
#if 0
int32_t kbchr;
int32_t read = ipcpipe(IPCPIPE_SELFPID, 10, IPCPIPE_READ, (uint8_t *)&kbchr, sizeof(kbchr));
if (read > 0) {
@ -51,7 +50,6 @@ void main(void) {
}
}
}
#endif
}
for(;;);