File : s-bbprot.ads


   1 ------------------------------------------------------------------------------
   2 --                                                                          --
   3 --                  GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                --
   4 --                                                                          --
   5 --                   S Y S T E M . B B . P R O T E C T I O N                --
   6 --                                                                          --
   7 --                                  S p e c                                 --
   8 --                                                                          --
   9 --        Copyright (C) 1999-2002 Universidad Politecnica de Madrid         --
  10 --             Copyright (C) 2003-2004 The European Space Agency            --
  11 --                     Copyright (C) 2003-2011, AdaCore                     --
  12 --                                                                          --
  13 -- GNARL is free software; you can  redistribute it  and/or modify it under --
  14 -- terms of the  GNU General Public License as published  by the Free Soft- --
  15 -- ware  Foundation;  either version 3,  or (at your option) any later ver- --
  16 -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
  17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  18 -- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
  19 --                                                                          --
  20 --                                                                          --
  21 --                                                                          --
  22 --                                                                          --
  23 --                                                                          --
  24 -- You should have received a copy of the GNU General Public License and    --
  25 -- a copy of the GCC Runtime Library Exception along with this program;     --
  26 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
  27 -- <http://www.gnu.org/licenses/>.                                          --
  28 --                                                                          --
  29 -- GNARL was developed by the GNARL team at Florida State University.       --
  30 -- Extensive contributions were provided by Ada Core Technologies, Inc.     --
  31 --                                                                          --
  32 -- The port of GNARL to bare board targets was initially developed by the   --
  33 -- Real-Time Systems Group at the Technical University of Madrid.           --
  34 --                                                                          --
  35 ------------------------------------------------------------------------------
  36 
  37 --  This package provides the functionality required to protect the data
  38 --  handled by the low level tasking system.
  39 
  40 pragma Restrictions (No_Elaboration_Code);
  41 
  42 package System.BB.Protection is
  43    pragma Preelaborate;
  44 
  45    Wakeup_Served_Entry_Callback : access procedure := null;
  46    --  Callback set by upper layer
  47 
  48    procedure Enter_Kernel;
  49    pragma Inline (Enter_Kernel);
  50    --  This procedure is executed to signal the access to kernel data. Its use
  51    --  protect the consistence of the kernel. Interrupts are disabled while
  52    --  kernel data is being accessed.
  53 
  54    procedure Leave_Kernel;
  55    --  Leave_Kernel must be called when the access to kernel data finishes.
  56    --  Interrupts are enable to the appropriate level (according to the active
  57    --  priority of the running thread).
  58 end System.BB.Protection;