mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
use initd to create example tasks
This commit is contained in:
parent
0644053a6f
commit
c301862cba
2 changed files with 20 additions and 12 deletions
|
@ -567,7 +567,7 @@ isrsyscall:
|
|||
; => using of r10 for the temporary storage of the 4th argument
|
||||
mov rcx, r10
|
||||
|
||||
; during the system call, HermitCore allows interrupts
|
||||
; during a system call, HermitCore allows interrupts
|
||||
sti
|
||||
call syscall_handler
|
||||
cli
|
||||
|
|
|
@ -135,11 +135,27 @@ int smp_main(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
// init task => creates all other tasks an initialize the LwIP
|
||||
static int initd(void* arg)
|
||||
{
|
||||
char* argv1[] = {"/bin/hello", NULL};
|
||||
//char* argv2[] = {"/bin/jacobi", NULL};
|
||||
char* argv2[] = {"/bin/jacobi", NULL};
|
||||
|
||||
//create_kernel_task(NULL, foo, "foo1", NORMAL_PRIO);
|
||||
//create_kernel_task(NULL, foo, "foo2", NORMAL_PRIO);
|
||||
create_user_task(NULL, "/bin/hello", argv1, NORMAL_PRIO);
|
||||
create_user_task(NULL, "/bin/jacobi", argv2, NORMAL_PRIO);
|
||||
create_user_task(NULL, "/bin/jacobi", argv2, NORMAL_PRIO);
|
||||
|
||||
#if 0
|
||||
init_netifs();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
hermit_init();
|
||||
system_calibration(); // enables also interrupts
|
||||
|
||||
|
@ -157,15 +173,7 @@ int main(void)
|
|||
list_fs(fs_root, 1);
|
||||
#endif
|
||||
|
||||
create_kernel_task(NULL, foo, "foo1", NORMAL_PRIO);
|
||||
create_kernel_task(NULL, foo, "foo2", NORMAL_PRIO);
|
||||
create_user_task(NULL, "/bin/hello", argv1, NORMAL_PRIO);
|
||||
//create_user_task(NULL, "/bin/jacobi", argv2, NORMAL_PRIO);
|
||||
//create_user_task(NULL, "/bin/jacobi", argv2, NORMAL_PRIO);
|
||||
|
||||
#if 0
|
||||
init_netifs();
|
||||
#endif
|
||||
create_kernel_task(NULL, initd, NULL, NORMAL_PRIO);
|
||||
|
||||
while(1) {
|
||||
check_workqueues();
|
||||
|
|
Loading…
Add table
Reference in a new issue