[prev in list] [next in list] [prev in thread] [next in thread]
List: dragonfly-users
Subject: Re: Easy c debugging question
From: Joerg Sonnenberger <joerg () britannica ! bec ! de>
Date: 2005-03-30 2:48:24
Message-ID: 20050330024530.GB42219 () britannica ! bec ! de
[Download RAW message or body]
On Tue, Mar 29, 2005 at 06:30:49PM -0800, walt wrote:
>
>
> On Wed, 30 Mar 2005, Joerg Sonnenberger wrote:
>
> > On Tue, Mar 29, 2005 at 04:10:35PM -0800, Matthew Dillon wrote:
> > > Umm. Try the initialized pointer being passed to
> > > kinfo_get_sched_cputime().
>
> > Right, kinfo_get_sched_cputime(&cputime), with cputime being
> > a local variable of type struct kinfo_cputime. That's another mistake :)
>
> You Big Kids. please take pity on us bonehead Little Kids! Is the 'mistake'
> in my original c code? I wouldn't doubt for a second that I made a mistake,
> (I'm quite sure I did) but I can't tell from the above just what my mistake
> was.
You should do:
struct kinfo_cputime k;
kinfo_get_sched_cputime(&k);
The function does not allocate the storage.
Joerg
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic