2010-01-06 18:58:55 -07:00
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2011-10-15 00:29:25 -06:00
|
|
|
extern void *runtime·LoadLibrary;
|
runtime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost
Prefix all external symbols in runtime by runtime·,
to avoid conflicts with possible symbols of the same
name in linked-in C libraries. The obvious conflicts
are printf, malloc, and free, but hide everything to
avoid future pain.
The symbols left alone are:
** known to cgo **
_cgo_free
_cgo_malloc
libcgo_thread_start
initcgo
ncgocall
** known to linker **
_rt0_$GOARCH
_rt0_$GOARCH_$GOOS
text
etext
data
end
pclntab
epclntab
symtab
esymtab
** known to C compiler **
_divv
_modv
_div64by32
etc (arch specific)
Tested on darwin/386, darwin/amd64, linux/386, linux/amd64.
Built (but not tested) for freebsd/386, freebsd/amd64, linux/arm, windows/386.
R=r, PeterGo
CC=golang-dev
https://golang.org/cl/2899041
2010-11-04 12:00:19 -06:00
|
|
|
extern void *runtime·GetProcAddress;
|
2010-06-11 02:38:12 -06:00
|
|
|
|
|
|
|
// Call a Windows function with stdcall conventions,
|
|
|
|
// and switch to os stack during the call.
|
2011-06-27 20:46:16 -06:00
|
|
|
#pragma varargck countpos runtime·stdcall 2
|
|
|
|
#pragma varargck type runtime·stdcall void*
|
|
|
|
#pragma varargck type runtime·stdcall uintptr
|
2011-08-27 07:17:00 -06:00
|
|
|
void runtime·asmstdcall(void *c);
|
runtime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost
Prefix all external symbols in runtime by runtime·,
to avoid conflicts with possible symbols of the same
name in linked-in C libraries. The obvious conflicts
are printf, malloc, and free, but hide everything to
avoid future pain.
The symbols left alone are:
** known to cgo **
_cgo_free
_cgo_malloc
libcgo_thread_start
initcgo
ncgocall
** known to linker **
_rt0_$GOARCH
_rt0_$GOARCH_$GOOS
text
etext
data
end
pclntab
epclntab
symtab
esymtab
** known to C compiler **
_divv
_modv
_div64by32
etc (arch specific)
Tested on darwin/386, darwin/amd64, linux/386, linux/amd64.
Built (but not tested) for freebsd/386, freebsd/amd64, linux/arm, windows/386.
R=r, PeterGo
CC=golang-dev
https://golang.org/cl/2899041
2010-11-04 12:00:19 -06:00
|
|
|
void *runtime·stdcall(void *fn, int32 count, ...);
|
2011-02-01 09:49:24 -07:00
|
|
|
|
2011-09-17 01:57:59 -06:00
|
|
|
uint32 runtime·getlasterror(void);
|
|
|
|
void runtime·setlasterror(uint32 err);
|
2010-06-11 02:38:12 -06:00
|
|
|
|
2011-02-01 09:49:24 -07:00
|
|
|
// Function to be called by windows CreateThread
|
2010-09-11 19:45:16 -06:00
|
|
|
// to start new os thread.
|
runtime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost
Prefix all external symbols in runtime by runtime·,
to avoid conflicts with possible symbols of the same
name in linked-in C libraries. The obvious conflicts
are printf, malloc, and free, but hide everything to
avoid future pain.
The symbols left alone are:
** known to cgo **
_cgo_free
_cgo_malloc
libcgo_thread_start
initcgo
ncgocall
** known to linker **
_rt0_$GOARCH
_rt0_$GOARCH_$GOOS
text
etext
data
end
pclntab
epclntab
symtab
esymtab
** known to C compiler **
_divv
_modv
_div64by32
etc (arch specific)
Tested on darwin/386, darwin/amd64, linux/386, linux/amd64.
Built (but not tested) for freebsd/386, freebsd/amd64, linux/arm, windows/386.
R=r, PeterGo
CC=golang-dev
https://golang.org/cl/2899041
2010-11-04 12:00:19 -06:00
|
|
|
uint32 runtime·tstart_stdcall(M *newm);
|
2010-09-11 19:45:16 -06:00
|
|
|
|
2011-01-19 13:10:15 -07:00
|
|
|
uint32 runtime·issigpanic(uint32);
|
|
|
|
void runtime·sigpanic(void);
|
2011-02-14 10:15:13 -07:00
|
|
|
uint32 runtime·ctrlhandler(uint32 type);
|
2011-01-21 19:55:53 -07:00
|
|
|
|
|
|
|
// Windows dll function to go callback entry.
|
2011-02-01 09:49:24 -07:00
|
|
|
byte *runtime·compilecallback(Eface fn, bool cleanstack);
|
|
|
|
void *runtime·callbackasm(void);
|
2012-02-13 19:51:38 -07:00
|
|
|
|
|
|
|
// TODO(brainman): should not need those
|
|
|
|
#define NSIG 65
|