1
0
mirror of https://github.com/golang/go synced 2024-10-04 20:11:22 -06:00
go/src/pkg/runtime/defs_windows_amd64.h
Alex Brainman 6ea7bf253c net: implement netpoll for windows
Moves the network poller from net package into runtime.

benchmark                           old ns/op    new ns/op    delta
BenchmarkTCP4OneShot                   316386       287061   -9.27%
BenchmarkTCP4OneShot-2                 339822       313424   -7.77%
BenchmarkTCP4OneShot-3                 330057       306589   -7.11%
BenchmarkTCP4OneShotTimeout            341775       287061  -16.01%
BenchmarkTCP4OneShotTimeout-2          380835       295849  -22.32%
BenchmarkTCP4OneShotTimeout-3          398412       328070  -17.66%
BenchmarkTCP4Persistent                 40622        33392  -17.80%
BenchmarkTCP4Persistent-2               44528        35736  -19.74%
BenchmarkTCP4Persistent-3               44919        36907  -17.84%
BenchmarkTCP4PersistentTimeout          45309        33588  -25.87%
BenchmarkTCP4PersistentTimeout-2        50289        38079  -24.28%
BenchmarkTCP4PersistentTimeout-3        51559        37103  -28.04%
BenchmarkTCP6OneShot                   361305       345645   -4.33%
BenchmarkTCP6OneShot-2                 361305       331976   -8.12%
BenchmarkTCP6OneShot-3                 376929       347598   -7.78%
BenchmarkTCP6OneShotTimeout            361305       322212  -10.82%
BenchmarkTCP6OneShotTimeout-2          378882       333928  -11.86%
BenchmarkTCP6OneShotTimeout-3          388647       335881  -13.58%
BenchmarkTCP6Persistent                 47653        35345  -25.83%
BenchmarkTCP6Persistent-2               49215        35736  -27.39%
BenchmarkTCP6Persistent-3               38474        37493   -2.55%
BenchmarkTCP6PersistentTimeout          56637        34369  -39.32%
BenchmarkTCP6PersistentTimeout-2        42575        38079  -10.56%
BenchmarkTCP6PersistentTimeout-3        44137        37689  -14.61%

R=dvyukov
CC=golang-dev
https://golang.org/cl/8670044
2013-07-22 12:49:57 +10:00

129 lines
2.4 KiB
C

// Created by cgo -cdefs - DO NOT EDIT
// cgo -cdefs defs_windows.go
enum {
PROT_NONE = 0,
PROT_READ = 1,
PROT_WRITE = 2,
PROT_EXEC = 4,
MAP_ANON = 1,
MAP_PRIVATE = 2,
DUPLICATE_SAME_ACCESS = 0x2,
THREAD_PRIORITY_HIGHEST = 0x2,
SIGINT = 0x2,
CTRL_C_EVENT = 0x0,
CTRL_BREAK_EVENT = 0x1,
CONTEXT_CONTROL = 0x100001,
CONTEXT_FULL = 0x10000b,
EXCEPTION_ACCESS_VIOLATION = 0xc0000005,
EXCEPTION_BREAKPOINT = 0x80000003,
EXCEPTION_FLT_DENORMAL_OPERAND = 0xc000008d,
EXCEPTION_FLT_DIVIDE_BY_ZERO = 0xc000008e,
EXCEPTION_FLT_INEXACT_RESULT = 0xc000008f,
EXCEPTION_FLT_OVERFLOW = 0xc0000091,
EXCEPTION_FLT_UNDERFLOW = 0xc0000093,
EXCEPTION_INT_DIVIDE_BY_ZERO = 0xc0000094,
EXCEPTION_INT_OVERFLOW = 0xc0000095,
INFINITE = 0xffffffff,
WAIT_TIMEOUT = 0x102,
};
typedef struct SystemInfo SystemInfo;
typedef struct ExceptionRecord ExceptionRecord;
typedef struct FloatingSaveArea FloatingSaveArea;
typedef struct M128a M128a;
typedef struct Context Context;
typedef struct Overlapped Overlapped;
#pragma pack on
struct SystemInfo {
byte anon0[4];
uint32 dwPageSize;
byte *lpMinimumApplicationAddress;
byte *lpMaximumApplicationAddress;
uint64 dwActiveProcessorMask;
uint32 dwNumberOfProcessors;
uint32 dwProcessorType;
uint32 dwAllocationGranularity;
uint16 wProcessorLevel;
uint16 wProcessorRevision;
};
struct ExceptionRecord {
uint32 ExceptionCode;
uint32 ExceptionFlags;
ExceptionRecord *ExceptionRecord;
byte *ExceptionAddress;
uint32 NumberParameters;
byte Pad_cgo_0[4];
uint64 ExceptionInformation[15];
};
struct M128a {
uint64 Low;
int64 High;
};
struct Context {
uint64 P1Home;
uint64 P2Home;
uint64 P3Home;
uint64 P4Home;
uint64 P5Home;
uint64 P6Home;
uint32 ContextFlags;
uint32 MxCsr;
uint16 SegCs;
uint16 SegDs;
uint16 SegEs;
uint16 SegFs;
uint16 SegGs;
uint16 SegSs;
uint32 EFlags;
uint64 Dr0;
uint64 Dr1;
uint64 Dr2;
uint64 Dr3;
uint64 Dr6;
uint64 Dr7;
uint64 Rax;
uint64 Rcx;
uint64 Rdx;
uint64 Rbx;
uint64 Rsp;
uint64 Rbp;
uint64 Rsi;
uint64 Rdi;
uint64 R8;
uint64 R9;
uint64 R10;
uint64 R11;
uint64 R12;
uint64 R13;
uint64 R14;
uint64 R15;
uint64 Rip;
byte anon0[512];
M128a VectorRegister[26];
uint64 VectorControl;
uint64 DebugControl;
uint64 LastBranchToRip;
uint64 LastBranchFromRip;
uint64 LastExceptionToRip;
uint64 LastExceptionFromRip;
};
struct Overlapped {
uint64 Internal;
uint64 InternalHigh;
byte anon0[8];
byte *hEvent;
};
#pragma pack off