summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/semobtain.c
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2016-06-09 11:33:15 -0400
committerGedare Bloom <gedare@rtems.org>2016-07-25 12:44:47 -0400
commitf23d4706169d68d3c4e90b297650f89c272716f4 (patch)
tree333bdc4b4be2ec4ad7ee80ee03229759ec60602a /cpukit/rtems/src/semobtain.c
parentscore: Fix for RTEMS_DEBUG (diff)
downloadrtems-f23d4706169d68d3c4e90b297650f89c272716f4.tar.bz2
cpukit: Add and use Watchdog_Discipline.
Clock disciplines may be WATCHDOG_RELATIVE, WATCHDOG_ABSOLUTE, or WATCHDOG_NO_TIMEOUT. A discipline of WATCHDOG_RELATIVE with a timeout of WATCHDOG_NO_TIMEOUT is equivalent to a discipline of WATCHDOG_NO_TIMEOUT. updates #2732
Diffstat (limited to 'cpukit/rtems/src/semobtain.c')
-rw-r--r--cpukit/rtems/src/semobtain.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c
index 0e5330af41..9afef54917 100644
--- a/cpukit/rtems/src/semobtain.c
+++ b/cpukit/rtems/src/semobtain.c
@@ -69,13 +69,14 @@ rtems_status_code rtems_semaphore_obtain(
executing = _Thread_Executing;
wait = !_Options_Is_no_wait( option_set );
+ _Thread_queue_Context_set_relative_timeout( &queue_context, timeout );
+
switch ( the_semaphore->variant ) {
case SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY:
status = _CORE_recursive_mutex_Seize(
&the_semaphore->Core_control.Mutex.Recursive,
executing,
wait,
- timeout,
_CORE_recursive_mutex_Seize_nested,
&queue_context
);
@@ -85,7 +86,6 @@ rtems_status_code rtems_semaphore_obtain(
&the_semaphore->Core_control.Mutex,
executing,
wait,
- timeout,
_CORE_recursive_mutex_Seize_nested,
&queue_context
);
@@ -96,7 +96,6 @@ rtems_status_code rtems_semaphore_obtain(
_Semaphore_Get_operations( the_semaphore ),
executing,
wait,
- timeout,
_CORE_recursive_mutex_Seize_nested,
&queue_context
);
@@ -107,7 +106,6 @@ rtems_status_code rtems_semaphore_obtain(
&the_semaphore->Core_control.MRSP,
executing,
wait,
- timeout,
&queue_context
);
break;
@@ -122,7 +120,6 @@ rtems_status_code rtems_semaphore_obtain(
_Semaphore_Get_operations( the_semaphore ),
executing,
wait,
- timeout,
&queue_context
);
break;