~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/pkg/runtime/linux/defs2.c

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-04-20 17:36:48 UTC
  • Revision ID: james.westby@ubuntu.com-20110420173648-ifergoxyrm832trd
Tags: upstream-2011.03.07.1
Import upstream version 2011.03.07.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2009 The Go Authors. All rights reserved.
 
2
// Use of this source code is governed by a BSD-style
 
3
// license that can be found in the LICENSE file.
 
4
 
 
5
/*
 
6
 * Input to godefs
 
7
        godefs -f -m32 \
 
8
                -f -I/home/rsc/pub/linux-2.6/arch/x86/include \
 
9
                -f -I/home/rsc/pub/linux-2.6/include \
 
10
                -f -D_LOOSE_KERNEL_NAMES \
 
11
                -f -D__ARCH_SI_UID_T=__kernel_uid32_t \
 
12
                defs2.c >386/defs.h
 
13
 
 
14
 * The asm header tricks we have to use for Linux on amd64
 
15
 * (see defs.c and defs1.c) don't work here, so this is yet another
 
16
 * file.  Sigh.
 
17
 */
 
18
 
 
19
#include <asm/signal.h>
 
20
#include <asm/mman.h>
 
21
#include <asm/sigcontext.h>
 
22
#include <asm/ucontext.h>
 
23
#include <asm/siginfo.h>
 
24
 
 
25
/*
 
26
#include <sys/signal.h>
 
27
#include <sys/mman.h>
 
28
#include <ucontext.h>
 
29
*/
 
30
 
 
31
/* This is the sigaction structure from the Linux 2.1.68 kernel which
 
32
   is used with the rt_sigaction system call.  For 386 this is not
 
33
   defined in any public header file.  */
 
34
 
 
35
struct kernel_sigaction {
 
36
        __sighandler_t k_sa_handler;
 
37
        unsigned long sa_flags;
 
38
        void (*sa_restorer) (void);
 
39
        sigset_t sa_mask;
 
40
};
 
41
 
 
42
enum {
 
43
        $PROT_NONE = PROT_NONE,
 
44
        $PROT_READ = PROT_READ,
 
45
        $PROT_WRITE = PROT_WRITE,
 
46
        $PROT_EXEC = PROT_EXEC,
 
47
 
 
48
        $MAP_ANON = MAP_ANONYMOUS,
 
49
        $MAP_PRIVATE = MAP_PRIVATE,
 
50
        $MAP_FIXED = MAP_FIXED,
 
51
 
 
52
        $SA_RESTART = SA_RESTART,
 
53
        $SA_ONSTACK = SA_ONSTACK,
 
54
        $SA_RESTORER = SA_RESTORER,
 
55
        $SA_SIGINFO = SA_SIGINFO,
 
56
 
 
57
        $SIGHUP = SIGHUP,
 
58
        $SIGINT = SIGINT,
 
59
        $SIGQUIT = SIGQUIT,
 
60
        $SIGILL = SIGILL,
 
61
        $SIGTRAP = SIGTRAP,
 
62
        $SIGABRT = SIGABRT,
 
63
        $SIGBUS = SIGBUS,
 
64
        $SIGFPE = SIGFPE,
 
65
        $SIGKILL = SIGKILL,
 
66
        $SIGUSR1 = SIGUSR1,
 
67
        $SIGSEGV = SIGSEGV,
 
68
        $SIGUSR2 = SIGUSR2,
 
69
        $SIGPIPE = SIGPIPE,
 
70
        $SIGALRM = SIGALRM,
 
71
        $SIGSTKFLT = SIGSTKFLT,
 
72
        $SIGCHLD = SIGCHLD,
 
73
        $SIGCONT = SIGCONT,
 
74
        $SIGSTOP = SIGSTOP,
 
75
        $SIGTSTP = SIGTSTP,
 
76
        $SIGTTIN = SIGTTIN,
 
77
        $SIGTTOU = SIGTTOU,
 
78
        $SIGURG = SIGURG,
 
79
        $SIGXCPU = SIGXCPU,
 
80
        $SIGXFSZ = SIGXFSZ,
 
81
        $SIGVTALRM = SIGVTALRM,
 
82
        $SIGPROF = SIGPROF,
 
83
        $SIGWINCH = SIGWINCH,
 
84
        $SIGIO = SIGIO,
 
85
        $SIGPWR = SIGPWR,
 
86
        $SIGSYS = SIGSYS,
 
87
        
 
88
        $FPE_INTDIV = FPE_INTDIV,
 
89
        $FPE_INTOVF = FPE_INTOVF,
 
90
        $FPE_FLTDIV = FPE_FLTDIV,
 
91
        $FPE_FLTOVF = FPE_FLTOVF,
 
92
        $FPE_FLTUND = FPE_FLTUND,
 
93
        $FPE_FLTRES = FPE_FLTRES,
 
94
        $FPE_FLTINV = FPE_FLTINV,
 
95
        $FPE_FLTSUB = FPE_FLTSUB,
 
96
        
 
97
        $BUS_ADRALN = BUS_ADRALN,
 
98
        $BUS_ADRERR = BUS_ADRERR,
 
99
        $BUS_OBJERR = BUS_OBJERR,
 
100
        
 
101
        $SEGV_MAPERR = SEGV_MAPERR,
 
102
        $SEGV_ACCERR = SEGV_ACCERR,
 
103
};
 
104
 
 
105
typedef struct _fpreg $Fpreg;
 
106
typedef struct _fpxreg $Fpxreg;
 
107
typedef struct _xmmreg $Xmmreg;
 
108
typedef struct _fpstate $Fpstate;
 
109
typedef struct timespec $Timespec;
 
110
typedef struct timeval $Timeval;
 
111
typedef struct kernel_sigaction $Sigaction;
 
112
typedef siginfo_t $Siginfo;
 
113
typedef struct sigaltstack $Sigaltstack;
 
114
typedef struct sigcontext $Sigcontext;
 
115
typedef struct ucontext $Ucontext;
 
116