forked from Imagelibrary/rtems
2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/rtems++/rtemsEvent.h, include/rtems++/rtemsMessageQueue.h, include/rtems++/rtemsSemaphore.h, src/rtemsTask.cc: Use public API not _TOD_Microseconds_per_tick.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* include/rtems++/rtemsEvent.h, include/rtems++/rtemsMessageQueue.h,
|
||||
include/rtems++/rtemsSemaphore.h, src/rtemsTask.cc: Use public API
|
||||
not _TOD_Microseconds_per_tick.
|
||||
|
||||
2008-09-05 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* include/rtems++/rtemsTaskMode.h: Convert to "bool".
|
||||
|
||||
@@ -110,8 +110,8 @@ const rtems_status_code rtemsEvent::receive(const rtems_event_set event_in,
|
||||
const Condition condition)
|
||||
{
|
||||
rtems_interval usecs =
|
||||
micro_secs && (micro_secs < _TOD_Microseconds_per_tick) ?
|
||||
_TOD_Microseconds_per_tick : micro_secs;
|
||||
(micro_secs < rtems_configuration_get_microseconds_per_tick()) ?
|
||||
rtems_configuration_get_microseconds_per_tick() : micro_secs;
|
||||
set_status_code(rtems_event_receive(event_in,
|
||||
wait | condition,
|
||||
TOD_MICROSECONDS_TO_TICKS(usecs),
|
||||
|
||||
@@ -155,8 +155,8 @@ const rtems_status_code rtemsMessageQueue::receive(const void *buffer,
|
||||
bool wait)
|
||||
{
|
||||
rtems_interval usecs =
|
||||
micro_secs && (micro_secs < _TOD_Microseconds_per_tick) ?
|
||||
_TOD_Microseconds_per_tick : micro_secs;
|
||||
(micro_secs < rtems_configuration_get_microseconds_per_tick()) ?
|
||||
rtems_configuration_get_microseconds_per_tick() : micro_secs;
|
||||
return set_status_code(rtems_message_queue_receive(id,
|
||||
(void*) buffer,
|
||||
&size,
|
||||
|
||||
@@ -128,9 +128,10 @@ private:
|
||||
const rtems_status_code rtemsSemaphore::obtain(const bool wait,
|
||||
const uint32_t micro_secs)
|
||||
{
|
||||
rtems_interval usecs =
|
||||
micro_secs && (micro_secs < _TOD_Microseconds_per_tick) ?
|
||||
_TOD_Microseconds_per_tick : micro_secs;
|
||||
rtems_interval usecs = micro_secs &&
|
||||
(micro_secs < rtems_configuration_get_microseconds_per_tick()) ?
|
||||
rtems_configuration_get_microseconds_per_tick() : micro_secs;
|
||||
|
||||
return
|
||||
set_status_code(rtems_semaphore_obtain(id,
|
||||
wait ? RTEMS_WAIT : RTEMS_NO_WAIT,
|
||||
|
||||
@@ -232,8 +232,8 @@ const rtems_status_code rtemsTask::resume()
|
||||
const rtems_status_code rtemsTask::wake_after(const rtems_interval micro_secs)
|
||||
{
|
||||
rtems_interval usecs =
|
||||
micro_secs && (micro_secs < _TOD_Microseconds_per_tick) ?
|
||||
_TOD_Microseconds_per_tick : micro_secs;
|
||||
(micro_secs < rtems_configuration_get_microseconds_per_tick()) ?
|
||||
rtems_configuration_get_microseconds_per_tick() : micro_secs;
|
||||
return set_status_code(rtems_task_wake_after(TOD_MICROSECONDS_TO_TICKS(usecs)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user