Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
847 giacomo 1
#include <kernel/func.h>
2
 
3
extern int exec_shadow;
4
 
5
PID kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
6
{
7
        PID p;
8
        SOFT_TASK_MODEL m;
9
 
10
        soft_task_default_model(m);
11
        soft_task_def_arg(m,(void*)arg);
12
        soft_task_def_met(m, 5000);
13
        soft_task_def_wcet(m, 5000);
14
        soft_task_def_period(m, 25000);
15
        soft_task_def_ctrl_jet(m);
16
        soft_task_def_aperiodic(m);
17
        soft_task_def_usemath(m);
18
 
19
        p= task_create("linux26", (void*)fn, &m, NULL);
20
        if (p >0) task_activate(p);
21
 
22
        return p;
23
}
24
 
25
int kill_proc(pid_t pid, int sig, int priv)
26
{
27
        task_kill(pid);
28
 
29
        return 0;
30
}
31
 
32
void schedule(void)
33
{
34
        task_endcycle();
35
}