SYSPAGE_CPU_ENTRY()

Return a CPU-specific entry from the system page

Synopsis:

#include <sys/syspage.h>

#define SYSPAGE_CPU_ENTRY( cpu, entry )...

Arguments:

cpu
The CPU to get the entry for.
entry
The entry to get; see below.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The SYSPAGE_CPU_ENTRY() macro returns a pointer to the specified entry from the part of the system page that's specific to the given cpu.

The best way to reference the system page is via the kernel calls and POSIX cover functions. If there isn't a function to access the information you need, use SYSPAGE_CPU_ENTRY() instead of referencing the _syspage_ptr variable directly. For information in the rest of the syspage_entry structure, use SYSPAGE_ENTRY().

The only entry you might currently need to use is:

ppc, kerinfo
This structure, defined in <ppc/syspage.h>, contains at least the following members:

Returns:

A pointer to the structure for the given entry.

Examples:

#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/syspage.h>

int main( void )
{
  printf ("We're pretending to be a type %ld PPC\n",
     SYSPAGE_CPU_ENTRY(ppc,kerinfo)->pretend_cpu);
    
  return EXIT_SUCCESS;
}

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes

Caveats:

SYSPAGE_CPU_ENTRY() is a macro.

See also:

ClockCycles(), SYSPAGE_ENTRY(), _syspage_ptr

Customizing Image Startup Programs chapter of the Building Embedded Systems guide