TD2 I.6 Add test programm for threads
This commit is contained in:
parent
a638cea8bc
commit
84bf3fdf5f
1 changed files with 9 additions and 3 deletions
|
@ -2,12 +2,18 @@
|
|||
#include "syscall.h"
|
||||
|
||||
void f(int c) {
|
||||
PutString("Thead!");
|
||||
PutChar((char)c);
|
||||
//GetChar();
|
||||
ThreadExit();
|
||||
}
|
||||
|
||||
int main(){
|
||||
//int i;
|
||||
ThreadCreate(f, 66);
|
||||
int i = 64;
|
||||
for (i=64; i < 68; i++){
|
||||
ThreadCreate(f, i);
|
||||
}
|
||||
PutString("end of main()\n");
|
||||
ThreadExit();
|
||||
//return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue