Halting the processor

Can anyone tell me how to halt the processor (Pentium) under QNX6?
I tried:

int
main( int argc, char ** argv )
{ asm( “cli” );
asm( “hlt” );
return 0;
}

but that just memory faults, even when run as root. Looking at the
assembler output in gdb I do get a cli and a hlt. Should I use something
else?

We are investigating a noise problem in our analogue circuitry. Once the
software has set everything up, we want to stop all processor activity and
see if our noise disappears. (Obviously we could just remove the
processor, but then nothing would get setup.)

Thanks

William Morris

“QNX” <william@bangel.demon.co.uk> wrote in message
news:opro7m6jetirgpe6@inn.qnx.com

Can anyone tell me how to halt the processor (Pentium) under QNX6?
I tried:

int
main( int argc, char ** argv )
{ asm( “cli” );
asm( “hlt” );
return 0;
}

You can’t do that. This is a ring 0 instrustruction. You could try doing
it from inside
an interrupt handler though (this technic worked under QNX4).


but that just memory faults, even when run as root. Looking at the
assembler output in gdb I do get a cli and a hlt. Should I use something
else?

We are investigating a noise problem in our analogue circuitry. Once the
software has set everything up, we want to stop all processor activity and
see if our noise disappears. (Obviously we could just remove the
processor, but then nothing would get setup.)

Thanks

William Morris

Or you could do it in the reboot callout in startup, then call
sysmgr_reboot().

-Adam

Mario Charest postmaster@127.0.0.1 wrote in message
news:b9vusa$1v5$1@inn.qnx.com

“QNX” <> william@bangel.demon.co.uk> > wrote in message
news:> opro7m6jetirgpe6@inn.qnx.com> …
Can anyone tell me how to halt the processor (Pentium) under QNX6?
I tried:

int
main( int argc, char ** argv )
{ asm( “cli” );
asm( “hlt” );
return 0;
}


You can’t do that. This is a ring 0 instrustruction. You could try doing
it from inside
an interrupt handler though (this technic worked under QNX4).


but that just memory faults, even when run as root. Looking at the
assembler output in gdb I do get a cli and a hlt. Should I use something
else?

We are investigating a noise problem in our analogue circuitry. Once
the
software has set everything up, we want to stop all processor activity
and
see if our noise disappears. (Obviously we could just remove the
processor, but then nothing would get setup.)

Thanks

William Morris