comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: NT Service, WinSock
Date: Fri, 27 Oct 2000 01:45:32 GMT
Date: 2000-10-27T01:45:32+00:00	[thread overview]
Message-ID: <39F8DEBD.82CA66C4@telepath.com> (raw)
In-Reply-To: b3biDqXPSlUf@eisner.decus.org

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





  reply	other threads:[~2000-10-27  1:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-26  0:00 NT Service, WinSock Peter Hend�n
2000-10-26 16:16 ` Ted Dennison
2000-10-26 18:52   ` Larry Kilgallen
2000-10-27  1:45     ` Ted Dennison [this message]
2000-10-30 15:50       ` Ted Dennison
2000-10-31  1:21         ` Randy Brukardt
2000-10-31  3:27           ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox