Xenomai API  2.6.5
sched-sporadic.h
Go to the documentation of this file.
1 
23 #ifndef _XENO_NUCLEUS_SCHED_SPORADIC_H
24 #define _XENO_NUCLEUS_SCHED_SPORADIC_H
25 
26 #ifndef _XENO_NUCLEUS_SCHED_H
27 #error "please don't include nucleus/sched-sporadic.h directly"
28 #endif
29 
30 #ifdef CONFIG_XENO_OPT_SCHED_SPORADIC
31 
32 #include <nucleus/heap.h>
33 
34 extern struct xnsched_class xnsched_class_sporadic;
35 
36 struct xnsched_sporadic_repl {
37  xntime_t date;
38  xntime_t amount;
39 };
40 
41 struct xnsched_sporadic_data {
42  xnticks_t resume_date;
43  xnticks_t budget;
44  int repl_in;
45  int repl_out;
46  int repl_pending;
47  struct xntimer repl_timer;
48  struct xntimer drop_timer;
49  struct xnsched_sporadic_repl repl_data[CONFIG_XENO_OPT_SCHED_SPORADIC_MAXREPL];
50  struct xnsched_sporadic_param param;
51  struct xnthread *thread;
52 };
53 
54 struct xnsched_sporadic {
55 #if XENO_DEBUG(NUCLEUS)
56  unsigned long drop_retries;
57 #endif
58 };
59 
60 static inline int xnsched_sporadic_init_tcb(struct xnthread *thread)
61 {
62  thread->pss = NULL;
63 
64  return 0;
65 }
66 
67 #endif /* !CONFIG_XENO_OPT_SCHED_SPORADIC */
68 
69 #endif /* !_XENO_NUCLEUS_SCHED_SPORADIC_H */