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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f3b1b08549f270c0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-10-26 18:46:48 PST Path: supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!feeder.qis.net!news-xfer.newsread.com!bad-news.newsread.com!netaxs.com!newsread.com!POSTED.newshog.newsread.com!not-for-mail Message-ID: <39F8DEBD.82CA66C4@telepath.com> From: Ted Dennison X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; I) X-Accept-Language: en,pdf MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: NT Service, WinSock References: <8t8u9l$4ru$1@zingo.tninet.se> <8t9lbu$ml1$1@nnrp1.deja.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 27 Oct 2000 01:45:32 GMT NNTP-Posting-Host: 38.195.186.125 X-Complaints-To: Abuse Role , We Care X-Trace: newshog.newsread.com 972611132 38.195.186.125 (Thu, 26 Oct 2000 21:45:32 EDT) NNTP-Posting-Date: Thu, 26 Oct 2000 21:45:32 EDT Organization: Telepath Systems (telepath.com) Xref: supernews.google.com comp.lang.ada:1592 Date: 2000-10-27T01:45:32+00:00 List-Id: Larry Kilgallen wrote: > Wasn't this the area with a problem letting the Ada RTL know about > threads created by the Microsoft OS code ? I'd expect there to be. Ada tasks may be implemented *using* threads, but that doesn't mean that's all there is to one. Anything that involves tasking semantics (eg: protected types, rendezvous) is probably going to require an actual Ada task. Thus you shouldn't count on them working with an OS-created thread. Since the service facility creates an OS thread for each service's ServiceMain routine, it stands to reason that it may not be safe to perform a rendezvous or protected type call from within ServiceMain. However, I'd think you should be able to declare an (Ada) task in ServiceMain, which can do all those things. It would mean using another OS thread, but it may be worth it. The other option would be to just use Windows thread communications calls to communicate between the handler procedure (in the main task) and ServiceMain. That's what a C programmer is forced to do anyway. I've gotten interested enough in this to play with it a bit on my home system "in my copious free time". If I come up with anything interesting, I'll report back. -- T.E.D. Home - mailto:dennison@telepath.com Work - mailto:dennison@ssd.fsi.com WWW - http://www.telepath.com/dennison/Ted/TED.html ICQ - 10545591