1  /*
   2   * \brief  IRQ session interface
   3   * \author Christian Helmuth
   4   * \date   2007-09-13
   5   *
   6   * An open IRQ session represents a valid IRQ attachment/association.
   7   * Initially, the interrupt is masked and will only occur if enabled. This is
   8   * done by calling wait_for_irq(). When the interrupt is delivered to the
   9   * client, it was acknowledged and masked at the interrupt controller before.
  10   *
  11   * Disassociation from an IRQ is done by closing the session.
  12   */

  13  
  14  /*
  15   * Copyright (C) 2007-2010 Genode Labs GmbH
  16   *
  17   * This file is part of the Genode OS framework, which is distributed
  18   * under the terms of the GNU General Public License version 2.
  19   */

  20  
  21  #ifndef _INCLUDE__IRQ_SESSION__IRQ_SESSION_H_
  22  #define _INCLUDE__IRQ_SESSION__IRQ_SESSION_H_
  23  
  24  #include <base/capability.h>
  25  
  26  namespace Genode {
  27  
  28     class Irq_session
  29     {
  30        protected:
  31  
  32           enum Opcode { WAIT_FOR_IRQ };

  33  
  34        public:
  35  
  36           static const char *service_name() { return "IRQ"; }
  37  
  38           virtual ~Irq_session() { }
  39  
  40           /**
  41            * Wait for interrupt occurence
  42            */

  43           virtual void wait_for_irq() = 0;

  44     }
;

  45  }

  46  
  47  #endif /* _INCLUDE__IRQ_SESSION__IRQ_SESSION_H_ */