Re: a simple question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 14 May 2002 18:37:56 -0400
"Bloch, Jack" <Jack.Bloch@icn.siemens.com> wrote:

BJ> interrupt for a special case. In this case I want to halt the Linux OS. How
BJ> can I do this from within my ISR?

#include <linux/reboot.h>
#include <linux/notifier.h>

static struct notifier_block *foo;

notifier_call_chain (&foo, SYS_HALT, NULL);
machine_halt ();
do_exit (0);

	Or if you want to restart instead of halt:

notifier_call_chain (&foo, SYS_RESTART, NULL);
machine_restart (NULL);

	Be careful, though, this will NOT sync.

-- Felipe.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux