Re: Determine clock speed

barts_at_smaalders.net
Date: 01/29/05


Date: 28 Jan 2005 19:40:18 -0800


Do keep in mind:

1) Processor 0 may not be there.
2) Processors can and may be of different speeds.
3) you may not be able to run on all processor you can list.

Some code to find legal processor ids from the p_online man page:

#include <sys/unistd.h>
#include <sys/processor.h>
#include <sys/types.h>
#include <stdio.h>
#include <errno.h>

int
main()
{
processorid_t i, cpuid_max;
cpuid_max = sysconf(_SC_CPUID_MAX);
for (i = 0; i <= cpuid_max; i++) {
if (p_online(i, P_STATUS) != -1)
printf("processor %d present\n", i);
}
             return (0);
     }



Relevant Pages

  • [patch 1/9] smsc-ircc2: whitespace fixes
    ... modify it under the terms of the GNU General Public License as ... int; ... iobase = self->io.fir_base; ... At speeds above that we can just forget ...
    (Linux-Kernel)
  • Re: U.S. Naval presence to protect Straits of Hormuz ?
    ... :airframe weighing 1500 to a couple thousand pounds moving at ... :near-Mach speeds. ... :Keep in mind that engagement starts at under a mile. ... no weapons the US has ever work and every weapon the bad guys ...
    (sci.military.naval)
  • Re: [PATCH] [net/irda]: new Blackfin on-chip SIR IrDA driver
    ... > + unsigned int quot; ... you just made that adjustment to the UART recently ... ... SIR hasn't encounter such anomalies. ... make sure the line is clear before we go changing speeds. ...
    (Linux-Kernel)
  • Re: REFERENCES REVEALED
    ... > int main ... that the same is not true of pointers. ... address of that object with that label. ... It's good that you have something in mind that gives you a better ...
    (comp.lang.cpp)
  • Re: Endless Dorkness
    ... Mind blast 1/day, Int vs Will, stunned on hit, save ends ... use differing judgements. ...
    (rec.games.frp.dnd)