diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-08-30 18:38:26 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-08-30 18:38:26 +0000 |
commit | a71938283c65531e49a6398905be59705c36b748 (patch) | |
tree | 510baa09390975da38b75eae9dab4b267c7e3674 /c/src/lib/include/rtems++/rtemsEvent.h | |
parent | Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>: (diff) | |
download | rtems-a71938283c65531e49a6398905be59705c36b748.tar.bz2 |
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to move
c/src/lib/librtems++ and c/src/lib/include/rtems++ to
their own package librtems++ at the top of the tree.
To apply:
mkdir c/src/librtems++
cp c/src/lib/librtems++/README c/src/librtems++
mkdir c/src/librtems++/src
cp c/src/lib/librtems++/*.cc c/src/librtems++/src
cp c/src/lib/librtems++/Makefile.in c/src/librtems++/src
mkdir c/src/librtems++/include
mkdir c/src/librtems++/include/rtems++
cp c/src/lib/include/rtems++/*.h c/src/librtems++/include/rtems++
patch -p1 <rtems-rc-19990802-5.diff
rm -rf c/src/lib/librtems++
rm -rf c/src/lib/include/rtems++
./autogen
Attention:
* The procedure above copies the files first, then patches them
and finally removes the old files afterwards. This has been done
to enable you to copy the files in CVS to preserve their history.
Diffstat (limited to 'c/src/lib/include/rtems++/rtemsEvent.h')
-rw-r--r-- | c/src/lib/include/rtems++/rtemsEvent.h | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/c/src/lib/include/rtems++/rtemsEvent.h b/c/src/lib/include/rtems++/rtemsEvent.h deleted file mode 100644 index 3cc19eeb32..0000000000 --- a/c/src/lib/include/rtems++/rtemsEvent.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - ------------------------------------------------------------------------ - $Id$ - ------------------------------------------------------------------------ - - 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.OARcorp.com/rtems/license.html. - - ------------------------------------------------------------------------ - - rtemsEvent class. - - This class allows the user to send and receive RTEMS events to a task. - - ------------------------------------------------------------------------ */ - -#if !defined(_rtemsEvent_h_) -#define _rtemsEvent_h_ - -#include <rtems++/rtemsStatusCode.h> -#include <rtems++/rtemsTask.h> - -/* ---- - rtemsEvent -*/ - -class rtemsEvent - : public rtemsStatusCode -{ -public: - // attribute a task can have - - enum WaitMode { wait = RTEMS_WAIT, - no_wait = RTEMS_NO_WAIT}; - enum Condition { any = RTEMS_EVENT_ANY, - all = RTEMS_EVENT_ALL}; - - // only the first 4 characters of the name are taken - - // connect to a task - rtemsEvent(const char* name, rtems_unsigned32 node = RTEMS_SEARCH_ALL_NODES); - - // copy and default constructors - rtemsEvent(const rtemsEvent& event); - rtemsEvent(); - - virtual ~rtemsEvent(); - - // connect to an existing task object, will not be the owner - const rtemsEvent& operator=(const rtemsEvent& event); - virtual const rtems_status_code connect(const char *name, - const rtems_unsigned32 node = RTEMS_SEARCH_ALL_NODES); - - // send an event - inline const rtems_status_code send(const rtems_id task, - const rtems_event_set events); - inline const rtems_status_code send(const rtemsTask& task, - const rtems_event_set events) ; - inline const rtems_status_code send(const rtems_event_set events); - - // receive an event, can block a task if no events waiting - inline const rtems_status_code receive(const rtems_event_set event_in, - rtems_event_set& event_out, - const rtems_interval micro_secs = 0, - const WaitMode wait = wait, - const Condition condition = any); - - // object id, and name - const rtems_id task_id_is() const { return id; } - const rtems_name task_name_is() const { return name; } - -private: - // task name - rtems_name name; - - // the rtems task id, object handle - rtems_id id; - -}; - -const rtems_status_code rtemsEvent::send(const rtems_id task, - const rtems_event_set events) -{ - set_status_code(rtems_event_send(task, events)); - return last_status_code(); -} - -const rtems_status_code rtemsEvent::send(const rtemsTask& task, - const rtems_event_set events) -{ - set_status_code(rtems_event_send(task.id_is(), events)); - return last_status_code(); -} - -const rtems_status_code rtemsEvent::send(const rtems_event_set events) -{ - set_status_code(rtems_event_send(id, events)); - return last_status_code(); -} - -const rtems_status_code rtemsEvent::receive(const rtems_event_set event_in, - rtems_event_set& event_out, - const rtems_interval micro_secs, - const WaitMode wait, - const Condition condition) -{ - rtems_interval usecs = - micro_secs && (micro_secs < _TOD_Microseconds_per_tick) ? - _TOD_Microseconds_per_tick : micro_secs; - set_status_code(rtems_event_receive(event_in, - wait | condition, - TOD_MICROSECONDS_TO_TICKS(usecs), - &event_out)); - return last_status_code(); -} - -#endif // _rtemsEvent_h_ - - - - - |