fpGetRUsage

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

fpGetRUsage

Paul Davidson
(Oops)
Trying to get fpGetRusage to work WITH DARWIN.

Using: function fpGetRUsage( who : cint; data : pRUsage ) : cint;
cdecl; external 'c' name 'getrusage';

But this gives silly results.  Any hints?


P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

IMPORTANT NOTICE:  This message is intended only for the use of the
individual or entity to which it is addressed. The message may contain
information that is privileged, confidential and exempt from disclosure
under applicable law.  If the reader of this message is not the
intended recipient, or the employee or agent responsible for delivering
the message to the intended recipient, you are notified that any
dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify Corax Networks immediately by email at
[hidden email].  Thank you.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpGetRUsage

Jonas Maebe-2

On 31 Aug 2005, at 15:52, Paul Davidson wrote:

> Trying to get fpGetRusage to work WITH DARWIN.
>
> Using:     function fpGetRUsage( who : cint; data : pRUsage ) :  
> cint; cdecl; external 'c' name 'getrusage';
>
> But this gives silly results.  Any hints?

How did you declare prusage/trusage?


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpGetRUsage

Paul Davidson

On Sep 7, 2005, at 13:45, Jonas Maebe wrote:

>
> On 31 Aug 2005, at 15:52, Paul Davidson wrote:
>
>> Trying to get fpGetRusage to work WITH DARWIN.
>>
>> Using:     function fpGetRUsage( who : cint; data : pRUsage ) : cint;
>> cdecl; external 'c' name 'getrusage';
>>
>> But this gives silly results.  Any hints?
>
> How did you declare prusage/trusage?
>
>
> Jonas
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
        function fpGetRUsage( who : cint; data : pRUsage ) : cint; cdecl;
external 'some_random_string' name 'getrusage';

P Davidson
http://CoraxNetworks.com

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpGetRUsage

Jonas Maebe-2

On 7 sep 2005, at 20:21, Paul Davidson wrote:

>>> Trying to get fpGetRusage to work WITH DARWIN.
>>>
>>> Using:     function fpGetRUsage( who : cint; data : pRUsage ) :  
>>> cint; cdecl; external 'c' name 'getrusage';
>>>
>>> But this gives silly results.  Any hints?
>>
>> How did you declare prusage/trusage?
>
>     function fpGetRUsage( who : cint; data : pRUsage ) : cint;  
> cdecl; external 'some_random_string' name 'getrusage';

I asked about prusage/trusage, the type of the "data" parameter. It  
does not exist in the RTL, so you must have declared this type  
yourself. That's probably where the error is.


Jonas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpGetRUsage

Paul Davidson
RUsage is not declared anywhere in app o.0
RUsage is defined in ostypes.inc for BSD. fpGetRUsage is as well, but
does not resolve in Darwin.


On Sep 8, 2005, at 3:39, Jonas Maebe wrote:

>
> On 7 sep 2005, at 20:21, Paul Davidson wrote:
>
>>>> Trying to get fpGetRusage to work WITH DARWIN.
>>>>
>>>> Using:     function fpGetRUsage( who : cint; data : pRUsage ) :
>>>> cint; cdecl; external 'c' name 'getrusage';
>>>>
>>>> But this gives silly results.  Any hints?
>>>
>>> How did you declare prusage/trusage?
>>
>>     function fpGetRUsage( who : cint; data : pRUsage ) : cint; cdecl;
>> external 'some_random_string' name 'getrusage';
>
> I asked about prusage/trusage, the type of the "data" parameter. It
> does not exist in the RTL, so you must have declared this type
> yourself. That's probably where the error is.
>
>
> Jonas
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
P Davidson
Corax Networks Inc.
http://CoraxNetworks.com

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpGetRUsage

Marco van de Voort
> RUsage is not declared anywhere in app o.0
> RUsage is defined in ostypes.inc for BSD. fpGetRUsage is as well, but
> does not resolve in Darwin.

fpgetrusage is used in the implementation. It is not (yet) exported.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal