home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gnat-2.06-src.tgz / tar.out / fsf / gnat / ada / s-tasque.ads < prev    next >
Text File  |  1996-09-28  |  4KB  |  75 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                 GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --                 S Y S T E M . T A S K I N G . Q U E U I N G              --
  6. --                                                                          --
  7. --                                  S p e c                                 --
  8. --                                                                          --
  9. --                             $Revision: 1.11 $                             --
  10. --                                                                          --
  11. --     Copyright (c) 1991,1992,1993,1994,1995 FSU, All Rights Reserved      --
  12. --                                                                          --
  13. -- GNARL is free software; you can redistribute it  and/or modify it  under --
  14. -- terms  of  the  GNU  Library General Public License  as published by the --
  15. -- Free Software  Foundation;  either version 2, or (at  your  option)  any --
  16. -- later  version.  GNARL is distributed  in the hope that  it will be use- --
  17. -- ful, but but WITHOUT ANY WARRANTY;  without even the implied warranty of --
  18. -- MERCHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Gen- --
  19. -- eral Library Public License  for more details.  You should have received --
  20. -- a  copy of the GNU Library General Public License along with GNARL;  see --
  21. -- file COPYING.LIB.  If not,  write to the  Free Software Foundation,  675 --
  22. -- Mass Ave, Cambridge, MA 02139, USA.                                      --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. package System.Tasking.Queuing is
  27.  
  28.    procedure Broadcast_Program_Error
  29.      (Object : access Protection;
  30.       Pending_Call : Entry_Call_Link);
  31.    --  Raise Program_Error in all tasks calling the protected entries
  32.    --  of Object.  The exception will not be raised immediately for
  33.    --  the calling task; it will be deferred until it calls
  34.    --  Raise_Pending_Exception.
  35.  
  36.    procedure Enqueue (E : in out Entry_Queue; Call : Entry_Call_Link);
  37.    --  Enqueue Call at the end of entry_queue E
  38.  
  39.    procedure Dequeue (E : in out Entry_Queue; Call : Entry_Call_Link);
  40.    --  Dequeue Call from entry_queue E
  41.  
  42.    function Head (E : in Entry_Queue) return Entry_Call_Link;
  43.    --  Return the head of entry_queue E
  44.  
  45.    pragma Inline (Head);
  46.  
  47.    procedure Dequeue_Head
  48.      (E    : in out Entry_Queue;
  49.       Call : out Entry_Call_Link);
  50.    --  Remove and return the head of entry_queue E
  51.  
  52.    function Onqueue (Call : Entry_Call_Link) return Boolean;
  53.    --  Return True if Call is on any entry_queue at all
  54.  
  55.    function Count_Waiting (E : in Entry_Queue) return Natural;
  56.    --  Return number of calls on the waiting queue of E
  57.  
  58.    procedure Select_Task_Entry_Call
  59.      (Acceptor         : Task_ID;
  60.       Open_Accepts     : Accept_List_Access;
  61.       Call             : out Entry_Call_Link;
  62.       Selection        : out Select_Index;
  63.       Open_Alternative : out Boolean);
  64.    --  Select an entry for rendezvous.  On exit:
  65.    --    Call will contain a pointer to the entry call record selected;
  66.    --    Selection will contain the index of the alternative selected
  67.    --    Open_Alternative will be True if there were any open alternatives
  68.  
  69.    procedure Select_Protected_Entry_Call
  70.      (Object    : access Protection;
  71.       Call      : out Entry_Call_Link);
  72.    --  Select an entry of a protected object
  73.  
  74. end System.Tasking.Queuing;
  75.