1
0
mirror of https://github.com/golang/go synced 2024-10-04 14:41:25 -06:00
Commit Graph

6 Commits

Author SHA1 Message Date
Mikio Hara
ae9b661fa8 runtime: make use of THREAD_SHARE userspace mutex on freebsd
For now Note, futexsleep and futexwakeup are designed for threads,
not for processes. The explicit use of UMTX_OP_WAIT_UINT_PRIVATE and
UMTX_OP_WAKE_PRIVATE can avoid unnecessary traversals of VM objects,
to hit undiscovered bugs related to VM system on SMP/SMT/NUMA
environment.

Update #7496

LGTM=iant
R=golang-codereviews, gobot, iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/72760043
2014-03-12 10:33:09 +09:00
Mikio Hara
c5732c8526 runtime: integrated network poller for freebsd/amd64,386, openbsd/amd64,386
Update #5199

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/8825043
2013-05-20 19:25:32 +09:00
Ian Lance Taylor
9fe8681df6 runtime: use UMTX_OP_WAIT_UINT on FreeBSD
UMTX_OP_WAIT expects that the address points to a uintptr, but
the code in lock_futex.c uses a uint32.  UMTX_OP_WAIT_UINT is
just like UMTX_OP_WAIT, but the address points to a uint32.
This almost certainly makes no difference on a little-endian
system, but since the kernel supports it we should do the
right thing.  And, who knows, maybe it matters.

R=golang-dev, bradfitz, r, ality
CC=golang-dev
https://golang.org/cl/8699043
2013-04-12 05:20:15 -07:00
Mikio Hara
f02cf1997d runtime: regenerate defs-files for freebsd
R=minux.ma, jsing
CC=golang-dev
https://golang.org/cl/6855080
2012-11-26 21:29:13 +09:00
John Graham-Cumming
314fd62434 runtime: implement runtime.SysUnused on FreeBSD
madvise was missing so implement it in assembler. This change
needs to be extended to the other BSD variantes (Net and Open)

Without this change the scavenger will attempt to pass memory back
to the operating system when it has become idle, but the memory is
not returned and for long running Go processes the total memory used
can grow until OOM occurs.

I have only been able to test the code on FreeBSD AMD64. The ARM
platforms needs testing.

R=golang-dev, mikioh.mikioh, dave, jgc, minux.ma
CC=golang-dev
https://golang.org/cl/6850081
2012-11-24 15:55:19 +11:00
Russ Cox
851f30136d runtime: make more build-friendly
Collapse the arch,os-specific directories into the main directory
by renaming xxx/foo.c to foo_xxx.c, and so on.

There are no substantial edits here, except to the Makefile.
The assumption is that the Go tool will #define GOOS_darwin
and GOARCH_amd64 and will make any file named something
like signals_darwin.h available as signals_GOOS.h during the
build.  This replaces what used to be done with -I$(GOOS).

There is still work to be done to make runtime build with
standard tools, but this is a big step.  After this we will have
to write a script to generate all the generated files so they
can be checked in (instead of generated during the build).

R=r, iant, r, lucio.dere
CC=golang-dev
https://golang.org/cl/5490053
2011-12-16 15:33:58 -05:00