--- np2/i386c/ia32/exception.h 2003/12/08 00:55:31 1.1 +++ np2/i386c/ia32/exception.h 2008/03/22 04:03:07 1.3 @@ -1,4 +1,4 @@ -/* $Id: exception.h,v 1.1 2003/12/08 00:55:31 yui Exp $ */ +/* $Id: exception.h,v 1.3 2008/03/22 04:03:07 monaka Exp $ */ /* * Copyright (c) 2003 NONAKA Kimihiro @@ -12,8 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -58,13 +56,19 @@ enum { EXCEPTION_NUM }; +enum { + INTR_TYPE_SOFTINTR = -1, /* software interrupt (INTn) */ + INTR_TYPE_EXTINTR = 0, /* external interrupt */ + INTR_TYPE_EXCEPTION = 1, /* exception */ +}; + #define EXCEPTION(num, vec) \ exception(num, vec); -#define INTERRUPT(num, softintp, errorp, error_code) \ - interrupt(num, softintp, errorp, error_code) +#define INTERRUPT(num, softintp) \ + interrupt(num, softintp, 0, 0) void exception(int num, int vec); -void interrupt(int num, int softintp, int errorp, int error_code); +void interrupt(int num, int intrtype, int errorp, int error_code); #ifdef __cplusplus }