blob: 818588a3d317cc61451b1976c96d0c558ce1083e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include <litmus/rt_server.h>
static struct task_struct* default_server_take(struct rt_server *srv)
{
return __take_ready(srv->domain);
}
static void default_server_update(struct rt_server *srv)
{
}
void init_rt_server(struct rt_server *server,
int sid, int cpu, rt_domain_t *domain,
need_preempt_t need_preempt,
server_requeue_t requeue,
server_update_t update,
server_take_t take)
{
if (!need_preempt || !requeue)
BUG_ON(1);
server->need_preempt = need_preempt;
server->requeue = requeue;
server->update = (update) ? update : default_server_update;
server->take = (take) ? take : default_server_take;
server->sid = sid;
server->cpu = cpu;
server->linked = NULL;
server->domain = domain;
server->running = 0;
}
|