~ubuntu-branches/ubuntu/saucy/golang/saucy

« back to all changes in this revision

Viewing changes to src/pkg/runtime/defs2_linux.go

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-07-08 05:52:37 UTC
  • mfrom: (29.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130708055237-at01839e0hp8z3ni
Tags: 2:1.1-1ubuntu1
016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
/*
8
8
 * Input to cgo -cdefs
9
9
 
10
 
GOARCH=386 cgo -cdefs defs2.go >386/defs.h
 
10
GOARCH=386 go tool cgo -cdefs defs2_linux.go >defs_linux_386.h
11
11
 
12
12
The asm header tricks we have to use for Linux on amd64
13
13
(see defs.c and defs1.c) don't work here, so this is yet another
17
17
package runtime
18
18
 
19
19
/*
20
 
#cgo CFLAGS: -I/home/rsc/pub/linux-2.6/arch/x86/include -I/home/rsc/pub/linux-2.6/include -D_LOOSE_KERNEL_NAMES -D__ARCH_SI_UID_T=__kernel_uid32_t
 
20
#cgo CFLAGS: -I/tmp/linux/arch/x86/include -I/tmp/linux/include -D_LOOSE_KERNEL_NAMES -D__ARCH_SI_UID_T=__kernel_uid32_t
21
21
 
22
22
#define size_t __kernel_size_t
 
23
#define pid_t int
23
24
#include <asm/signal.h>
24
25
#include <asm/mman.h>
25
26
#include <asm/sigcontext.h>
26
27
#include <asm/ucontext.h>
27
28
#include <asm/siginfo.h>
 
29
#include <asm-generic/errno.h>
28
30
#include <asm-generic/fcntl.h>
 
31
#include <asm-generic/poll.h>
 
32
#include <linux/eventpoll.h>
29
33
 
30
34
// This is the sigaction structure from the Linux 2.1.68 kernel which
31
35
//   is used with the rt_sigaction system call.  For 386 this is not
35
39
        __sighandler_t k_sa_handler;
36
40
        unsigned long sa_flags;
37
41
        void (*sa_restorer) (void);
38
 
        sigset_t sa_mask;
 
42
        unsigned long long sa_mask;
39
43
};
40
44
*/
41
45
import "C"
42
46
 
43
47
const (
 
48
        EINTR  = C.EINTR
 
49
        EAGAIN = C.EAGAIN
 
50
        ENOMEM = C.ENOMEM
 
51
 
44
52
        PROT_NONE  = C.PROT_NONE
45
53
        PROT_READ  = C.PROT_READ
46
54
        PROT_WRITE = C.PROT_WRITE
110
118
 
111
119
        O_RDONLY  = C.O_RDONLY
112
120
        O_CLOEXEC = C.O_CLOEXEC
 
121
 
 
122
        EPOLLIN       = C.POLLIN
 
123
        EPOLLOUT      = C.POLLOUT
 
124
        EPOLLERR      = C.POLLERR
 
125
        EPOLLHUP      = C.POLLHUP
 
126
        EPOLLRDHUP    = C.POLLRDHUP
 
127
        EPOLLET       = C.EPOLLET
 
128
        EPOLL_CLOEXEC = C.EPOLL_CLOEXEC
 
129
        EPOLL_CTL_ADD = C.EPOLL_CTL_ADD
 
130
        EPOLL_CTL_DEL = C.EPOLL_CTL_DEL
 
131
        EPOLL_CTL_MOD = C.EPOLL_CTL_MOD
113
132
)
114
133
 
115
134
type Fpreg C.struct__fpreg
124
143
type Sigcontext C.struct_sigcontext
125
144
type Ucontext C.struct_ucontext
126
145
type Itimerval C.struct_itimerval
 
146
type EpollEvent C.struct_epoll_event