Russ Cox
96824000ed
* comment, clean up scheduler
...
* rewrite lock implementation to be correct
(tip: never assume that an algorithm you found
in a linux man page is correct.)
* delete unneeded void* arg from clone fn
* replace Rendez with Note
* comment mal better
* use 6c -w, fix warnings
* mark all assembly functions 7
R=r
DELTA=828 (338 added, 221 deleted, 269 changed)
OCL=13884
CL=13886
2008-08-05 14:18:47 -07:00
Rob Pike
5adbacb8e7
allow pointers as keys in maps, treating them the same as ints - ptr eq not value equality
...
R=ken,gri
OCL=13879
CL=13879
2008-08-05 11:14:35 -07:00
Russ Cox
c8dee2770d
acid. works only on Linux for now
...
R=r
DELTA=7031 (6906 added, 113 deleted, 12 changed)
OCL=13847
CL=13852
2008-08-04 17:24:25 -07:00
Russ Cox
d28acc42ec
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
2008-08-04 16:43:49 -07:00
Russ Cox
873ba78b79
Remove doubled #else
...
R=r
DELTA=4 (2 added, 2 deleted, 0 changed)
OCL=13775
CL=13779
2008-08-03 00:34:05 -07:00
Russ Cox
4feda71b7d
slightly gratuitous reorg of scheduler code
...
* rename select (very loaded word) nextgoroutine
* separate out "enter scheduler" (sys·gosched)
from the scheduler itself (scheduler)
R=r
APPROVED=r
DELTA=36 (17 added, 15 deleted, 4 changed)
OCL=13772
CL=13774
2008-08-02 22:34:04 -07:00
Rob Pike
ebec99179f
fix a comment
...
fix a register name
R=gri
OCL=13548
CL=13548
2008-07-29 15:17:27 -07:00
Rob Pike
3835e01d97
print tracebacks for all goroutines, not just the crashing one
...
R=ken
OCL=13518
CL=13518
2008-07-28 11:29:41 -07:00
Ken Thompson
120827284e
select/chan
...
R=r
DELTA=517 (137 added, 98 deleted, 282 changed)
OCL=13495
CL=13495
2008-07-26 14:21:21 -07:00
Ken Thompson
949ab5c7ff
select
...
R=r
APPROVED=r
DELTA=41 (24 added, 13 deleted, 4 changed)
OCL=13480
CL=13480
2008-07-25 17:03:27 -07:00
Ken Thompson
e963cba8a1
select
...
R=r
APPROVED=r
DELTA=147 (94 added, 14 deleted, 39 changed)
OCL=13477
CL=13477
2008-07-25 15:55:12 -07:00
Ken Thompson
ece3e57c85
read select
...
R=r
APPROVED=r
DELTA=120 (108 added, 0 deleted, 12 changed)
OCL=13468
CL=13468
2008-07-25 11:58:26 -07:00
Ken Thompson
cb9b1038db
select
...
R=r
APPROVED=r
DELTA=638 (433 added, 21 deleted, 184 changed)
OCL=13426
CL=13438
2008-07-24 15:57:30 -07:00
Ken Thompson
b78676a49d
start of select
...
random bugs fixed
SVN=128149
2008-07-20 20:13:07 -07:00
Ken Thompson
90da636c15
init filename vs pkgname
...
SVN=128117
2008-07-19 14:20:46 -07:00
Ken Thompson
fb3af53f4e
initialization
...
SVN=128115
2008-07-19 13:38:29 -07:00
Ken Thompson
9e2d185040
div bug
...
[]ptr bug
proc reuses old g* structures
differnt assignment of offsets to parameters
SVN=127888
2008-07-17 15:03:39 -07:00
Ken Thompson
e7d549fbd7
new (more fifo) schedulint algorithm
...
newproc will reuse dead procs
SVN=127565
2008-07-16 13:50:23 -07:00
Ken Thompson
44b8934d35
back out last chan fix
...
allow print of pointers
SVN=127548
2008-07-16 12:44:21 -07:00
Ken Thompson
90da10d7ac
chan bool offset bug
...
SVN=127537
2008-07-16 11:46:33 -07:00
Ken Thompson
ac048ce7f4
new chan syntax
...
SVN=127437
2008-07-15 21:07:59 -07:00
Rob Pike
cbdaa10f8c
add linkage for writefile on darwin
...
SVN=127208
2008-07-15 08:27:50 -07:00
Rob Pike
c870ac239e
add sys.writefile; support for darwin only in this CL
...
SVN=127153
2008-07-14 20:54:55 -07:00
Ken Thompson
2d9ff40774
chan asynch
...
SVN=127121
2008-07-14 17:41:38 -07:00
Rob Pike
bad8c3d5dd
stop traceback when pc leaves text segment
...
SVN=127088
2008-07-14 16:00:44 -07:00
Ken Thompson
af58f17af9
synch chan
...
SVN=127057
2008-07-14 14:34:27 -07:00
Ken Thompson
526200345c
synch chan
...
SVN=127055
2008-07-14 14:33:39 -07:00
Ken Thompson
97cab903af
chan
...
SVN=126959
2008-07-13 16:20:27 -07:00
Ken Thompson
594175d0b5
chan
...
SVN=126958
2008-07-13 14:29:46 -07:00
Ken Thompson
3f982aeaf6
morestack magic number
...
automatically generated in 6g and 6c,
manually set in 6a. format is
TEXT a(SB),, $a-b
where a is auto size and b is parameter size
SVN=126946
2008-07-12 17:16:22 -07:00
Rob Pike
2da9783e2b
preserve AX across stack jump so C routines return correct value when triggering morestack.
...
SVN=126935
2008-07-12 11:30:53 -07:00
Rob Pike
b07e084a99
delete dead code
...
SVN=126932
2008-07-11 19:40:03 -07:00
Rob Pike
c8bce425b0
fix comment
...
SVN=126931
2008-07-11 19:37:47 -07:00
Rob Pike
44f65c8f08
fix traceback to know about new segmenting
...
SVN=126930
2008-07-11 19:35:14 -07:00
Ken Thompson
751ce3a77a
segmented stacks AND goroutines
...
SVN=126929
2008-07-11 19:16:39 -07:00
Ken Thompson
7b454bb1d9
defined external registers g and m
...
SVN=126521
2008-07-09 11:35:26 -07:00
Rob Pike
41b9617be4
fix ldexp, frexp, and make math package compile and test correctly
...
SVN=126423
2008-07-08 17:26:10 -07:00
Ken Thompson
4528854308
unique import/export names
...
more on go statement
SVN=126421
2008-07-08 17:19:17 -07:00
Rob Pike
6db99de606
add bytestorune and stringtorune to sys.
...
SVN=126321
2008-07-08 10:36:43 -07:00
Ken Thompson
1d31a25d83
more coroutine
...
fixed a,b,c := x,x,x
SVN=126250
2008-07-07 17:59:32 -07:00
Rob Pike
5b904a3bde
update to Unicode 5
...
SVN=126184
2008-07-07 14:07:46 -07:00
Ken Thompson
ac5a887d5d
floating point print
...
SVN=126038
2008-07-04 18:01:35 -07:00
Rob Pike
ef12ae4631
drop some superfluous file prefixes in runtime
...
SVN=125956
2008-07-03 13:42:04 -07:00
Rob Pike
6973e3813f
update golden
...
fix a comment
SVN=125405
2008-06-30 16:30:53 -07:00
Rob Pike
03febb6773
clean up rearrangement of runtime functions in the source
...
add isNaN, isInf, NaN, Inf
SVN=125389
2008-06-30 15:30:47 -07:00
Rob Pike
d3204ef19f
makes stack traces work for segmented stacks
...
SVN=125371
2008-06-30 14:39:47 -07:00
Rob Pike
8e82a673db
Break runtime.c into separate pieces for maps, strings, print, etc.
...
Share common assembler for amd64 runtime
SVN=125317
2008-06-30 11:50:36 -07:00
Ken Thompson
b987f7a757
segmented stacks
...
SVN=125267
2008-06-29 20:40:08 -07:00
Rob Pike
34cb7c299e
export sys.exit
...
update tests to use exit rather than return
ignore return value from main (actually done in prior CL)
SVN=125173
2008-06-27 14:15:06 -07:00
Rob Pike
3719aa4d9a
update darwin for segmented stacks
...
SVN=125154
2008-06-27 13:10:56 -07:00