! *** PREDECLARED TYPES %IF %DECLARED ( %BASIC$QUADWORD_DECLARED ) = 0 %THEN RECORD BASIC$QUADWORD LONG FILL ( 2 ) END RECORD %LET %BASIC$QUADWORD_DECLARED = 1 %END %IF %IF %DECLARED ( %BASIC$OCTAWORD_DECLARED ) = 0 %THEN RECORD BASIC$OCTAWORD LONG FILL ( 4 ) END RECORD %LET %BASIC$OCTAWORD_DECLARED = 1 %END %IF %IF %DECLARED ( %BASIC$HFLOAT_AXP_DECLARED ) = 0 %THEN RECORD BASIC$HFLOAT_AXP LONG FILL ( 4 ) END RECORD %LET %BASIC$HFLOAT_AXP_DECLARED = 1 %END %IF %IF %DECLARED ( %BASIC$F_FLOATING_COMPLEX_DECL ) = 0 %THEN RECORD BASIC$F_FLOATING_COMPLEX SINGLE REAL_PART SINGLE IMAGINARY_PART END RECORD %LET %BASIC$F_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED ( %BASIC$D_FLOATING_COMPLEX_DECL ) = 0 %THEN RECORD BASIC$D_FLOATING_COMPLEX DOUBLE REAL_PART DOUBLE IMAGINARY_PART END RECORD %LET %BASIC$D_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED ( %BASIC$G_FLOATING_COMPLEX_DECL ) = 0 %THEN RECORD BASIC$G_FLOATING_COMPLEX GFLOAT REAL_PART GFLOAT IMAGINARY_PART END RECORD %LET %BASIC$G_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED ( %BASIC$H_FLOAT_AXP_CMPLX_DCL ) = 0 %THEN RECORD BASIC$H_FLOATING_COMPLEX_AXP BASIC$HFLOAT_AXP REAL_PART BASIC$HFLOAT_AXP IMAGINARY_PART END RECORD %LET %BASIC$H_FLOAT_AXP_CMPLX_DCL = 1 %END %IF ! *************************************************************************** ! * ! COPYRIGHT (c) 1988 BY * ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * ! ALL RIGHTS RESERVED. * ! * ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * ! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * ! TRANSFERRED. * ! * ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * ! CORPORATION. * ! * ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * ! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * ! * ! * ! *************************************************************************** ! PPL$ADJUST_SEMAPHORE_MAXIMUM ! ! Adjust a Semaphore Maximum ! ! The Adjust a Semaphore Maximum routine increments or decrements the maximum ! associated with a semaphore. ! EXTERNAL LONG FUNCTION ppl$adjust_semaphore_maximum & ( & LONG BY REF, & WORD BY REF & ) ! PPL$ADJUST_QUORUM ! ! Adjust Barrier Quorum ! ! The Adjust Barrier Quorum routine increments or decrements the quorum ! associated with a barrier. ! EXTERNAL LONG FUNCTION ppl$adjust_quorum & ( & LONG BY REF, & WORD BY REF & ) ! PPL$AWAIT_EVENT ! ! Await Event Occurrence ! ! The Await Event Occurrence routine blocks the caller until an event ! occurs. ! EXTERNAL LONG FUNCTION ppl$await_event & ( & LONG BY REF, & OPTIONAL LONG BY REF & ) ! PPL$CREATE_APPLICATION ! ! Form or Join a PPL$ Application ! ! The Form or Join a PPL$ Application routine informs the PPL$ facility ! that the calling process is forming or joining a parallel application. ! EXTERNAL LONG FUNCTION ppl$create_application & ( & OPTIONAL LONG BY REF, & STRING BY DESC, & LONG BY REF, & LONG BY REF & ) ! PPL$CREATE_BARRIER ! ! Create a Barrier ! ! The Create a Barrier routine creates and initializes a ! barrier, and returns the barrier identifier. ! You use the barrier identifier to perform all operations on that ! barrier. ! EXTERNAL LONG FUNCTION ppl$create_barrier & ( & LONG BY REF, & OPTIONAL STRING BY DESC, & WORD BY REF & ) ! PPL$CREATE_EVENT ! ! Create an Event ! ! The Create an Event routine creates an arbitrary user-defined event ! and returns the event identifier. You use the event identifier to ! perform all operations on that event. ! EXTERNAL LONG FUNCTION ppl$create_event & ( & LONG BY REF, & OPTIONAL STRING BY DESC & ) ! PPL$CREATE_SPIN_LOCK ! ! Create Spin Lock ! ! The Create Spin Lock routine creates and initializes a simple (spin) ! lock, and returns the lock identifier. You use that lock identifier to ! get and free the lock. ! EXTERNAL LONG FUNCTION ppl$create_spin_lock & ( & LONG BY REF, & OPTIONAL STRING BY DESC & ) ! PPL$CREATE_SHARED_MEMORY ! ! Create Shared Memory ! ! The Create Shared Memory routine creates (if necessary) and maps a ! section of memory that can be shared by multiple processes. ! EXTERNAL LONG FUNCTION ppl$create_shared_memory & ( & STRING BY DESC, & LONG DIM() BY REF, & OPTIONAL LONG BY REF, & STRING BY DESC, & LONG BY REF & ) ! PPL$CREATE_WORK_QUEUE ! ! Create a Work Queue ! ! The Create a Work Queue routine creates and initializes a work queue, and ! returns the work queue identifier. ! EXTERNAL LONG FUNCTION ppl$create_work_queue & ( & LONG BY REF, & OPTIONAL STRING BY DESC & ) ! PPL$CREATE_SEMAPHORE ! ! Create a Semaphore ! ! The Create a Semaphore routine creates and initializes a ! semaphore with a waiting queue, and returns the semaphore identifier. ! You use the semaphore identifier to perform all operations on that ! semaphore. ! EXTERNAL LONG FUNCTION ppl$create_semaphore & ( & LONG BY REF, & OPTIONAL STRING BY DESC, & WORD BY REF, & WORD BY REF & ) ! PPL$CREATE_VM_ZONE ! ! Create a New Virtual Memory Zone ! ! The Create a New Virtual Memory Zone routine creates a new storage ! zone, according to specified arguments, which is available to all ! participants in the application. ! EXTERNAL LONG FUNCTION ppl$create_vm_zone & ( & LONG BY REF, & OPTIONAL LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & LONG BY REF, & STRING BY DESC & ) ! PPL$DELETE_APPLICATION ! ! Delete a PPL$ Application ! ! The Delete a PPL$ Application routine marks all shared memory for ! deletion and prevents additional processes from joining the application. ! EXTERNAL LONG FUNCTION ppl$delete_application ! PPL$DECREMENT_SEMAPHORE ! ! Decrement a Semaphore ! ! The Decrement a Semaphore routine waits for a semaphore to have a ! value greater than 0, then decrements the value ! by 1 to indicate the allocation of a resource. ! EXTERNAL LONG FUNCTION ppl$decrement_semaphore & ( & LONG BY REF, & OPTIONAL LONG BY REF & ) ! PPL$DISABLE_EVENT ! ! Disable Asynchronous Notification of an Event ! ! The Disable Asynchronous Notification of an Event routine disables delivery to a ! process of notification of an event by either AST or signal. ! EXTERNAL LONG FUNCTION ppl$disable_event & ( & LONG BY REF & ) ! PPL$DELETE_WORK_ITEM ! ! Delete a Work Queue Item ! ! The Delete a Work Queue Item routine deletes a work item from a work ! queue. ! EXTERNAL LONG FUNCTION ppl$delete_work_item & ( & LONG BY REF, & LONG BY VALUE, & OPTIONAL LONG BY REF & ) ! PPL$DELETE_SHARED_MEMORY ! ! Delete Shared Memory ! ! The Delete Shared Memory routine deletes or unmaps from a global ! section that you created using the PPL$CREATE_SHARED_MEMORY routine. ! Optionally, this routine writes the contents of the global section to ! disk before deleting the section. ! EXTERNAL LONG FUNCTION ppl$delete_shared_memory & ( & STRING BY DESC, & OPTIONAL LONG DIM() BY REF, & LONG BY REF & ) ! PPL$DELETE_WORK_QUEUE ! ! Delete a Work Queue ! ! The Delete a Work Queue routine deletes the specified work queue, and releases ! any storage associated with it. ! EXTERNAL LONG FUNCTION ppl$delete_work_queue & ( & OPTIONAL LONG BY REF, & STRING BY DESC, & LONG BY REF & ) ! PPL$ENABLE_EVENT_AST ! ! Enable AST Notification of an Event ! ! The Enable AST Notification of an Event routine specifies the address of ! an AST routine (and optionally an argument to that routine) to be delivered ! when an event occurs. ! EXTERNAL LONG FUNCTION ppl$enable_event_ast & ( & LONG BY REF, & LONG BY REF, & OPTIONAL ANY BY VALUE & ) ! PPL$ENABLE_EVENT_SIGNAL ! ! Enable Signal Notification of an Event ! ! The Enable Signal Notification of an Event routine specifies a ! condition value to be signaled when the event occurs. ! EXTERNAL LONG FUNCTION ppl$enable_event_signal & ( & LONG BY REF, & OPTIONAL LONG BY VALUE & ) ! PPL$FLUSH_SHARED_MEMORY ! ! Flush Shared Memory ! ! The Flush Shared Memory routine writes (flushes) to disk the contents ! of a global section that you created using the PPL$CREATE_SHARED_MEMORY ! routine. Only pages that have been modified are flushed to disk. ! EXTERNAL LONG FUNCTION ppl$flush_shared_memory & ( & STRING BY DESC, & OPTIONAL LONG DIM() BY REF, & LONG BY REF & ) ! PPL$FIND_OBJECT_ID ! ! Find Object Identification ! ! Given the name of a spin lock, semaphore, barrier, event, work queue, ! or shared memory zone, the Find Object Identification routine returns ! the identifier of the object associated with the name you specify. ! EXTERNAL LONG FUNCTION ppl$find_object_id & ( & LONG BY REF, & STRING BY DESC & ) ! PPL$FIND_SYNCH_ELEMENT_ID ! ! Find ! ! Given the name of a spin lock, semaphore, barrier, or event, the ! Find Synchronization Element Identification routine returns the ! identifier of the associated synchronization element. ! EXTERNAL LONG FUNCTION ppl$find_synch_element_id & ( & LONG BY REF, & STRING BY DESC & ) ! PPL$GET_INDEX ! ! Get Index of a Participant ! ! The Get Index of a Participant routine returns an index that is unique ! within the application. A value of zero signifies the participant that ! formed the application. The other participants in the application ! always return an index greater than zero. ! EXTERNAL LONG FUNCTION ppl$get_index & ( & LONG BY REF & ) ! PPL$INSERT_WORK_ITEM ! ! Insert a Work Queue Item ! ! The Insert a Work Queue Item routine inserts a work item into the specified work ! queue. ! EXTERNAL LONG FUNCTION ppl$insert_work_item & ( & LONG BY REF, & LONG BY VALUE, & OPTIONAL LONG BY REF, & LONG BY REF & ) ! PPL$INCREMENT_SEMAPHORE ! ! Increment a Semaphore ! ! The Increment a Semaphore routine increments the value of the semaphore ! by 1, analogous to the signal protocol. If any other participants ! are blocked on a call to PPL$DECREMENT_SEMAPHORE for this semaphore, ! one is removed from the queue and awakened. ! The semaphore must have been created by PPL$CREATE_SEMAPHORE. ! EXTERNAL LONG FUNCTION ppl$increment_semaphore & ( & LONG BY REF & ) ! PPL$INDEX_TO_PID ! ! Convert Participant Index to VMS PID ! ! The Convert Participant Index to VMS PID routine returns the VMS PID ! of the process associated with the specified index. ! EXTERNAL LONG FUNCTION ppl$index_to_pid & ( & LONG BY REF, & LONG BY REF & ) ! PPL$INITIALIZE ! ! Initialize the PPL$ Facility ! ! The Initialize the PPL$ Facility routine informs the PPL$ facility that the ! caller is forming or joining the parallel application. Calling this ! routine is optional, because PPL$ initializes itself at the ! first call to a PPL$ routine. ! EXTERNAL LONG FUNCTION ppl$initialize & ( & OPTIONAL LONG BY REF & ) ! PPL$PID_TO_INDEX ! ! Convert VMS PID to Participant Index ! ! The Convert VMS PID to Participant Index routine returns the PPL$-defined ! participant index of the process associated with the ! specified VMS PID. ! EXTERNAL LONG FUNCTION ppl$pid_to_index & ( & LONG BY REF, & LONG BY REF & ) ! PPL$READ_BARRIER ! ! Read a Barrier ! ! The Read a Barrier routine returns the specified barrier's current quorum and ! the number of participants currently waiting (blocked) at the barrier. The ! barrier must have been created by PPL$CREATE_BARRIER. ! EXTERNAL LONG FUNCTION ppl$read_barrier & ( & LONG BY REF, & WORD BY REF, & WORD BY REF & ) ! PPL$READ_EVENT ! ! Read an Event State ! ! The Read an Event State routine returns the current state of the specified ! event. ! The state can be not_occurred or not_occurred. ! EXTERNAL LONG FUNCTION ppl$read_event & ( & LONG BY REF, & LONG BY REF & ) ! PPL$READ_SEMAPHORE ! ! Read Semaphore Values ! ! The Read Semaphore Values routine returns the current or ! maximum values, or both, of the specified counting semaphore. ! The semaphore must have been created by ! PPL$CREATE_SEMAPHORE. ! EXTERNAL LONG FUNCTION ppl$read_semaphore & ( & LONG BY REF, & OPTIONAL WORD BY REF, & WORD BY REF & ) ! PPL$RELEASE_SPIN_LOCK ! ! Release Spin Lock ! ! The Release Spin Lock routine relinquishes the spin lock by clearing the ! bit representing the lock. The lock must have been created by ! PPL$CREATE_SPIN_LOCK. ! EXTERNAL LONG FUNCTION ppl$release_spin_lock & ( & LONG BY REF & ) ! PPL$RESET_EVENT ! ! Reset an Event ! ! The Reset an Event routine resets an event's state to ! not_occurred. ! EXTERNAL LONG FUNCTION ppl$reset_event & ( & LONG BY REF & ) ! PPL$REMOVE_WORK_ITEM ! ! Remove a Work Queue Item ! ! The Remove a Work Queue Item routine removes the next item in order from a work ! queue. ! EXTERNAL LONG FUNCTION ppl$remove_work_item & ( & LONG BY REF, & LONG BY REF, & OPTIONAL LONG BY REF & ) ! PPL$READ_SPIN_LOCK ! ! Read a Spin Lock State ! ! The Read a Spin Lock State routine returns the current state of a spin ! lock. The state can be not_seized or not_seized. ! EXTERNAL LONG FUNCTION ppl$read_spin_lock & ( & LONG BY REF, & LONG BY REF & ) ! PPL$READ_WORK_QUEUE ! ! Read a Work Queue ! ! The Read a Work Queue routine returns information about a work queue. ! EXTERNAL LONG FUNCTION ppl$read_work_queue & ( & LONG BY REF, & OPTIONAL LONG BY REF & ) ! PPL$SET_SEMAPHORE_MAXIMUM ! ! Set a Semaphore Maximum ! ! The Set a Semaphore Maximum routine dynamically sets the maximum value of a ! semaphore. ! EXTERNAL LONG FUNCTION ppl$set_semaphore_maximum & ( & LONG BY REF, & WORD BY REF & ) ! PPL$SPAWN ! ! Initiate Parallel Execution ! ! The Initiate Parallel Execution routine executes code in parallel ! with the caller by creating one or more subordinate threads of execution ! (VMS subprocesses). ! EXTERNAL LONG FUNCTION ppl$spawn & ( & LONG BY REF, & OPTIONAL STRING BY DESC, & LONG DIM() BY REF, & LONG BY REF, & STRING BY DESC, & STRING BY DESC & ) ! PPL$SET_QUORUM ! ! Set Barrier Quorum ! ! The Set Barrier Quorum routine dynamically sets a value for the ! specified barrier's quorum. ! EXTERNAL LONG FUNCTION ppl$set_quorum & ( & LONG BY REF, & WORD BY REF & ) ! PPL$STOP ! ! Stop a Participant ! ! The Stop a Participant routine terminates the execution of the specified ! participant in this application. ! EXTERNAL LONG FUNCTION ppl$stop & ( & LONG BY REF & ) ! PPL$SEIZE_SPIN_LOCK ! ! Seize Spin Lock ! ! The Seize Spin Lock routine retrieves a simple (spin) lock by waiting in a ! spin loop until the lock is free. The lock must have been created by ! PPL$CREATE_SPIN_LOCK.…/* ! EXTERNAL LONG FUNCTION ppl$seize_spin_lock & ( & LONG BY REF, & OPTIONAL LONG BY REF & ) ! PPL$TERMINATE ! ! Abort PPL$ Participation ! ! The Abort PPL$ Participation routine ends the caller's ! participation in the application prematurely---that is, at some time ! before the caller actually completes its execution. ! EXTERNAL LONG FUNCTION ppl$terminate & ( & OPTIONAL LONG BY REF & ) ! PPL$TRIGGER_EVENT ! ! Trigger an Event ! ! The Trigger an Event routine causes the event's state to become ! occurred. You control whether all pending actions for ! the event are processed (made to occur), or just one is processed. ! A pending action can be an AST, a signal (condition), or a wakeup. ! EXTERNAL LONG FUNCTION ppl$trigger_event & ( & LONG BY REF, & OPTIONAL LONG BY VALUE, & LONG BY REF & ) ! PPL$UNIQUE_NAME ! ! Produce a Unique Name ! ! The Produce a Unique Name routine returns an application-unique name. ! A system-unique string specific to the calling application is appended ! to the string specified by the user. ! The resulting name is identical for all participants in ! the application, but different from those for all other applications on that ! system. ! EXTERNAL LONG FUNCTION ppl$unique_name & ( & STRING BY DESC, & STRING BY DESC, & OPTIONAL WORD BY REF & ) ! PPL$WAIT_AT_BARRIER ! ! Synchronize at a Barrier ! ! The Synchronize at a Barrier routine causes the caller to ! wait at the specified barrier. ! The barrier is in effect from the time the first participant calls ! PPL$WAIT_AT_BARRIER until each member of the ! quorum has issued the call. At that time, the wait concludes and ! all are released for further execution. ! EXTERNAL LONG FUNCTION ppl$wait_at_barrier & ( & LONG BY REF & )