From bbd7ea22e18e7527011c9361be34a7bbdb0eb318 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 16 Dec 2008 15:58:50 +0000 Subject: 2008-12-16 Joel Sherrill * include/rtems++/rtemsEvent.h, include/rtems++/rtemsMessageQueue.h, include/rtems++/rtemsSemaphore.h, src/rtemsTask.cc: Use public API not _TOD_Microseconds_per_tick. --- c/src/librtems++/ChangeLog | 6 ++++++ c/src/librtems++/include/rtems++/rtemsEvent.h | 4 ++-- c/src/librtems++/include/rtems++/rtemsMessageQueue.h | 4 ++-- c/src/librtems++/include/rtems++/rtemsSemaphore.h | 7 ++++--- c/src/librtems++/src/rtemsTask.cc | 4 ++-- 5 files changed, 16 insertions(+), 9 deletions(-) (limited to 'c/src/librtems++') diff --git a/c/src/librtems++/ChangeLog b/c/src/librtems++/ChangeLog index 86a7294d18..d959faecfe 100644 --- a/c/src/librtems++/ChangeLog +++ b/c/src/librtems++/ChangeLog @@ -1,3 +1,9 @@ +2008-12-16 Joel Sherrill + + * 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 * include/rtems++/rtemsTaskMode.h: Convert to "bool". diff --git a/c/src/librtems++/include/rtems++/rtemsEvent.h b/c/src/librtems++/include/rtems++/rtemsEvent.h index ea41d4919e..e35d802670 100644 --- a/c/src/librtems++/include/rtems++/rtemsEvent.h +++ b/c/src/librtems++/include/rtems++/rtemsEvent.h @@ -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), diff --git a/c/src/librtems++/include/rtems++/rtemsMessageQueue.h b/c/src/librtems++/include/rtems++/rtemsMessageQueue.h index 43f8e832b7..894ba9427f 100644 --- a/c/src/librtems++/include/rtems++/rtemsMessageQueue.h +++ b/c/src/librtems++/include/rtems++/rtemsMessageQueue.h @@ -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, diff --git a/c/src/librtems++/include/rtems++/rtemsSemaphore.h b/c/src/librtems++/include/rtems++/rtemsSemaphore.h index be68a0513e..cadf4288b8 100644 --- a/c/src/librtems++/include/rtems++/rtemsSemaphore.h +++ b/c/src/librtems++/include/rtems++/rtemsSemaphore.h @@ -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, diff --git a/c/src/librtems++/src/rtemsTask.cc b/c/src/librtems++/src/rtemsTask.cc index de02dba9c6..928cfc93f7 100644 --- a/c/src/librtems++/src/rtemsTask.cc +++ b/c/src/librtems++/src/rtemsTask.cc @@ -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))); } -- cgit v1.2.3