add apps
This commit is contained in:
24
user/app1/appl.cc
Normal file
24
user/app1/appl.cc
Normal file
@@ -0,0 +1,24 @@
|
||||
// vim: set noet ts=4 sw=4:
|
||||
|
||||
#include "../libsys/stub.h"
|
||||
|
||||
extern "C" void main() {
|
||||
// Thread 1 may be an auxiliary thread
|
||||
|
||||
//sys_test(1,2,3,4,5);
|
||||
|
||||
unsigned id = sys_getpid();
|
||||
char text[] = "testX";
|
||||
text[4] = 0x30+id;
|
||||
|
||||
for (unsigned i = 1;; ++i) {
|
||||
write(1, text, sizeof(text));
|
||||
if(i==id){
|
||||
//write(2, "kill", 4);
|
||||
//write(2, &text[4], 1);
|
||||
//write(2, " ", 1);
|
||||
sys_exit();
|
||||
}
|
||||
sleep(1000);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user