mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-25 05:47:12 +00:00
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.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
@@ -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,6 +139,7 @@ void _CORE_semaphore_Initialize(
|
||||
uint32_t initial_value
|
||||
);
|
||||
|
||||
#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
|
||||
@@ -154,6 +159,7 @@ void _CORE_semaphore_Seize(
|
||||
bool wait,
|
||||
Watchdog_Interval timeout
|
||||
);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This routine frees a unit to the semaphore. If a task was blocked waiting
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user