From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b274bccb194366c1,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny09.POSTED!0f19ed38!not-for-mail From: "Frank J. Lhota" Reply-To: NOSPAM.lhota@adarose.com User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Implementing Ada.Asynchronous_Task_Control in GNAT Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 24 May 2005 13:28:49 GMT NNTP-Posting-Host: 151.203.18.88 X-Complaints-To: abuse@verizon.net X-Trace: trndny09 1116941329 151.203.18.88 (Tue, 24 May 2005 09:28:49 EDT) NNTP-Posting-Date: Tue, 24 May 2005 09:28:49 EDT Xref: g2news1.google.com comp.lang.ada:11138 Date: 2005-05-24T13:28:49+00:00 List-Id: The package Ada.Asynchronous_Task_Control allows one to suspend / resume the execution of a task. The ARM states that an implementation is not required to support this package on environments where it would be infeasible. GNAT generally does not support Ada.Asynchronous_Task_Control, but I believe that it would be possible to implement this package using the Win32 API calls SuspendThread / ResumeThread. These API calls will do the brunt of the work, but we still need to do some bookkeeping work in order to make sure that held tasks behave as specified in the ARM. If I had the code for how this package is implemented on other platforms, I could probably modify it to produce a working version of this package for MS Windows. Does anyone know of a GNAT platform that implements asynchronous task control? If not, is there a document that explains what modifications should be performed on the Ada task control blocks for a call to Hold or Continue?