summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coresemseize.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-02 14:02:20 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:46 +0200
commitcfa5aabc786c27887f219b92c1a6566020d96f1a (patch)
tree2811e16312c880f3d09b2aecd510f2df6d301507 /cpukit/score/src/coresemseize.c
parentscore: Fine grained locking for semaphores (diff)
downloadrtems-cfa5aabc786c27887f219b92c1a6566020d96f1a.tar.bz2
score: Delete _CORE_semaphore_Seize()
Rename _CORE_semaphore_Seize_isr_disable() to _CORE_semaphore_Seize().
Diffstat (limited to 'cpukit/score/src/coresemseize.c')
-rw-r--r--cpukit/score/src/coresemseize.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/cpukit/score/src/coresemseize.c b/cpukit/score/src/coresemseize.c
deleted file mode 100644
index 6ecf2c4c8f..0000000000
--- a/cpukit/score/src/coresemseize.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * @file
- *
- * @brief Core Semaphore Seize
- *
- * @ingroup ScoreSemaphore
- */
-
-/*
- * COPYRIGHT (c) 1989-2008.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/coresemimpl.h>
-#include <rtems/score/thread.h>
-
-#if defined(RTEMS_SCORE_CORESEM_ENABLE_SEIZE_BODY)
-
-void _CORE_semaphore_Seize(
- CORE_semaphore_Control *the_semaphore,
- Thread_Control *executing,
- Objects_Id id,
- bool wait,
- Watchdog_Interval timeout
-)
-{
- ISR_lock_Context lock_context;
-
- executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
- _Thread_queue_Acquire( &the_semaphore->Wait_queue, &lock_context );
- if ( the_semaphore->count != 0 ) {
- the_semaphore->count -= 1;
- _Thread_queue_Release( &the_semaphore->Wait_queue, &lock_context );
- return;
- }
-
- /*
- * If the semaphore was not available and the caller was not willing
- * to block, then return immediately with a status indicating that
- * the semaphore was not available and the caller never blocked.
- */
- if ( !wait ) {
- _Thread_queue_Release( &the_semaphore->Wait_queue, &lock_context );
- executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
- return;
- }
-
- /*
- * If the semaphore is not available and the caller is willing to
- * block, then we now block the caller with optional timeout.
- */
- executing->Wait.id = id;
- _Thread_queue_Enqueue_critical(
- &the_semaphore->Wait_queue,
- executing,
- STATES_WAITING_FOR_SEMAPHORE,
- timeout,
- CORE_SEMAPHORE_TIMEOUT,
- &lock_context
- );
-}
-#endif