]> Cypherpunks repositories - gostls13.git/commit
first cut at multithreading. works on Linux.
authorRuss Cox <rsc@golang.org>
Mon, 4 Aug 2008 23:43:49 +0000 (16:43 -0700)
committerRuss Cox <rsc@golang.org>
Mon, 4 Aug 2008 23:43:49 +0000 (16:43 -0700)
commitd28acc42ec0f8dff9471e4663cfe55aa5da86656
tree9bbd3f46848f10a65f701fb12cbddadf5e59b114
parentf439299035bbdb4ac7c1c684214b7bf8b4347474
first cut at multithreading.  works on Linux.

* kick off new os procs (machs) as needed
* add sys·sleep for testing
* add Lock, Rendez
* properly lock mal, sys·newproc, scheduler
* linux syscall arg #4 is in R10, not CX
* chans are not multithread-safe yet
* multithreading disabled by default;
  set $gomaxprocs=2 (or 1000) to turn it on

This should build on OS X but may not.
Rob and I will fix soon after submitting.

TBR=r
OCL=13784
CL=13842
13 files changed:
src/cmd/gc/sys.go
src/cmd/gc/sysimport.c
src/runtime/amd64_linux.h
src/runtime/chan.c
src/runtime/proc.c
src/runtime/rt0_amd64.s
src/runtime/rt1_amd64_darwin.c
src/runtime/rt1_amd64_linux.c
src/runtime/runtime.c
src/runtime/runtime.h
src/runtime/sys_amd64_darwin.s
src/runtime/sys_amd64_linux.s
src/syscall/syscall_amd64_linux.s