To: J3 13-273r1 From: Reinhold Bader Subject: Simplifying events Date: June 26, 2013 References: N1930, N1967, N1971 Discussion: ~~~~~~~~~~~ In N1967, the LOCAL_EVENT_TYPE concept was introduced because a more efficient implementation of event synchronization is possible than with the more general EVENT_TYPE facility defined there. Subsequently, it was realized that this simplified event type is already sufficient to cover the most relevant envisaged usage patterns; also, it removes complications in specifying the synchronization properties of events. Therefore, this paper proposes to specify that EVENT_TYPE should have the semantics that are already specified for the LOCAL_EVENT_TYPE, and to remove the more general non-local event type. Reintegrating the latter could be considered for a later revision, provided that user feedback indicates an actual need for this. Of the requirements in N1930, all but the last one (E4) is fulfilled. The requirements document will be correspondingly updated. The paper also includes a correction to constraint C603 of the TS, which presently states the logical opposite of what is intended, and improves the wording of C604 and C605. The non-normative text in Annex A is not updated. Edits to N1967: ~~~~~~~~~~~~~~~ In section 3.2 delete "or LOCAL_EVENT_TYPE" In the heading of 6.2, delete "and LOCAL_EVENT_TYPE" Replace the first two paragraphs of 6.2 by "EVENT_TYPE is a derived type with private components. It is an extensible type with no type parameters. All components have default initialization. EVENT_TYPE is defined in the ISO_FORTRAN_ENV intrinsic module. A scalar variable of type EVENT_TYPE is an event variable. An event variable includes a count of the difference between the number of successful posts and successful waits for the event variable. The initial value of the event count of an event variable is zero. The processor shall support a maximum value of the event count of at least HUGE(0)." In C601, delete "or LOCAL_EVENT_TYPE", twice. In C603, delete "or LOCAL_EVENT_TYPE". Also, after "variable definition context", replace the comma by " except". Rephrase NOTE 6.1 to read "Event variables of type EVENT_TYPE are restricted so that EVENT WAIT statements can only wait on a local event variable. This allows the efficient implementation of this concept." In section 6.3: [13:26] Add the sentence "It is an image control statement." [13:29] modify constraint C604 to read "An in an shall be of the type EVENT_TYPE defined in the ISO_FORTRAN_ENV intrinsic module." In section 6.4: [14:2] Add the sentence "It is an image control statement." [14:4] modify constraint C605 to read "An in an shall not be coindexed." Section 6.4, [14:6]: Replace "shall not change" by "do not change". In section 7.3.11, description of the EVENT argument of EVENT_QUERY, delete "or LOCAL_EVENT_TYPE" in the first sentence. At the end of 7.3.11, add "NOTE 7.1 Execution of EVENT_QUERY does not imply any synchronization." Edits to section 8.3 [25:32] Delete "or LOCAL_EVENT_TYPE". [30:12] Delete "and LOCAL_EVENT_TYPE".