Annotation of Gnu-Mach/i386/include/mach/setjmp.h, revision 1.1.1.1

1.1       root        1: /* 
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1993 Carnegie Mellon University
                      4:  * All Rights Reserved.
                      5:  * 
                      6:  * Permission to use, copy, modify and distribute this software and its
                      7:  * documentation is hereby granted, provided that both the copyright
                      8:  * notice and this permission notice appear in all copies of the
                      9:  * software, derivative works or modified versions, and any portions
                     10:  * thereof, and that both notices appear in supporting documentation.
                     11:  * 
                     12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     15:  * 
                     16:  * Carnegie Mellon requests users of this software to return to
                     17:  * 
                     18:  *  Software Distribution Coordinator  or  [email protected]
                     19:  *  School of Computer Science
                     20:  *  Carnegie Mellon University
                     21:  *  Pittsburgh PA 15213-3890
                     22:  * 
                     23:  * any improvements or extensions that they make and grant Carnegie Mellon
                     24:  * the rights to redistribute these changes.
                     25:  */
                     26: /*
                     27:  * Setjmp/longjmp buffer for i386.
                     28:  */
                     29: #ifndef _MACH_SETJMP_H_PROCESSED_
                     30: #define _MACH_SETJMP_H_PROCESSED_ 1
                     31: 
                     32: /* XXX prefix these with mach_ so they don't interfere with higher layers?
                     33:    This stuff is included by cthreads.h.  */
                     34: 
                     35: /* XXX The original definition of jmp_buf[] causes problems using
                     36:  * libthreads when linked against NetBSD and FreeBSD's libc because
                     37:  * it's too small.  When cthreads calls _setjmp, it gets the libc
                     38:  * version which saves more state than it's expecting and overwrites
                     39:  * important cthread data. =( This definition is big enough for all
                     40:  * known systems so far (Linux's is 6, FreeBSD's is 9 and NetBSD's is
                     41:  * 10).  This file really shouldn't even be here, since we should be
                     42:  * using libc's setjmp.h.  
                     43:  */
                     44: #if 0
                     45: #define _JBLEN 6
                     46: #else
                     47: #define _JBLEN 10
                     48: #endif
                     49: 
                     50: typedef int jmp_buf[_JBLEN];           /* ebx, esi, edi, ebp, esp, eip */
                     51: 
                     52: 
                     53: extern int setjmp (jmp_buf);
                     54: extern void longjmp (jmp_buf, int);
                     55: extern int _setjmp (jmp_buf);
                     56: extern void _longjmp (jmp_buf, int);
                     57: 
                     58: #endif /* _MACH_SETJMP_H_PROCESSED_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.