Robert, thanks. I am kicking the ENQ idea around. ENQ is certainly promising. There are some interlock issues with re-establishing the exclusive ENQ after relinquishing it, and what do the intended waiting tasks do in the meantime, but it has promise.
The STIMER approach does not even really need an ECB -- you're just using it as a flag. At this moment I am still holding off. I don't have to solve this -- I can instead simply not implement the feature I am thinking of that would require this. At this moment none of the solutions are good enough to make the feature viable, IMHO. Thanks again, Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Robert A. Rosenberg Sent: Sunday, May 06, 2012 9:03 AM To: IBM-MAIN@bama.ua.edu Subject: Re: Multiple waiting tasks, one control block? At 08:43 -0700 on 05/05/2012, Charles Mills wrote about Multiple waiting tasks, one control block?: >I have a situation in which it would be a wonderful thing if I could >have multiple tasks waiting for a single event, without having a >separate "wait control block" of some sort for each task. If what you want is to have a number of tasks wait until some event occurs and once it does to have all of them resume operation independent of each other then ENQ can be used for this signalling. You have the signaling task do an Exclusive ENQ. The others do Shared ENQs. Once the signaling task does the DEQ all the waiting tasks will get dispatched. Note that this requires that the signaling task have done its ENQ before the waiting tasks do theirs (and thus go into a wait state waiting on the DEQ). Another way to use WAIT/POST is to have each waiting task know the location of a single ECB. Initially it is set to show that no post has yet been done on it. Until you want the tasks to go into a wait until the "POST" is done, you it set to look like a WAIT has been done on it. You later you do the actual POST. The waiting tasks are in a loop. They check the status of the "ECB" and if not yet posted, do a STIMER WAIT and then loop back to the ECB Status Check. Once the ECB has been posted they go on and do what they were waiting to do. Note that you are not actually using WAITs but only periodically checking the state of the ECB. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN