File: setjmp.h

package info (click to toggle)
linux86 0.16.21-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,072 kB
  • sloc: ansic: 66,757; asm: 6,154; makefile: 1,374; sh: 703
file content (30 lines) | stat: -rw-r--r-- 629 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#ifndef __SETJMP_H
#define __SETJMP_H

#include <features.h>

/* 
 * I know most systems use an array of ints here, but I prefer this   - RDB
 */

typedef struct
{
   unsigned int pc;
   unsigned int sp;
   unsigned int bp;
   unsigned int si;
   unsigned int di;
} jmp_buf[1];

int _setjmp __P((jmp_buf env));
void _longjmp __P((jmp_buf env, int rv));

/* LATER: Seems GNU beat me to it, must be OK then :-)
 *        Humm, what's this about setjmp being a macro !?
 *	  Ok, use the BSD names as normal use the ANSI as macros
 */

#define setjmp(a_env)		_setjmp(a_env)
#define longjmp(a_env, a_rv)	_longjmp(a_env, a_rv)
#endif