home *** CD-ROM | disk | FTP | other *** search
/ Dream 45 / Amiga_Dream_45.iso / Amiga / emulation / d64edir.lha / inc / exec / semaphores.h < prev    next >
Text File  |  1997-05-06  |  2KB  |  43 lines

  1. {$ifndef EXEC_SEMAPHORES_H}
  2. CONST EXEC_SEMAPHORES_H = 0;
  3. {$ifndef EXEC_NODES_H;incl"exec/nodes.h";endif}
  4. {$ifndef EXEC_LISTS_H;incl"exec/lists.h";endif}
  5. {$ifndef EXEC_PORTS_H;incl"exec/ports.h";endif}
  6. {$ifndef EXEC_TASKS_H;incl"exec/tasks.h";endif}
  7. TYPE p_Semaphore = ^Semaphore;
  8.      Semaphore = record
  9.                    sm_MsgPort: MsgPort;
  10.                    sm_Bids: integer
  11.                  end;
  12.      p_SemaphoreRequest = ^SemaphoreRequest;
  13.      SemaphoreRequest = record
  14.                           sr_Link: MinNode;
  15.                           sr_Waiter: p_Task
  16.                         end;
  17.      p_SignalSemaphore = ^SignalSemaphore;
  18.      SignalSemaphore = record
  19.                          ss_Link: Node;
  20.                          ss_NestCount: integer;
  21.                          ss_WaitQueue: MinList;
  22.                          ss_MultipleLink: SemaphoreRequest;
  23.                          ss_Owner: p_Task;
  24.                          ss_QueueCount: Integer
  25.                        end;
  26. {$endif}
  27. {$ifndef EXEC_SEMAPHORES_LIB}
  28. Const EXEC_SEMAPHORES_LIB = 4711;
  29. Library SysBase:
  30. -540: Function Procure(a0,a1: Ptr): boolean;
  31. -546: Procedure Vacate(a0: Ptr);
  32. -558: Procedure InitSemaphore(a0: p_SignalSemaphore);
  33. -564: Procedure ObtainSemaphore(a0: p_SignalSemaphore);
  34. -570: Procedure ReleaseSemaphore(a0: p_SignalSemaphore);
  35. -576: Function AttemptSemaphore(a0: p_SignalSemaphore): integer;
  36. -582: Procedure ObtainSemaphoreList(a0: Ptr);
  37. -588: Procedure ReleaseSemaphoreList(a0: Ptr);
  38. -594: Function FindSemaphore(a1: stryng): p_SignalSemaphore;
  39. -600: Procedure AddSempahore(a1: p_SignalSemaphore);
  40. -606: Procedure RemSemaphore(a1: p_SignalSemaphore);
  41. end;
  42. {$endif}
  43.