aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-07-12 17:46:03 -0700
committerRuss Cox <rsc@golang.org>2010-07-12 17:46:03 -0700
commit11f9c0398655e6ac349517792c0cad7ce69721f4 (patch)
tree8b05ecd24406a547b7b23f06eabe8a4003af60f7
parentb6850fe73973c3f0953273f0799732678ba85f34 (diff)
downloadgo-11f9c0398655e6ac349517792c0cad7ce69721f4.tar.gz
go-11f9c0398655e6ac349517792c0cad7ce69721f4.zip
fix build
R=gri CC=golang-dev https://golang.org/cl/1813042
-rw-r--r--src/pkg/debug/proc/proc_linux.go23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/pkg/debug/proc/proc_linux.go b/src/pkg/debug/proc/proc_linux.go
index 5253ea846b..1194d3afff 100644
--- a/src/pkg/debug/proc/proc_linux.go
+++ b/src/pkg/debug/proc/proc_linux.go
@@ -153,7 +153,7 @@ type process struct {
debugEvents chan *debugEvent
debugReqs chan *debugReq
stopReq chan os.Error
- transitionHandlers *vector.Vector
+ transitionHandlers vector.Vector
err os.Error
}
@@ -472,8 +472,8 @@ func (t *thread) setState(newState threadState) {
return
}
- t.proc.transitionHandlers = new(vector.Vector)
- for _, h := range handlers.Data() {
+ t.proc.transitionHandlers = nil
+ for _, h := range handlers {
h := h.(*transitionHandler)
h.handle(t, oldState, newState)
}
@@ -738,7 +738,7 @@ func (p *process) monitor() {
// Abort waiting handlers
// TODO(austin) How do I stop the wait threads?
- for _, h := range p.transitionHandlers.Data() {
+ for _, h := range p.transitionHandlers {
h := h.(*transitionHandler)
h.onErr(err)
}
@@ -1249,14 +1249,13 @@ func (p *process) attachAllThreads() os.Error {
// newProcess creates a new process object and starts its monitor thread.
func newProcess(pid int) *process {
p := &process{
- pid: pid,
- threads: make(map[int]*thread),
- breakpoints: make(map[uintptr]*breakpoint),
- ready: make(chan bool, 1),
- debugEvents: make(chan *debugEvent),
- debugReqs: make(chan *debugReq),
- stopReq: make(chan os.Error),
- transitionHandlers: new(vector.Vector),
+ pid: pid,
+ threads: make(map[int]*thread),
+ breakpoints: make(map[uintptr]*breakpoint),
+ ready: make(chan bool, 1),
+ debugEvents: make(chan *debugEvent),
+ debugReqs: make(chan *debugReq),
+ stopReq: make(chan os.Error),
}
go p.monitor()