summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-13 20:54:01 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-13 20:54:01 +0000
commit8907a01c00bb48f40f9feb009dc85c51945eb5b2 (patch)
tree3b5d3cc760e942e3a3376192c68234fa8288b159 /cpukit
parent2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-8907a01c00bb48f40f9feb009dc85c51945eb5b2.tar.bz2
2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/include/rtems/score/coresem.h, score/src/coresemseize.c: Disable body of _CORE_semaphore_Seize() if it is not used because all APIs using it are disabled.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/score/include/rtems/score/coresem.h44
-rw-r--r--cpukit/score/src/coresemseize.c7
3 files changed, 34 insertions, 23 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index f672ff1ee7..866c4e9453 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,11 @@
2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * score/include/rtems/score/coresem.h, score/src/coresemseize.c:
+ Disable body of _CORE_semaphore_Seize() if it is not used because all
+ APIs using it are disabled.
+
+2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* score/include/rtems/score/tod.h: Fix typo.
2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
diff --git a/cpukit/score/include/rtems/score/coresem.h b/cpukit/score/include/rtems/score/coresem.h
index 39cb20bdc3..1b91a22cbd 100644
--- a/cpukit/score/include/rtems/score/coresem.h
+++ b/cpukit/score/include/rtems/score/coresem.h
@@ -38,6 +38,10 @@ extern "C" {
#include <rtems/score/priority.h>
#include <rtems/score/watchdog.h>
+#if defined(RTEMS_POSIX_API) || defined(RTEMS_ITRON_API)
+ #define RTEMS_SCORE_CORESEM_ENABLE_SEIZE_BODY
+#endif
+
/**
* The following type defines the callout which the API provides
* to support global/multiprocessor operations on semaphores.
@@ -135,25 +139,27 @@ void _CORE_semaphore_Initialize(
uint32_t initial_value
);
-/**
- * This routine attempts to receive a unit from @a the_semaphore.
- * If a unit is available or if the wait flag is false, then the routine
- * returns. Otherwise, the calling task is blocked until a unit becomes
- * available.
- *
- * @param[in] the_semaphore is the semaphore to seize
- * @param[in] id is the Id of the API level Semaphore object associated
- * with this instance of a SuperCore Semaphore
- * @param[in] wait indicates if the caller is willing to block
- * @param[in] timeout is the number of ticks the calling thread is willing
- * to wait if @a wait is true.
- */
-void _CORE_semaphore_Seize(
- CORE_semaphore_Control *the_semaphore,
- Objects_Id id,
- bool wait,
- Watchdog_Interval timeout
-);
+#if defined(RTEMS_SCORE_CORESEM_ENABLE_SEIZE_BODY)
+ /**
+ * This routine attempts to receive a unit from @a the_semaphore.
+ * If a unit is available or if the wait flag is false, then the routine
+ * returns. Otherwise, the calling task is blocked until a unit becomes
+ * available.
+ *
+ * @param[in] the_semaphore is the semaphore to seize
+ * @param[in] id is the Id of the API level Semaphore object associated
+ * with this instance of a SuperCore Semaphore
+ * @param[in] wait indicates if the caller is willing to block
+ * @param[in] timeout is the number of ticks the calling thread is willing
+ * to wait if @a wait is true.
+ */
+ void _CORE_semaphore_Seize(
+ CORE_semaphore_Control *the_semaphore,
+ Objects_Id id,
+ bool wait,
+ Watchdog_Interval timeout
+ );
+#endif
/**
* This routine frees a unit to the semaphore. If a task was blocked waiting
diff --git a/cpukit/score/src/coresemseize.c b/cpukit/score/src/coresemseize.c
index aa1068e979..17f21a43c1 100644
--- a/cpukit/score/src/coresemseize.c
+++ b/cpukit/score/src/coresemseize.c
@@ -28,10 +28,8 @@
#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
-/*PAGE
- *
- * _CORE_semaphore_Seize
- *
+#if defined(RTEMS_SCORE_CORESEM_ENABLE_SEIZE_BODY)
+/*
* This routine attempts to allocate a core semaphore to the calling thread.
*
* Input parameters:
@@ -87,3 +85,4 @@ void _CORE_semaphore_Seize(
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
}
+#endif