📄 tsk1.c
字号:
/* tsk1.c - Task #1 */#include <psos.h>#include <prepc.h>#include <stdio.h>#include "misc.h"#include "appl.h"void tsk1(ULONG me, ULONG him, ULONG l3, ULONG l4){ ULONG rc, got; char incoming[LINE_MAX+1]; bprintf("%s Task begin\n", (char *) me); for (;;) { if (0 != (rc = q_vreceive(qid, Q_WAIT, 0, incoming, sizeof(incoming), &got))) fail(rc, "%s q_vreceive(%s) failed", me, Q_NAM); bprintf("%2d: ", got); if (got == 0) { bprintf("<EOF>\n"); break; } incoming[got] = '\0'; bprintf("%s\n", incoming); } bprintf("%s Task end\n", (char *) me); /* Resume the root task (well-known tid) */ t_resume(0x00020000); exit(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -