diff options
author | Christopher Kenna <cjk@cs.unc.edu> | 2011-09-30 20:21:31 -0400 |
---|---|---|
committer | Christopher Kenna <cjk@cs.unc.edu> | 2011-09-30 20:21:31 -0400 |
commit | b0466ecb422692bd0d30764075af834101849bd2 (patch) | |
tree | 319b5b04e6bf5785c6938ac2382388926ccbec82 /litmus/event_group.c | |
parent | 17a40d7ea17014b7a615b9f91facc16c6d9072e3 (diff) |
Debug commit.
Some things are working, but the kernel panics when you try and
deallocate an event group.
Committed so Jonathan can look at it.
Diffstat (limited to 'litmus/event_group.c')
-rw-r--r-- | litmus/event_group.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/litmus/event_group.c b/litmus/event_group.c index 3b50e15bd354..a130a68c731a 100644 --- a/litmus/event_group.c +++ b/litmus/event_group.c | |||
@@ -30,7 +30,7 @@ static unsigned int time2slot(lt_t time) | |||
30 | static enum hrtimer_restart on_timer(struct hrtimer *timer) | 30 | static enum hrtimer_restart on_timer(struct hrtimer *timer) |
31 | { | 31 | { |
32 | unsigned long flags; | 32 | unsigned long flags; |
33 | int num = 0; | 33 | unsigned long num = 0; |
34 | struct event_list *el; | 34 | struct event_list *el; |
35 | struct rt_event *e; | 35 | struct rt_event *e; |
36 | struct list_head *pos, *safe, list; | 36 | struct list_head *pos, *safe, list; |
@@ -50,7 +50,7 @@ static enum hrtimer_restart on_timer(struct hrtimer *timer) | |||
50 | list_for_each_safe(pos, safe, &list) { | 50 | list_for_each_safe(pos, safe, &list) { |
51 | num++; | 51 | num++; |
52 | e = list_entry(pos, struct rt_event, list); | 52 | e = list_entry(pos, struct rt_event, list); |
53 | TRACE("Dequeueing event 0x%p with prio %d from 0x%p\n", | 53 | VTRACE("Dequeueing event 0x%p with prio %d from 0x%p\n", |
54 | e, e->prio, el); | 54 | e, e->prio, el); |
55 | list_del_init(pos); | 55 | list_del_init(pos); |
56 | e->function(e); | 56 | e->function(e); |
@@ -238,7 +238,7 @@ void cancel_event(struct rt_event *e) | |||
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
241 | struct kmem_cache *event_list_cache, *event_cache; | 241 | struct kmem_cache *event_list_cache; |
242 | 242 | ||
243 | struct event_list* event_list_alloc(int gfp_flags) | 243 | struct event_list* event_list_alloc(int gfp_flags) |
244 | { | 244 | { |
@@ -249,6 +249,8 @@ struct event_list* event_list_alloc(int gfp_flags) | |||
249 | el->timer.function = on_timer; | 249 | el->timer.function = on_timer; |
250 | } else { | 250 | } else { |
251 | VTRACE("Failed to allocate event list!"); | 251 | VTRACE("Failed to allocate event list!"); |
252 | printk(KERN_CRIT "Failed to allocate event list.\n"); | ||
253 | BUG(); | ||
252 | } | 254 | } |
253 | return el; | 255 | return el; |
254 | } | 256 | } |