diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-09-06 08:25:41 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2012-10-18 16:14:09 -0400 |
commit | 057dcfdb1f0dfe07ec3e030b238e46a69d249a1e (patch) | |
tree | d04fb4a8237726f80d2ad097d55161922cd2ecb6 | |
parent | 3e4922fc06e0c3a377ef3c92982ee3798d769474 (diff) |
P-FP: prevent misuse of priority queue
Stop hard-to-detect out-of-bounds errors early.
-rw-r--r-- | include/litmus/fp_common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/litmus/fp_common.h b/include/litmus/fp_common.h index dd1f7bf1e347..19356c0fa6c1 100644 --- a/include/litmus/fp_common.h +++ b/include/litmus/fp_common.h | |||
@@ -57,7 +57,7 @@ static inline unsigned int fpq_find(struct fp_prio_queue* q) | |||
57 | 57 | ||
58 | static inline void fp_prio_add(struct fp_prio_queue* q, struct task_struct* t, unsigned int index) | 58 | static inline void fp_prio_add(struct fp_prio_queue* q, struct task_struct* t, unsigned int index) |
59 | { | 59 | { |
60 | 60 | BUG_ON(index >= LITMUS_MAX_PRIORITY); | |
61 | BUG_ON(bheap_node_in_heap(tsk_rt(t)->heap_node)); | 61 | BUG_ON(bheap_node_in_heap(tsk_rt(t)->heap_node)); |
62 | 62 | ||
63 | fpq_set(q, index); | 63 | fpq_set(q, index); |