diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-02-15 10:44:42 -0500 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-02-15 10:44:42 -0500 |
commit | 5b8782ef8948c7aad808971f359401f1dc837c25 (patch) | |
tree | b6ceca72779e3030c7c3ea102f4a2f72676851f9 /include | |
parent | 574cad9d2ac20c8df24aa008eecca39331df0bd6 (diff) |
Disallow nesting of LITMUS^RT locks
Nesting of locks was never supported in LITMUS^RT since
the required analysis does not exist anyway. That is, as
defined in the literature, the protocols implemented
in LITMUS^RT have not been studied in conjunction with
nested critical sections.
In LITMUS^RT, attempting to nest locks could lead to
silent or not-so-silent bugs. This patch makes this
restriction explicit and returns EBUSY when a process
attempts to nest resources.
This is enforced on a protocol-by-protocol basis,
which means that adding protocols with support for
nesting in future versions is not affected by this
change.
Exception: PCP and SRP resources may be nested,
but not within global critical sections.
Diffstat (limited to 'include')
-rw-r--r-- | include/litmus/rt_param.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 4cd06dd32906..5487bdb11380 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -168,6 +168,11 @@ struct rt_param { | |||
168 | unsigned int priority_boosted:1; | 168 | unsigned int priority_boosted:1; |
169 | /* If so, when did this start? */ | 169 | /* If so, when did this start? */ |
170 | lt_t boost_start_time; | 170 | lt_t boost_start_time; |
171 | |||
172 | /* How many LITMUS^RT locks does the task currently hold/wait for? */ | ||
173 | unsigned int num_locks_held; | ||
174 | /* How many PCP/SRP locks does the task currently hold/wait for? */ | ||
175 | unsigned int num_local_locks_held; | ||
171 | #endif | 176 | #endif |
172 | 177 | ||
173 | /* user controlled parameters */ | 178 | /* user controlled parameters */ |