summaryrefslogtreecommitdiffstats
path: root/c/src/lib/include/rtems++/rtemsInterrupt.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-30 18:38:26 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-30 18:38:26 +0000
commita71938283c65531e49a6398905be59705c36b748 (patch)
tree510baa09390975da38b75eae9dab4b267c7e3674 /c/src/lib/include/rtems++/rtemsInterrupt.h
parentPatch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>: (diff)
downloadrtems-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++/rtemsInterrupt.h')
-rw-r--r--c/src/lib/include/rtems++/rtemsInterrupt.h105
1 files changed, 0 insertions, 105 deletions
diff --git a/c/src/lib/include/rtems++/rtemsInterrupt.h b/c/src/lib/include/rtems++/rtemsInterrupt.h
deleted file mode 100644
index f722eb7683..0000000000
--- a/c/src/lib/include/rtems++/rtemsInterrupt.h
+++ /dev/null
@@ -1,105 +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.
-
- ------------------------------------------------------------------------
-
- rtemsInterrupt class.
-
- This class catches an interrupt and passes control to the user's
- derived class throught the handler method.
-
- The interrupt is released back to the previous handler when this
- object destructs.
-
- The old handler can be chained to after the interrupt is
- caught. Watch the stack usage!
-
- More than one instance of this class can catch the same vector. The
- application will have to chain to the other objects if required. If
- the old handler is not an instance of this class the chain is passed
- as "void (*)(void)". If it is an instance of this class, the handler
- method is directly called.
-
- The isr catch extends the documented return codes with :
-
- RTEMS_RESOURCE_IN_USE = interrupt already caught
-
- ------------------------------------------------------------------------ */
-
-#if !defined(_rtemsInterrupt_h_)
-#define _rtemsInterrupt_h_
-
-#include <rtems++/rtemsStatusCode.h>
-
-/* ----
- rtemsInterrupt
-*/
-
-class rtemsInterrupt
- : public rtemsStatusCode
-{
-public:
- rtemsInterrupt();
- virtual ~rtemsInterrupt();
-
- // catch the interrupt
- virtual const rtems_status_code isr_catch(const rtems_vector_number vector);
-
- // release the interrupt back to the previous handle
- virtual const rtems_status_code release();
-
- // the old handler
- const rtems_isr_entry old_isr_handler() const { return old_handler; }
-
-protected:
-
- // called after the interrupt is caught and it goes off
- virtual void handler() = 0;
-
- // chain to the previous handler,
- inline void chain() const;
-
-private:
- const rtemsInterrupt& operator=(const rtemsInterrupt& );
- rtemsInterrupt(const rtemsInterrupt& );
-
- // the vector caught
- rtems_vector_number vector;
-
- // true when the interrupt is caught
- bool caught;
-
- // returned when catching the interrupt
- rtems_isr_entry old_handler;
-
- // old interrupt table entry
- rtemsInterrupt *old_interrupt;
-
- // common handler to redirect the interrupts
- static void redirector(rtems_vector_number vector);
-};
-
-void rtemsInterrupt::chain() const
-{
- if (old_interrupt)
- old_interrupt->handler();
- else if (old_handler)
- ((void(*)()) old_handler)();
-}
-
-#endif // _rtemsInterrupt_h_
-
-
-
-
-