Rob Pike
e9047d1fc2
fix silly portability bug
...
R=gri
OCL=15238
CL=15238
2008-09-12 12:17:13 -07:00
Rob Pike
6e8dbc2051
- catch trace traps
...
- disassemble the instructions in a trace trap to see if it's a run-time trap
- if so, print relevant info
- avoid double-printing traceback on panic
R=ken,rsc
DELTA=66 (50 added, 7 deleted, 9 changed)
OCL=15199
CL=15224
2008-09-12 09:44:41 -07:00
Ken Thompson
47580f79b4
bug075
...
R=r
OCL=15192
CL=15192
2008-09-11 19:09:25 -07:00
Russ Cox
376898ca8b
go threads for OS X
...
R=r
OCL=14944
CL=15013
2008-09-09 11:50:14 -07:00
Rob Pike
24838a2df6
fix bug in stack limit calculation - was setting limit reg in wrong place.
...
R=ken
OCL=14981
CL=14981
2008-09-08 19:30:14 -07:00
Ken Thompson
66a603c986
arrays
...
R=r
OCL=14603
CL=14603
2008-08-27 17:28:30 -07:00
Rob Pike
968701beb1
- fix signedness bug in sys.Inf()
...
- add NaN, Inf printing to fmt
- fix a couple of bugs in fmt
- add a test for fmt
R=ken
OCL=14092
CL=14092
2008-08-11 15:04:54 -07:00
Russ Cox
f7f6329e26
kill trailing white space.
...
(apparently my first attempt didn't work.)
R=r
OCL=13888
CL=13888
2008-08-05 14:21:42 -07:00
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