comp.lang.ada
 help / color / mirror / Atom feed
From: Ole-Hjalmar Kristensen <ohk@clustra.com>
Subject: Re: User and system time
Date: Thu, 02 Nov 2000 16:31:26 GMT
Date: 2000-11-02T16:31:26+00:00	[thread overview]
Message-ID: <umq7l6ml4ip.fsf@gong10.clustra.com> (raw)
In-Reply-To: 8ts2gs$7va$1@nnrp1.deja.com

Ted Dennison <dennison@telepath.com> writes:

> In article <0h820tgk1aln43cab8u0pcfgvgknqgeblo@4ax.com>,
>   Espen Stranger Seland <espenss@stud.ifd.hibu.no> wrote:
> 
> (I believe Robert Dewar wrote this part)
> > >This is not a language question, but rather an operating
> > >system question, you need to consult your OS documentation
> > >and call the appropriate routines.
> 
> > Ok. In Watcom/QNX there is functions to get these stats from
> > daughter-processes/threads. Just thought there could be
> > something like inside ada95.
> 
> Not quite. QNX (an OS) has calls to get those stats. It has nothing to
> do with Watcom except that they perhaps chose to write some bindings (C
> header files) to that facility for you. An Ada QNX vendor could do the
> exact same thing with Ada specification files. So could any other
> language vendor whose language is capable of linking in OS facilites. If
> they (Watcom or your QNX Ada vendor) didn't bother, you could even do it
> yourself if you could find out what the linkage and parameter profile
> are.
> 
> "Fine", you say, "But I still want to use this facility in Ada and
> you haven't answerd that part of my question." Well, lets try a bit
> harder then...
> 
> Ada (like C) does not have such a facility natively, probably because it
> isn't universally available. (How would I do it on DOS, where there are
> no processes or threads?) So if you want to gather that information in
> Ada (or in C or in Fortran or in Java or in Cobol or in...) you have to
> do the following:
> 
>    o  Find out what facility your OS provides for it.
>    o  Find out what bindings your compiler provides to that facility.
>    o  If the answer to the above is none, see if any third parties
>       provide said bindings.
>    o  If the answer to the above is still none (or there are cost or
>       licensing issues), find the specifications of the OS calls, and
>       roll your own bindings.
> 
> The only difference with C is that there will almost certianly be at
> least one C compiler on any OS that meets the second bullet. But these
> days its actually a pretty rare Ada compiler that comes with no OS
> bidings either.
> 
> --
> T.E.D.

Not "no OS binding" does not imply a complete OS binding, though.


> 
> http://www.telepath.com/~dennison/Ted/TED.html
> 
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.

-- 
Kabelsalat ist gesund.

Ole-Hj. Kristensen



  reply	other threads:[~2000-11-02 16:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-01 14:15 User and system time Espen Stranger Seland
2000-11-01 15:42 ` Larry Kilgallen
2000-11-01 16:51 ` Robert Dewar
2000-11-02  8:14   ` Espen Stranger Seland
2000-11-02 15:50     ` Ted Dennison
2000-11-02 16:31       ` Ole-Hjalmar Kristensen [this message]
2000-11-02 18:41       ` Espen Stranger Seland
2000-11-02 19:12         ` 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