?? NEWTITLE := 'NOS/VE: Program Control Services' ??
MODULE osm$await_activity_complete;
{   PURPOSE:
{     The purpose of this module is to support the osp$await_activity_completion
{     request.

{   DESIGN:
{     The procedure contained in this module has an execution bracket of 1, 13.

?? NEWTITLE := '  Global System Declarations', EJECT ??
?? SET (LIST := OFF) ??
*copyc ost$status
*copyc osd$virtual_address
*copyc ost$hardware_subranges
*copyc ose$await_activity_exceptions
*copyc pmt$task_id
*copyc pmd$local_queues
*copyc pme$local_queue_exceptions
?? SET (LIST := ON) ??
*copyc ost$caller_identifier
*copyc osd$wait
?? TITLE := '  Global External Procedures' ??
?? EJECT ??
*copyc osh$await_activity
*copyc osp$await_activity
?? TITLE := '  [XDCL, #gate] osp$await_activiy_completion' ??
?? NEWTITLE := '    remove_await_nonempty_queue', EJECT ??

  PROCEDURE [XDCL, #GATE] osp$await_activity_completion
    (    wait_list: ost$wait_list;
     VAR ready_index: integer;
     VAR status: ost$status);

    VAR
      wait_complete: boolean;

    ready_index := 0;
    status.normal := TRUE;
    wait_complete := FALSE;
    REPEAT
      osp$await_activity (wait_list, ready_index, wait_complete, status);
    UNTIL wait_complete OR NOT status.normal;
  PROCEND osp$await_activity_completion;
MODEND osm$await_activity_complete;
