Simple trap handler example.






Misc >
Help >
FAQ >


Links >



Simple trap handler example.

The trap example illustrates how to define a trap handler (swi handler) and how to invoke the handler. The trap handlers are defined by using the GNU extension __attribute__.

trap.h
Definition of trap handlers.

trap.c
Implementation of the trap handlers.

trap-main.c
Main that installs and invokes the trap handlers.

Source file: trap-main.c Source file: trap.c

Copyright (C) 1999, 2000, 2001, 2002, 2003 Stéphane Carrez, France
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


AltStyle によって変換されたページ (->オリジナル) /