TD3:II.1 Add test programs
This commit is contained in:
parent
07853cbcd3
commit
1b0dea618b
3 changed files with 28 additions and 0 deletions
20
code/test/userpages0.c
Normal file
20
code/test/userpages0.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "syscall.h"
|
||||
|
||||
void output(char* s) {
|
||||
int nb = 10;
|
||||
int i;
|
||||
for(i=0;i<nb;i++)
|
||||
PutString((char*)s);
|
||||
ThreadExit();
|
||||
}
|
||||
|
||||
int main () {
|
||||
|
||||
// Premier Thread
|
||||
void* f = output;
|
||||
|
||||
ThreadCreate(f,"a");
|
||||
ThreadCreate(f,"b");
|
||||
PutString("\nthis is the end of our main() in test program\n");
|
||||
ThreadExit();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue