J3/15-135r2 To: J3 From: John Reid & Bill Long & Steve Lionel Subject: Clause 5.8 edits to N2040 Date: 2015 February 26 Discussion ---------- In the recent ballot (see N2045) Malcolm Cohen wrote "(b) The TS has merely scratched the surface of the semantics that are being specified for stalled image handling; much more work needs to be done to clarify what is supposed to happen (e.g. which variables become undefined, etc.). Even for failed images some additional work appears to be needed..." An edit here addresses the issue for failed images. In the same ballot, Robert Corbett pointed out that if an image stalls while executing a CRITICAL construct, other images should be permitted to execute the construct. The concept of stalling has been removed, see J3/15-147, but the problem occurs for a failed image. Edits address this and similar problems for locks and events. Edits to N2040: --------------- [14:12+] Add three paragraphs: "When an image fails during the execution of a segment, a data object becomes undefined if it might be defined or undefined by execution of a statement of the segment other than an invocation of an atomic subroutine. If an image fails during the execution of a CRITICAL construct, the execution of the construct is regarded by other images as complete. If the CRITICAL statement of a CRITICAL construct has a STAT= specifier, and an image fails while executing that construct, the specified variable will become defined with the value STAT_FAILED_IMAGE on the next image to execute the construct. If the in a LOCK statement was locked by a failed image and was not unlocked by that image, it becomes unlocked." [18:24+] Add "A failed image might cause an error condition for an EVENT WAIT statement. NOTE An unreasonably long wait on an EVENT WAIT statement in the presence of failed images may be because it was intended that the event be posted by an image that has failed." [35:6-7, modified by 15-147] Change "three" (was "five") to "four" and change "third paragraph" to "third and fourth paragraphs" twice. [37:3] Before 'In para 3' add 'In para 1, at the end of R811, add "[]". In para 2, line 1, at the end of the sentence, add "or the executing image fails". After para 2 add para 5 of 5.8 STAT_FAILED_IMAGE of this Technical Specification.". [38:9+] Add '{in 8.5.6 LOCK and UNLOCK statements: in para 1, change "image and" to "image, that image has not failed, and the lock variable"; in para 4, add new second sentence "If an image fails after locking and before unlocking a lock variable, the variable becomes unlocked."}' [43:29+] Add "{In 16.6.5 Events that cause variables to become defined, add the following list item} (33) Failure of the image that locked a lock variable before it has unlocked the variable causes the variable to become unlocked. {In 16.6.6 Events that cause variables to become undefined, add the following list item} (27) When an image fails during the execution of a segment, a data object becomes undefined if it might be defined or undefined by execution of a statement of the segment other than an invocation of an atomic subroutine."