diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-04-06 17:04:32 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2013-04-06 17:04:32 -0400 |
commit | a4d63ac7ff059f81a0488d1cda4de16142508189 (patch) | |
tree | 92f9bc1e154eec27145ba11c8498913bf1694116 /include | |
parent | 92d266b64e0def8554ebece70318a5ae0050573a (diff) |
IKGLP reject/reissue on budget exhaustion.
Added support to IKGLP to handle budget exhaustion
of blocked waiter.
NOTE: CODE IS UNTESTED...
Diffstat (limited to 'include')
-rw-r--r-- | include/litmus/ikglp_lock.h | 28 | ||||
-rw-r--r-- | include/litmus/rt_param.h | 3 |
2 files changed, 23 insertions, 8 deletions
diff --git a/include/litmus/ikglp_lock.h b/include/litmus/ikglp_lock.h index 357465e78d23..d81b755b9039 100644 --- a/include/litmus/ikglp_lock.h +++ b/include/litmus/ikglp_lock.h | |||
@@ -19,6 +19,7 @@ typedef struct ikglp_heap_node | |||
19 | 19 | ||
20 | struct fifo_queue; | 20 | struct fifo_queue; |
21 | struct ikglp_wait_state; | 21 | struct ikglp_wait_state; |
22 | struct fifo_queue; | ||
22 | 23 | ||
23 | typedef struct ikglp_donee_heap_node | 24 | typedef struct ikglp_donee_heap_node |
24 | { | 25 | { |
@@ -29,22 +30,33 @@ typedef struct ikglp_donee_heap_node | |||
29 | struct binheap_node node; | 30 | struct binheap_node node; |
30 | } ikglp_donee_heap_node_t; | 31 | } ikglp_donee_heap_node_t; |
31 | 32 | ||
33 | typedef enum ikglp_states | ||
34 | { | ||
35 | IKGLP_INVL = 0, | ||
36 | IKGLP_FQ, | ||
37 | IKGLP_PQ, | ||
38 | IKGLP_DONOR | ||
39 | } ikglp_states_t; | ||
40 | |||
32 | // Maintains the state of a request as it goes through the IKGLP | 41 | // Maintains the state of a request as it goes through the IKGLP |
33 | typedef struct ikglp_wait_state { | 42 | typedef struct ikglp_wait_state { |
34 | struct task_struct *task; // pointer back to the requesting task | 43 | struct task_struct *task; // pointer back to the requesting task |
44 | |||
45 | ikglp_states_t cur_q; | ||
46 | ikglp_heap_node_t global_heap_node; // data for x-highest-prio tasks | ||
35 | 47 | ||
36 | // Data for while waiting in FIFO Queue | 48 | // Data for while waiting in FIFO Queue |
37 | wait_queue_t fq_node; | 49 | wait_queue_t fq_node; |
38 | ikglp_heap_node_t global_heap_node; | 50 | struct fifo_queue *fq; |
39 | ikglp_donee_heap_node_t donee_heap_node; | 51 | ikglp_donee_heap_node_t donee_heap_node; |
40 | 52 | ||
41 | // Data for while waiting in PQ | 53 | // Data for while waiting in PQ |
42 | ikglp_heap_node_t pq_node; | 54 | ikglp_heap_node_t pq_node; |
43 | 55 | ||
44 | // Data for while waiting as a donor | 56 | // Data for while waiting as a donor |
45 | ikglp_donee_heap_node_t *donee_info; // cross-linked with donee's ikglp_donee_heap_node_t | 57 | ikglp_donee_heap_node_t *donee_info; // cross-linked with donee's ikglp_donee_heap_node_t |
46 | struct nested_info prio_donation; | 58 | struct nested_info prio_donation; |
47 | struct binheap_node node; | 59 | struct binheap_node node; |
48 | } ikglp_wait_state_t; | 60 | } ikglp_wait_state_t; |
49 | 61 | ||
50 | /* struct for semaphore with priority inheritance */ | 62 | /* struct for semaphore with priority inheritance */ |
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index a1cfdb6b6416..7828117a61a8 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -406,7 +406,10 @@ struct rt_param { | |||
406 | 406 | ||
407 | /* pointer to lock upon which is currently blocked */ | 407 | /* pointer to lock upon which is currently blocked */ |
408 | struct litmus_lock* blocked_lock; | 408 | struct litmus_lock* blocked_lock; |
409 | unsigned long blocked_lock_data; | ||
410 | |||
409 | struct litmus_lock* outermost_lock; | 411 | struct litmus_lock* outermost_lock; |
412 | unsigned int virtually_unlocked:1; | ||
410 | #endif | 413 | #endif |
411 | 414 | ||
412 | /* user controlled parameters */ | 415 | /* user controlled parameters */ |