summaryrefslogtreecommitdiff
path: root/src/sync
Commit message (Collapse)AuthorAgeFilesLines
* all: merge dev.garbage (d1238958d4ae) into default branchRuss Cox2014-12-051-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | When we start work on Gerrit, ppc64 and garbage collection work will continue in the master branch, not the dev branches. (We may still use dev branches for other things later, but these are ready to be merged, and doing it now, before moving to Git means we don't have to have dev branches working in the Gerrit workflow on day one.) TBR=rlh CC=golang-codereviews https://codereview.appspot.com/183140043
| * all: power64 is now ppc64Russ Cox2014-12-051-1/+1
| | | | | | | | | | | | | | | | | | Fixes issue 8654. LGTM=austin R=austin CC=golang-codereviews https://codereview.appspot.com/180600043
| * [dev.power64] all: merge default into dev.power64Austin Clements2014-11-031-0/+184
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivial merge except for src/runtime/asm_power64x.s and src/runtime/signal_power64x.c LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/168950044
* | \ [dev.garbage] all: merge default (f38460037b72) into dev.garbageRuss Cox2014-11-142-4/+188
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | This is the revision that dev.cc is branched from. LGTM=austin R=austin CC=golang-codereviews https://codereview.appspot.com/169590043
| * | [dev.garbage] cmd/gc, runtime: implement write barriers in terms of ↵Russ Cox2014-10-301-4/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | writebarrierptr This CL implements the many multiword write barriers by calling writebarrierptr, so that only writebarrierptr needs the actual barrier. In lieu of an actual barrier, writebarrierptr checks that the value being copied is not a small non-zero integer. This is enough to shake out bugs where the barrier is being called when it should not (for non-pointer values). It also found a few tests in sync/atomic that were being too clever. This CL adds a write barrier for the memory moved during the builtin copy function, which I forgot when inserting barriers for Go 1.4. This CL re-enables some write barriers that were disabled for Go 1.4. Those were disabled because it is possible to change the generated code so that they are unnecessary most of the time, but we have not changed the generated code yet. For safety they must be enabled. None of this is terribly efficient. We are aiming for correct first. LGTM=rlh R=rlh CC=golang-codereviews https://codereview.appspot.com/168770043
| * [dev.power64] runtime: power64 fixes and ports of changesAustin Clements2014-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix include paths that got moved in the great pkg/ rename. Add missing runtime/arch_* files for power64. Port changes that happened on default since branching to runtime/{asm,atomic,sys_linux}_power64x.s (precise stacks, calling convention change, various new and deleted functions. Port struct renaming and fix some bugs in runtime/defs_linux_power64.h. LGTM=rsc R=rsc, dave CC=golang-codereviews https://codereview.appspot.com/161450043
| * [dev.power64] all: merge default into dev.power64Austin Clements2014-10-221-0/+184
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings dev.power64 up-to-date with the current tip of default. go_bootstrap is still panicking with a bad defer when initializing the runtime (even on amd64). LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/152570049
| | * build: merge the great pkg/ rename into dev.power64Austin Clements2014-10-221-0/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | This also removes pkg/runtime/traceback_lr.c, which was ported to Go in an earlier commit and then moved to runtime/traceback.go. Reviewer: rsc@golang.org rsc: LGTM
* | | sync/atomic: fix comment referencing Value.Store's argument nameBrad Fitzpatrick2014-10-311-1/+1
|/ / | | | | | | | | | | | | | | | | Fixes Issue 9029 LGTM=adg, r R=r, adg CC=golang-codereviews https://codereview.appspot.com/161630044
* | sync: release Pool memory during second and later GCsDmitriy Vyukov2014-10-222-21/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pool memory was only being released during the first GC after the first Put. Put assumes that p.local != nil means p is on the allPools list. poolCleanup (called during each GC) removed each pool from allPools but did not clear p.local, so each pool was cleared by exactly one GC and then never cleared again. This bug was introduced late in the Go 1.3 release cycle. Fixes issue 8979. LGTM=rsc R=golang-codereviews, bradfitz, r, rsc CC=golang-codereviews, khr https://codereview.appspot.com/162980043
* | runtime: more NOPTRRuss Cox2014-09-242-2/+2
| | | | | | | | | | | | | | | | | | | | Fixes linux builds (_vdso); may fix others. I can at least cross-compile cmd/go for every implemented system now. TBR=iant CC=golang-codereviews https://codereview.appspot.com/142630043
* | sync/atomic: remove unnecessary race instrumentation in ValueDmitriy Vyukov2014-09-173-45/+0
| | | | | | | | | | | | | | | | | | | | | | | | It is left from the time when Value was implemented in assembly. Now it is implemented in Go and race detector understands Go. In particular the atomic operations must provide all necessary synchronization. LGTM=adg R=golang-codereviews, adg CC=golang-codereviews, khr, rsc https://codereview.appspot.com/145880043
* | sync/atomic: add more missing Go prototypeRuss Cox2014-09-171-0/+6
| | | | | | | | | | | | | | | | Should fix nacl/arm build. TBR=minux CC=golang-codereviews https://codereview.appspot.com/145070043
* | sync: fix linux/arm buildDave Cheney2014-09-171-2/+0
| | | | | | | | | | | | | | | | | | For real this time. LGTM=minux R=golang-codereviews, minux CC=golang-codereviews https://codereview.appspot.com/141640043
* | sync/atomic: add ValueDmitriy Vyukov2014-09-164-0/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Value provides an atomic load and store of a consistently typed value. It's intended to be used with copy-on-write idiom (see the example). Performance: BenchmarkValueRead 50000000 21.7 ns/op BenchmarkValueRead-2 200000000 8.63 ns/op BenchmarkValueRead-4 300000000 4.33 ns/op TBR=rsc R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/136710045
* | liblink, sync/atomic: fix arm buildRuss Cox2014-09-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The liblink code to insert the FUNCDATA for a stack map from the Go prototype was not correct for ARM (different data structure layout). Also, sync/atomic was missing some Go prototypes for ARM-specific functions. TBR=r CC=golang-codereviews https://codereview.appspot.com/143160045
* | sync: simplify TestOncePanicJosh Bleecher Snyder2014-09-161-18/+12
| | | | | | | | | | | | | | | | | | Follow-up to CL 137350043. LGTM=r R=r CC=golang-codereviews https://codereview.appspot.com/141620043
* | sync/once: panicking functions still marked as completeRob Pike2014-09-162-4/+11
|/ | | | | | | | | | | | | | | This is a corner case, and one that was even tested, but this CL changes the behavior to say that f is "complete" even if it panics. But don't think of it that way, think of it as sync.Once runs the function only the first time it is called, rather than repeatedly until a run of the function completes. Fixes issue 8118. LGTM=dvyukov R=golang-codereviews, dvyukov CC=golang-codereviews https://codereview.appspot.com/137350043
* build: move package sources from src/pkg to srcRuss Cox2014-09-0832-0/+5030
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.