Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <conio.h>
- #include <dos.h>
- #include <mem.h>
- #include "rtc86.h"
- TSK_IDENT tsk1,tsk2,tsk3;
- TASK t1(void)
- {
- while(1){
- printf("a");
- _sleep(10);
- }
- }
- TASK t2(void)
- {
- while(1){
- printf("b");
- _sleep(30);
- }
- }
- TASK t3(void)
- {
- while(1){
- printf("c");
- _sleep(50);
- }
- }
- void main(void)
- {
- _install();
- _create(tsk1,t1,1,3,tsk1);
- _create(tsk2,t2,1,3,tsk2);
- _create(tsk3,t3,1,3,tsk3);
- _activate(tsk1);
- _activate(tsk2);
- _activate(tsk3);
- _run(300);
- }
Advertisement
Add Comment
Please, Sign In to add comment