linux-mips-fnet
[Top] [All Lists]

abort instruction for Mips?

To: linux-mips@fnet.fr
Subject: abort instruction for Mips?
From: Andreas Jaeger <aj@suse.de>
Date: 03 Feb 2000 09:31:28 +0100
Mail-copies-to: never
Sender: aj@suse.de
User-agent: Gnus/5.0804 (Gnus v5.8.4) XEmacs/21.2 (Hera)
For glibc I could use [1] an abort instruction as fail safe to abort a
program.  Is there any way to achieve this?

For example on m68k I can use:
/* An instruction which should crash any program is `illegal'.  */
#define ABORT_INSTRUCTION asm ("illegal")

and on ix86:
/* An instruction which should crash any program is `hlt'.  */
#define ABORT_INSTRUCTION asm ("hlt")


Andreas

Footnotes: 
[1]  It works also without.

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

<Prev in Thread] Current Thread [Next in Thread>