blob: 17517790a1045a295d75e114ccc946035f91c7d5 (
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
35
36
37
38
39
|
#ifndef __RT_SERVER_H
#define __RT_SERVER_H
#include <linux/sched.h>
#include <litmus/litmus.h>
#include <litmus/rt_domain.h>
struct rt_server;
typedef int (*need_preempt_t)(rt_domain_t *rt, struct task_struct *t);
typedef void (*server_update_t)(struct rt_server *srv);
typedef void (*server_requeue_t)(struct rt_server *srv, struct task_struct *t);
typedef struct task_struct* (*server_take_t)(struct rt_server *srv);
struct rt_server {
int sid;
struct task_struct* linked;
rt_domain_t* domain;
int running;
/* Does this server have a higher-priority task */
need_preempt_t need_preempt;
/* System state has changed, so should server */
server_update_t update;
/* Requeue task in domain */
server_requeue_t requeue;
/* Take next task from domain */
server_take_t take;
};
void init_rt_server(struct rt_server *server,
int sid, rt_domain_t *domain,
need_preempt_t need_preempt,
server_requeue_t requeue,
server_update_t update,
server_take_t take);
#endif
|