aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2009-04-18 16:29:53 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2009-04-18 16:29:53 -0400
commit35b32d47b6d03d6e0dbd95c9055223e8d6482573 (patch)
treefca9b6b9f10ceedad7994d3107e179cec0ab5f1d /include
parentcfca2b1dc8d5d9e195e29ae4e62df7a09ab2d579 (diff)
parentbf81930bba566a19f2ce4f4adb41c5fd7d45aae1 (diff)
Merge commit 'origin/master' into rtss09
Diffstat (limited to 'include')
-rw-r--r--include/litmus/litmus.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h
index 6f82947bcf..d44999da0c 100644
--- a/include/litmus/litmus.h
+++ b/include/litmus/litmus.h
@@ -51,37 +51,6 @@ static inline int in_list(struct list_head* list)
51 ); 51 );
52} 52}
53 53
54typedef int (*list_cmp_t)(struct list_head*, struct list_head*);
55
56static inline unsigned int list_insert(struct list_head* new,
57 struct list_head* head,
58 list_cmp_t order_before)
59{
60 struct list_head *pos;
61 unsigned int passed = 0;
62
63 BUG_ON(!new);
64
65 /* find a spot where the new entry is less than the next */
66 list_for_each(pos, head) {
67 if (unlikely(order_before(new, pos))) {
68 /* pos is not less than new, thus insert here */
69 __list_add(new, pos->prev, pos);
70 goto out;
71 }
72 passed++;
73 }
74 /* if we get to this point either the list is empty or every entry
75 * queued element is less than new.
76 * Let's add new to the end. */
77 list_add_tail(new, head);
78 out:
79 return passed;
80}
81
82void list_qsort(struct list_head* list, list_cmp_t less_than);
83
84
85#define RT_PREEMPTIVE 0x2050 /* = NP */ 54#define RT_PREEMPTIVE 0x2050 /* = NP */
86#define RT_NON_PREEMPTIVE 0x4e50 /* = P */ 55#define RT_NON_PREEMPTIVE 0x4e50 /* = P */
87#define RT_EXIT_NP_REQUESTED 0x5251 /* = RQ */ 56#define RT_EXIT_NP_REQUESTED 0x5251 /* = RQ */