[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    HPUX-DEVTOOLS: proc_pstat_idx_lookup_hold question
From:       Stan Sieler <sieler () allegro ! com>
Date:       2007-06-13 23:58:18
Message-ID: 20070613235818.AEB345251BB () opus ! allegro ! com
[Download RAW message or body]

Hi,

It looks like proc_pstat_idx_lookup_hold does what I want:

   convert from a pstat_id to a proc_t address.

However, it isn't clear what the second parameter, "find_next" does:

    struct proc *proc_pstat_idx_lookup_hold __((int p_idx,int find_next));

In experiments, I've passed 0, 1, and larger numbers with no effect.

Also, what's getting "held"?  Apparently not the sched_lock or a process
lock ... because I can call it multiple times with the same p_idx from
different processes (via DLKM), and I haven't caused any panics (yet :)

From the name "find_next", I was hoping it would find the next in-use 
proc_t entry after p_idx :)

BTW, the routine appears to nicely return NULL if the p_idx is out of range,
or if the slot isn't being used for a process at the moment.

(I wouldn't have to do this if we didn't have this annoying hash stuff for
processes ... I'm still offering to discuss, for free, how to implement
large PIDs (and many processes) without hashing (to be more efficient,
and friendlier to kernel programmers, and to finally really solve the
problem the large PID range was intended to solve (but doesn't).)

thanks,

-- 
Stan Sieler
work:     www.allegro.com
personal: www.sieler.com/wanted/index.html  

 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic