Operating System - Tru64 Unix
1753818 Members
8436 Online
108805 Solutions
New Discussion

nlist issue in 5.1a

 
Mike Steininger
New Member

nlist issue in 5.1a

We have recently upgraded from 4.0f to 5.1a. I have a program that uses nlist to obtain an address for the "machine_slot" symbol in the vmunix image. This worked fine under 4.0f, but under 5.1a the machine_slot symbol can not be located. Has this symbol name been changed? Is there another symbol I should be referencing instead? Any help would be greatly appreciated.

Thanks
1 REPLY 1

Re: nlist issue in 5.1a

The machine_slot structure is gone in 5.x.

Try the processor_ptr[cpu_number] instead.

In V4, "machine_slot" is a _global_ symbol that can be used to directly
access all of the "per-cpu" machine slots, by casting it as an array and
indexing into it by cpu-number... ie: machine_slot[cpu_number].

In V5, "machine_slot" has been moved into the "processor" structure
(struct processor). It can be obtained readily, but not by the old V4
mechanism of using the global "machine"slot" variable. To get the
machine_slot structure for each processor in V5, use the global symbol
"processor_ptr" as an array, and index into it bu cpu-number; then, look
at the element "m", which is cast as a pointer to the per-cpu "struct
machine_slot"
(Eg: processor_ptr[cpu_number].m)



Hope this helps,

Christian Klein
HP Tru64 Unix Support