summaryrefslogtreecommitdiffstats
path: root/c/src/librtems++/src
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-08-10 13:28:50 +1000
committerChris Johns <chrisj@rtems.org>2016-08-11 17:24:06 +1000
commit03c1038edbe9b01a72d4775dcb6ffc1a03193a0c (patch)
treee82822781679566a6a824211492e8f8cd98f16b6 /c/src/librtems++/src
parentbuild-system: Always enable C++ if the compiler is present. (diff)
downloadrtems-03c1038edbe9b01a72d4775dcb6ffc1a03193a0c.tar.bz2
librtems++: Remove from RTEMS.
This is old and there are better design patterns for threading and C++. We recommend you use the new C++ standards based support. Closes #2777.
Diffstat (limited to 'c/src/librtems++/src')
-rw-r--r--c/src/librtems++/src/rtemsEvent.cc73
-rw-r--r--c/src/librtems++/src/rtemsInterrupt.cc126
-rw-r--r--c/src/librtems++/src/rtemsMessageQueue.cc163
-rw-r--r--c/src/librtems++/src/rtemsSemaphore.cc173
-rw-r--r--c/src/librtems++/src/rtemsStatusCode.cc75
-rw-r--r--c/src/librtems++/src/rtemsTask.cc274
-rw-r--r--c/src/librtems++/src/rtemsTimer.cc99
7 files changed, 0 insertions, 983 deletions
diff --git a/c/src/librtems++/src/rtemsEvent.cc b/c/src/librtems++/src/rtemsEvent.cc
deleted file mode 100644
index c121e167ea..0000000000
--- a/c/src/librtems++/src/rtemsEvent.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- ------------------------------------------------------------------------
-
- COPYRIGHT (c) 1997
- Objective Design Systems Ltd Pty (ODS)
- All rights reserved (R) Objective Design Systems Ltd Pty
-
- 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.
-
- ------------------------------------------------------------------------
-
- See header file.
-
- ------------------------------------------------------------------------
-*/
-
-#include <rtems++/rtemsEvent.h>
-
-/* ----
- rtemsEvent
-*/
-
-rtemsEvent::rtemsEvent(const char *name_str, uint32_t node)
- : name(rtems_build_name('S', 'E', 'L', 'F')),
- id(RTEMS_SELF)
-{
- connect(name_str, node);
-}
-
-rtemsEvent::rtemsEvent(const rtemsEvent& event)
-{
- name = event.name;
- id = event.id;
-}
-
-rtemsEvent::rtemsEvent()
- : name(rtems_build_name('S', 'E', 'L', 'F')),
- id(RTEMS_SELF)
-{
-}
-
-rtemsEvent::~rtemsEvent()
-{
-}
-
-const rtemsEvent& rtemsEvent::operator=(const rtemsEvent& event)
-{
- name = event.name;
- id = event.id;
-
- return *this;
-}
-
-const rtems_status_code rtemsEvent::connect(const char *name_str,
- const uint32_t node)
-{
- name = rtems_build_name(name_str[0],
- name_str[1],
- name_str[2],
- name_str[3]);
-
- set_status_code(rtems_task_ident(name, node, &id));
-
- if (unsuccessful())
- {
- name = rtems_build_name('S', 'E', 'L', 'F');
- id = RTEMS_SELF;
- }
-
- return last_status_code();
-}
diff --git a/c/src/librtems++/src/rtemsInterrupt.cc b/c/src/librtems++/src/rtemsInterrupt.cc
deleted file mode 100644
index fee91bdac9..0000000000
--- a/c/src/librtems++/src/rtemsInterrupt.cc
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- ------------------------------------------------------------------------
-
- COPYRIGHT (c) 1997
- Objective Design Systems Ltd Pty (ODS)
- All rights reserved (R) Objective Design Systems Ltd Pty
-
- 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.
-
- ------------------------------------------------------------------------
-
- See header file.
-
- ------------------------------------------------------------------------
-*/
-
-#include <rtems++/rtemsInterrupt.h>
-
-#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
-
-/* ----
- Interrupt Table
-
- This table is used to re-direct the call from RTEMS to a user
- object
-*/
-
-static rtemsInterrupt **interrupt_table;
-
-// has the table been initialised
-static bool initialised = false;
-
-/* ----
- rtemsInterrupt
-*/
-
-#include <cstdlib>
-
-rtemsInterrupt::rtemsInterrupt()
- : vector(0),
- caught(false),
- old_handler(0),
- old_interrupt(0)
-{
- if (!initialised)
- {
- interrupt_table = (rtemsInterrupt **)
- malloc(sizeof(rtemsInterrupt *) * CPU_INTERRUPT_NUMBER_OF_VECTORS);
- for (rtems_vector_number vec = 0;
- vec < CPU_INTERRUPT_NUMBER_OF_VECTORS;
- vec++)
- {
- interrupt_table[vec] = 0;
- }
- initialised = true;
- }
-}
-
-rtemsInterrupt::~rtemsInterrupt()
-{
- release();
-}
-
-const rtems_status_code rtemsInterrupt::isr_catch(const rtems_vector_number vec)
-{
- if (vec >= CPU_INTERRUPT_NUMBER_OF_VECTORS)
- return set_status_code(RTEMS_INVALID_NUMBER);
-
- if (caught)
- return set_status_code(RTEMS_RESOURCE_IN_USE);
-
- old_interrupt = interrupt_table[vec];
- interrupt_table[vec] = this;
- vector = vec;
-
-#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
- set_status_code(rtems_interrupt_catch(redirector,
- vector,
- &old_handler));
-#else
- set_status_code(RTEMS_NOT_DEFINED);
-#endif
- if (successful())
- caught = true;
- else
- {
- interrupt_table[vector] = old_interrupt;
- old_interrupt = 0;
- old_handler = 0;
- vector = 0;
- }
-
- return last_status_code();
-}
-
-const rtems_status_code rtemsInterrupt::release(void)
-{
- if (caught)
- {
-#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
- set_status_code(rtems_interrupt_catch(old_handler,
- vector,
- &old_handler));
-#else
- set_status_code(RTEMS_NOT_DEFINED);
-#endif
- interrupt_table[vector] = old_interrupt;
- old_interrupt = 0;
- old_handler = 0;
- vector = 0;
- caught = false;
- }
- else
- set_status_code(RTEMS_SUCCESSFUL);
-
- return last_status_code();
-}
-
-void rtemsInterrupt::redirector(rtems_vector_number vector)
-{
- if (interrupt_table[vector])
- interrupt_table[vector]->handler();
-}
-#endif
diff --git a/c/src/librtems++/src/rtemsMessageQueue.cc b/c/src/librtems++/src/rtemsMessageQueue.cc
deleted file mode 100644
index 0fe8aa53f7..0000000000
--- a/c/src/librtems++/src/rtemsMessageQueue.cc
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- ------------------------------------------------------------------------
-
- COPYRIGHT (c) 1997
- Objective Design Systems Ltd Pty (ODS)
- All rights reserved (R) Objective Design Systems Ltd Pty
-
- 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.
-
- ------------------------------------------------------------------------
-
- See header file.
-
- ------------------------------------------------------------------------
-*/
-
-#include <cstring>
-#include <rtems++/rtemsMessageQueue.h>
-
-/* ----
- rtemsMessageQueue
-*/
-
-rtemsMessageQueue::rtemsMessageQueue(const char* mqname,
- const uint32_t count,
- const size_t max_message_size,
- const WaitMode wait_mode,
- const Scope scope)
- : name(0),
- owner(true),
- id(0)
-{
- strcpy(name_str, "NOID");
- create(mqname, count, max_message_size, wait_mode, scope);
-}
-
-rtemsMessageQueue::rtemsMessageQueue(const char *mqname,
- const uint32_t node)
- : name(0),
- owner(false),
- id(0)
-{
- strcpy(name_str, "NOID");
- connect(mqname, node);
-}
-
-rtemsMessageQueue::rtemsMessageQueue(const rtemsMessageQueue& message_queue)
- : name(0),
- owner(false),
- id(0)
-{
- name = message_queue.name;
- strcpy(name_str, message_queue.name_str);
- id = message_queue.id;
-}
-
-rtemsMessageQueue::rtemsMessageQueue()
- : name(0),
- owner(false),
- id(0)
-{
- strcpy(name_str, "NOID");
-}
-
-rtemsMessageQueue::~rtemsMessageQueue()
-{
- destroy();
-}
-
-void rtemsMessageQueue::make_invalid()
-{
- strcpy(name_str, "NOID");
- name = 0;
- id = 0;
- owner = false;
-}
-
-const rtems_status_code rtemsMessageQueue::create(const char* mqname,
- const uint32_t count,
- const size_t max_message_size,
- const WaitMode wait_mode,
- const Scope scope)
-{
- if (id)
- return set_status_code(RTEMS_ILLEGAL_ON_SELF);
-
- owner = true;
-
- strcpy(name_str, " ");
- for (int c = 0; (c < 4) && (mqname[c] != '\0'); c++)
- name_str[c] = mqname[c];
- name = rtems_build_name(name_str[0],
- name_str[1],
- name_str[2],
- name_str[3]);
-
- set_status_code(rtems_message_queue_create(name,
- count,
- max_message_size,
- scope | wait_mode,
- &id));
-
- if (unsuccessful())
- {
- make_invalid();
- }
-
- return last_status_code();
-}
-
-const rtems_status_code rtemsMessageQueue::destroy()
-{
- if (id && owner)
- {
- set_status_code(rtems_message_queue_delete(id));
- make_invalid();
- }
- else
- set_status_code(RTEMS_NOT_OWNER_OF_RESOURCE);
-
- return last_status_code();
-}
-
-const rtemsMessageQueue& rtemsMessageQueue::operator=(const rtemsMessageQueue& message_queue)
-{
- if (!owner)
- {
- name = message_queue.name;
- strcpy(name_str, message_queue.name_str);
- id = message_queue.id;
- }
-
- return *this;
-}
-
-const rtems_status_code rtemsMessageQueue::connect(const char *mqname,
- const uint32_t node)
-{
- if (id && owner)
- return set_status_code(RTEMS_UNSATISFIED);
-
- // change state to not owner
- owner = false;
-
- strcpy(name_str, " ");
- for (int c = 0; (c < 4) && (mqname[c] != '\0'); c++)
- name_str[c] = mqname[c];
- name = rtems_build_name(name_str[0],
- name_str[1],
- name_str[2],
- name_str[3]);
-
- set_status_code(rtems_message_queue_ident(name, node, &id));
-
- if (unsuccessful())
- {
- make_invalid();
- }
-
- return last_status_code();
-}
diff --git a/c/src/librtems++/src/rtemsSemaphore.cc b/c/src/librtems++/src/rtemsSemaphore.cc
deleted file mode 100644
index 04827b38cd..0000000000
--- a/c/src/librtems++/src/rtemsSemaphore.cc
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- ------------------------------------------------------------------------
-
- COPYRIGHT (c) 1997
- Objective Design Systems Ltd Pty (ODS)
- All rights reserved (R) Objective Design Systems Ltd Pty
-
- 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.
-
- ------------------------------------------------------------------------
-
- See header file.
-
- ------------------------------------------------------------------------
-*/
-
-#include <cstring>
-#include <rtems++/rtemsSemaphore.h>
-
-/* ----
- rtemsSemaphore
-*/
-
-rtemsSemaphore::rtemsSemaphore(const char* sname,
- const Scope scope,
- const uint32_t counter,
- const WaitMode wait_mode,
- const Type type,
- const Priority priority,
- const Ceiling ceiling,
- const rtems_task_priority priority_ceiling)
- : name(0),
- owner(true),
- id(0)
-{
- strcpy(name_str, "NOID");
- create(sname,
- scope,
- counter,
- wait_mode,
- type,
- priority,
- ceiling,
- priority_ceiling);
-}
-
-rtemsSemaphore::rtemsSemaphore(const char *sname, const uint32_t node)
- : name(0),
- owner(false),
- id(0)
-{
- strcpy(name_str, "NOID");
- connect(sname, node);
-}
-
-rtemsSemaphore::rtemsSemaphore(const rtemsSemaphore& semaphore)
- : name(0),
- owner(false),
- id(0)
-{
- name = semaphore.name;
- strcpy(name_str, semaphore.name_str);
- id = semaphore.id;
-}
-
-rtemsSemaphore::rtemsSemaphore()
- : name(0),
- owner(false),
- id(0)
-{
- strcpy(name_str, "NOID");
-}
-
-rtemsSemaphore::~rtemsSemaphore()
-{
- destroy();
-}
-
-void rtemsSemaphore::make_invalid()
-{
- strcpy(name_str, "NOID");
- name = 0;
- id = 0;
- owner = false;
-}
-
-const rtems_status_code rtemsSemaphore::create(const char* sname,
- const Scope scope,
- const uint32_t counter,
- const WaitMode wait_mode,
- const Type type,
- const Priority priority,
- const Ceiling ceiling,
- const rtems_task_priority priority_ceiling)
-{
- if (id)
- return set_status_code(RTEMS_ILLEGAL_ON_SELF);
-
- owner = true;
-
- strcpy(name_str, " ");
- for (int c = 0; (c < 4) && (sname[c] != '\0'); c++)
- name_str[c] = sname[c];
- name = rtems_build_name(name_str[0],
- name_str[1],
- name_str[2],
- name_str[3]);
-
- set_status_code(rtems_semaphore_create(name,
- counter,
- scope | wait_mode | type | priority | ceiling,
- priority_ceiling,
- &id));
-
- if (unsuccessful())
- {
- make_invalid();
- }
-
- return last_status_code();
-}
-
-const rtems_status_code rtemsSemaphore::destroy()
-{
- if (id && owner)
- {
- set_status_code(rtems_semaphore_delete(id));
- make_invalid();
- }
- else
- set_status_code(RTEMS_NOT_OWNER_OF_RESOURCE);
-
- return last_status_code();
-}
-
-const rtemsSemaphore& rtemsSemaphore::operator=(const rtemsSemaphore& semaphore)
-{
- if (!owner)
- {
- name = semaphore.name;
- id = semaphore.id;
- }
- return *this;
-}
-
-const rtems_status_code rtemsSemaphore::connect(const char *sname,
- const uint32_t node)
-{
- if (id && owner)
- return set_status_code(RTEMS_UNSATISFIED);
-
- // change state to not owner
- owner = false;
-
- strcpy(name_str, " ");
- for (int c = 0; (c < 4) && (sname[c] != '\0'); c++)
- name_str[c] = sname[c];
- name = rtems_build_name(name_str[0],
- name_str[1],
- name_str[2],
- name_str[3]);
-
- set_status_code(rtems_semaphore_ident(name, node, &id));
-
- if (unsuccessful())
- {
- make_invalid();
- }
-
- return last_status_code();
-}
diff --git a/c/src/librtems++/src/rtemsStatusCode.cc b/c/src/librtems++/src/rtemsStatusCode.cc
deleted file mode 100644
index 476110bc84..0000000000
--- a/c/src/librtems++/src/rtemsStatusCode.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- ------------------------------------------------------------------------
-
- COPYRIGHT (c) 1997
- Objective Design Systems Ltd Pty (ODS)
- All rights reserved (R) Objective Design Systems Ltd Pty
-
- 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.
-
- ------------------------------------------------------------------------
-
- See header file.
-
- ------------------------------------------------------------------------
-*/
-
-#include <rtems++/rtemsStatusCode.h>
-
-/* ----
- Status Code string table
-*/
-
-static const char *status_strings[RTEMS_STATUS_CODES_LAST + 1] =
-{
- "RTEMS[00] successful completion",
- "RTEMS[01] task exitted, returned from a thread",
- "RTEMS[02] multiprocessing not configured",
- "RTEMS[03] invalid object name",
- "RTEMS[04] invalid object id",
- "RTEMS[05] too many",
- "RTEMS[06] timed out waiting",
- "RTEMS[07] object deleted while waiting",
- "RTEMS[08] specified size was invalid",
- "RTEMS[09] address specified is invalid",
- "RTEMS[10] number was invalid",
- "RTEMS[11] item has not been initialized",
- "RTEMS[12] resources still outstanding",
- "RTEMS[13] request not satisfied",
- "RTEMS[14] thread is in wrong state",
- "RTEMS[15] thread already in state",
- "RTEMS[16] illegal on calling thread",
- "RTEMS[17] illegal for remote object",
- "RTEMS[18] called from wrong environment",
- "RTEMS[19] invalid thread priority",
- "RTEMS[20] invalid date/time",
- "RTEMS[21] invalid node id",
- "RTEMS[22] directive not configured",
- "RTEMS[23] not owner of resource",
- "RTEMS[24] directive not implemented",
- "RTEMS[25] RTEMS inconsistency detected",
- "RTEMS[26] could not get enough memory"
-};
-
-/* ----
- StatusCode
-*/
-
-const char *rtemsStatusCode::last_status_string()
-{
- return status_string(last_status);
-}
-
-const char *rtemsStatusCode::status_string(rtems_status_code status_code)
-{
- // mapped from "rtems/rtems/status.h"
- if (status_code <= RTEMS_STATUS_CODES_LAST)
- {
- return status_strings[status_code];
- }
-
- return "unknown status code";
-}
-
diff --git a/c/src/librtems++/src/rtemsTask.cc b/c/src/librtems++/src/rtemsTask.cc
deleted file mode 100644
index c8607d2fd9..0000000000
--- a/c/src/librtems++/src/rtemsTask.cc
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- ------------------------------------------------------------------------
-
- COPYRIGHT (c) 1997
- Objective Design Systems Ltd Pty (ODS)
- All rights reserved (R) Objective Design Systems Ltd Pty
-
- 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.
-
- ------------------------------------------------------------------------
-
- See header file.
-
- ------------------------------------------------------------------------
-*/
-
-#include <cstring>
-#include <rtems++/rtemsTask.h>
-// include to allow it to be compiled
-#include <rtems++/rtemsTaskMode.h>
-
-/* ----
- rtemsTask
-*/
-
-rtemsTask::rtemsTask(const char* tname,
- const rtems_task_priority initial_priority,
- const uint32_t stack_size,
- const rtems_mode preemption,
- const rtems_mode timeslice,
- const rtems_mode asr,
- const rtems_interrupt_level interrupt_level,
- const FloatingPoint floating_point,
- const Scope scope)
- : name(rtems_build_name('S', 'E', 'L', 'F')),
- owner(true),
- id(RTEMS_SELF),
- argument(0)
-{
- strcpy(name_str, "SELF");
- create(tname,
- initial_priority,
- stack_size,
- preemption,
- timeslice,
- asr,
- interrupt_level,
- floating_point,
- scope);
-}
-
-rtemsTask::rtemsTask(const char *tname, uint32_t node)
- : name(rtems_build_name('S', 'E', 'L', 'F')),
- owner(false),
- id(RTEMS_SELF),
- argument(0)
-{
- strcpy(name_str, "SELF");
- connect(tname, node);
-}
-
-rtemsTask::rtemsTask(const rtemsTask& task)
- : name(rtems_build_name('S', 'E', 'L', 'F')),
- owner(false),
- id(RTEMS_SELF),
- argument(0)
-{
- name = task.name;
- strcpy(name_str, task.name_str);
- argument = task.argument;
- id = task.id;
-}
-
-rtemsTask::rtemsTask()
- : name(rtems_build_name('S', 'E', 'L', 'F')),
- owner(false),
- id(RTEMS_SELF),
- argument(0)
-{
- strcpy(name_str, "SELF");
-}
-
-rtemsTask::~rtemsTask()
-{
- destroy();
-}
-
-void rtemsTask::make_self()
-{
- strcpy(name_str, "SELF");
- name = rtems_build_name('S', 'E', 'L', 'F');
- id = RTEMS_SELF;
- owner = false;
-}
-
-const rtems_status_code rtemsTask::create(const char* tname,
- const rtems_task_priority initial_priority,
- const uint32_t stack_size,
- const rtems_mode preemption,
- const rtems_mode timeslice,
- const rtems_mode asr,
- const rtems_interrupt_level interrupt_level,
- const FloatingPoint floating_point,
- const Scope scope)
-{
- if (id)
- return set_status_code(RTEMS_ILLEGAL_ON_SELF);
-
- owner = true;
-
- strcpy(name_str, " ");
- for (int c = 0; (c < 4) && (tname[c] != '\0'); c++)
- name_str[c] = tname[c];
- name = rtems_build_name(name_str[0],
- name_str[1],
- name_str[2],
- name_str[3]);
-
- // protect the values that be set as the parameters are not enums
- set_status_code(rtems_task_create(name,
- initial_priority,
- stack_size,
- (preemption & RTEMS_PREEMPT_MASK) |
- (timeslice & RTEMS_TIMESLICE_MASK) |
- (asr & RTEMS_ASR_MASK) |
- (interrupt_level & RTEMS_INTERRUPT_MASK),
- floating_point | scope,
- &id));
-
- if (unsuccessful())
- {
- make_self();
- }
-
- return last_status_code();
-}
-
-const rtems_status_code rtemsTask::destroy()
-{
- if (id && owner)
- {
- set_status_code(rtems_task_delete(id));
- make_self();
- }
- else
- set_status_code(RTEMS_NOT_OWNER_OF_RESOURCE);
-
- return last_status_code();
-}
-
-const rtemsTask& rtemsTask::operator=(const rtemsTask& task)
-{
- if (!owner)
- {
- name = task.name;
- strcpy(name_str, task.name_str);
- argument = task.argument;
- id = task.id;
- }
- return *this;
-}
-
-const rtems_status_code rtemsTask::connect(const char *sname,
- const uint32_t node)
-{
- if (id && owner)
- return set_status_code(RTEMS_UNSATISFIED);
-
- // change state to not owner
- owner = false;
-
- strcpy(name_str, " ");
- for (int c = 0; (c < 4) && (sname[c] != '\0'); c++)
- name_str[c] = sname[c];
- name = rtems_build_name(name_str[0],
- name_str[1],
- name_str[2],
- name_str[3]);
-
- set_status_code(rtems_task_ident(name, node, &id));
-
- if (unsuccessful())
- {
- make_self();
- }
-
- return last_status_code();
-}
-
-const rtems_status_code rtemsTask::start(const rtems_task_argument arg)
-{
- if (owner)
- {
- argument = arg;
- // pass the this pointer as the argument
- set_status_code(rtems_task_start(id,
- origin,
- (rtems_task_argument) this));
- }
- else
- set_status_code(RTEMS_NOT_OWNER_OF_RESOURCE);
- return last_status_code();
-}
-
-const rtems_status_code rtemsTask::restart(const rtems_task_argument arg)
-{
- if (owner)
- {
- argument = arg;
- set_status_code(rtems_task_restart(id, (rtems_task_argument) this));
- }
- else
- set_status_code(RTEMS_NOT_OWNER_OF_RESOURCE);
-
- return last_status_code();
-}
-
-const rtems_status_code rtemsTask::suspend()
-{
- return set_status_code(rtems_task_suspend(id));
-}
-
-const rtems_status_code rtemsTask::resume()
-{
- return set_status_code(rtems_task_resume(id));
-}
-
-const rtems_status_code rtemsTask::wake_after(const rtems_interval micro_secs)
-{
- rtems_interval usecs =
- (micro_secs < rtems_configuration_get_microseconds_per_tick()) ?
- rtems_configuration_get_microseconds_per_tick() : micro_secs;
- return set_status_code(rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(usecs)));
-}
-
-const rtems_status_code rtemsTask::wake_when(const rtems_time_of_day& tod)
-{
- return set_status_code(rtems_task_wake_when((rtems_time_of_day*) &tod));
-}
-
-const rtems_status_code rtemsTask::get_priority(rtems_task_priority& priority)
-{
- return set_status_code(rtems_task_set_priority(id,
- RTEMS_CURRENT_PRIORITY,
- &priority));
-}
-
-const rtems_status_code rtemsTask::set_priority(const rtems_task_priority priority)
-{
- rtems_task_priority old_priority;
- return set_status_code(rtems_task_set_priority(id,
- priority,
- &old_priority));
-}
-
-const rtems_status_code rtemsTask::set_priority(const rtems_task_priority priority,
- rtems_task_priority& old_priority)
-{
- return set_status_code(rtems_task_set_priority(id,
- priority,
- &old_priority));
-}
-
-void rtemsTask::body(rtems_task_argument )
-{
-}
-
-rtems_task rtemsTask::origin(rtems_task_argument argument)
-{
- rtemsTask *task = (rtemsTask*) argument;
- task->body(task->argument);
-}
diff --git a/c/src/librtems++/src/rtemsTimer.cc b/c/src/librtems++/src/rtemsTimer.cc
deleted file mode 100644
index 899c3f611c..0000000000
--- a/c/src/librtems++/src/rtemsTimer.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- ------------------------------------------------------------------------
-
- COPYRIGHT (c) 1997
- Objective Design Systems Ltd Pty (ODS)
- All rights reserved (R) Objective Design Systems Ltd Pty
-
- 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.
-
- ------------------------------------------------------------------------
-
- See header file.
-
- ------------------------------------------------------------------------
-*/
-
-#include <cstring>
-#include <rtems++/rtemsTimer.h>
-
-/* ----
- rtemsTimer
-*/
-
-rtemsTimer::rtemsTimer(const char* tname)
- : name(0),
- repeat(false),
- id(0)
-{
- strcpy(name_str, " ");
- create(tname);
-}
-
-rtemsTimer::rtemsTimer()
- : name(0),
- repeat(false),
- id(0)
-{
- strcpy(name_str, " ");
-}
-
-rtemsTimer::~rtemsTimer()
-{
- destroy();
-}
-
-void rtemsTimer::make_invalid()
-{
- strcpy(name_str, " ");
- name = 0;
- id = 0;
- repeat = false;
-}
-const rtems_status_code rtemsTimer::create(const char* tname)
-{
- if (id)
- return set_status_code(RTEMS_ILLEGAL_ON_SELF);
-
- strcpy(name_str, " ");
- for (int c = 0; (c < 4) && (tname[c] != '\0'); c++)
- name_str[c] = tname[c];
- name = rtems_build_name(name_str[0],
- name_str[1],
- name_str[2],
- name_str[3]);
-
- set_status_code(rtems_timer_create(name, &id));
-
- if (unsuccessful())
- {
- make_invalid();
- }
-
- return last_status_code();
-}
-
-const rtems_status_code rtemsTimer::destroy()
-{
- if (id)
- {
- set_status_code(rtems_timer_delete(id));
- make_invalid();
- }
- else
- set_status_code(RTEMS_NOT_OWNER_OF_RESOURCE);
-
- return last_status_code();
-}
-
-void rtemsTimer::common_handler(rtems_id , void *user_data)
-{
- rtemsTimer *timer = (rtemsTimer*) user_data;
-
- if (timer->repeat)
- timer->reset();
-
- timer->triggered();
-}