diff options
Diffstat (limited to 'include/litmus/kfmlp_lock.h')
-rw-r--r-- | include/litmus/kfmlp_lock.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/litmus/kfmlp_lock.h b/include/litmus/kfmlp_lock.h index 614cccad5307..6d7e24b2a3ad 100644 --- a/include/litmus/kfmlp_lock.h +++ b/include/litmus/kfmlp_lock.h | |||
@@ -6,6 +6,8 @@ | |||
6 | 6 | ||
7 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING | 7 | #ifdef CONFIG_LITMUS_AFFINITY_LOCKING |
8 | #include <litmus/kexclu_affinity.h> | 8 | #include <litmus/kexclu_affinity.h> |
9 | |||
10 | struct kfmlp_affinity; | ||
9 | #endif | 11 | #endif |
10 | 12 | ||
11 | /* struct for semaphore with priority inheritance */ | 13 | /* struct for semaphore with priority inheritance */ |
@@ -50,10 +52,9 @@ struct kfmlp_queue_info | |||
50 | { | 52 | { |
51 | struct kfmlp_queue* q; | 53 | struct kfmlp_queue* q; |
52 | lt_t estimated_len; | 54 | lt_t estimated_len; |
55 | int *nr_cur_users; | ||
53 | }; | 56 | }; |
54 | 57 | ||
55 | struct kfmlp_affinity; | ||
56 | |||
57 | struct kfmlp_affinity_ops | 58 | struct kfmlp_affinity_ops |
58 | { | 59 | { |
59 | struct kfmlp_queue* (*advise_enqueue)(struct kfmlp_affinity* aff, struct task_struct* t); | 60 | struct kfmlp_queue* (*advise_enqueue)(struct kfmlp_affinity* aff, struct task_struct* t); |
@@ -62,6 +63,7 @@ struct kfmlp_affinity_ops | |||
62 | void (*notify_dequeue)(struct kfmlp_affinity* aff, struct kfmlp_queue* fq, struct task_struct* t); | 63 | void (*notify_dequeue)(struct kfmlp_affinity* aff, struct kfmlp_queue* fq, struct task_struct* t); |
63 | void (*notify_acquired)(struct kfmlp_affinity* aff, struct kfmlp_queue* fq, struct task_struct* t); | 64 | void (*notify_acquired)(struct kfmlp_affinity* aff, struct kfmlp_queue* fq, struct task_struct* t); |
64 | void (*notify_freed)(struct kfmlp_affinity* aff, struct kfmlp_queue* fq, struct task_struct* t); | 65 | void (*notify_freed)(struct kfmlp_affinity* aff, struct kfmlp_queue* fq, struct task_struct* t); |
66 | int (*replica_to_resource)(struct kfmlp_affinity* aff, struct kfmlp_queue* fq); | ||
65 | }; | 67 | }; |
66 | 68 | ||
67 | struct kfmlp_affinity | 69 | struct kfmlp_affinity |
@@ -69,8 +71,10 @@ struct kfmlp_affinity | |||
69 | struct affinity_observer obs; | 71 | struct affinity_observer obs; |
70 | struct kfmlp_affinity_ops *ops; | 72 | struct kfmlp_affinity_ops *ops; |
71 | struct kfmlp_queue_info *q_info; | 73 | struct kfmlp_queue_info *q_info; |
72 | struct kfmlp_queue_info *shortest_queue; | 74 | int *nr_cur_users_on_rsrc; |
73 | int offset; | 75 | int offset; |
76 | int nr_simult; | ||
77 | int nr_rsrc; | ||
74 | }; | 78 | }; |
75 | 79 | ||
76 | static inline struct kfmlp_affinity* kfmlp_aff_obs_from_aff_obs(struct affinity_observer* aff_obs) | 80 | static inline struct kfmlp_affinity* kfmlp_aff_obs_from_aff_obs(struct affinity_observer* aff_obs) |