Skip to content

Commit be62813

Browse files
aarzilliderekparker
authored andcommitted
proc: rename ManualStopRequested to CheckAndClearManualStopRequest (#1119)
1 parent beb3e76 commit be62813

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

pkg/proc/core/core.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func (p *Process) RequestManualStop() error {
282282
return nil
283283
}
284284

285-
func (p *Process) ManualStopRequested() bool {
285+
func (p *Process) CheckAndClearManualStopRequest() bool {
286286
return false
287287
}
288288

pkg/proc/gdbserial/gdbserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ func (p *Process) RequestManualStop() error {
717717
return p.conn.sendCtrlC()
718718
}
719719

720-
func (p *Process) ManualStopRequested() bool {
720+
func (p *Process) CheckAndClearManualStopRequest() bool {
721721
p.conn.manualStopMutex.Lock()
722722
msr := p.manualStopRequested
723723
p.manualStopRequested = false

pkg/proc/interface.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ type ProcessManipulation interface {
8787
SwitchThread(int) error
8888
SwitchGoroutine(int) error
8989
RequestManualStop() error
90-
// ManualStopRequested returns true the first time it's called after a call
91-
// to RequestManualStop.
92-
ManualStopRequested() bool
90+
// CheckAndClearManualStopRequest returns true the first time it's called
91+
// after a call to RequestManualStop.
92+
CheckAndClearManualStopRequest() bool
9393
Halt() error
9494
Kill() error
9595
Detach(bool) error

pkg/proc/native/proc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (dbp *Process) RequestManualStop() error {
183183
return dbp.requestManualStop()
184184
}
185185

186-
func (dbp *Process) ManualStopRequested() bool {
186+
func (dbp *Process) CheckAndClearManualStopRequest() bool {
187187
dbp.haltMu.Lock()
188188
msr := dbp.manualStopRequested
189189
dbp.manualStopRequested = false

pkg/proc/proc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ func Continue(dbp Process) error {
8787
if dbp.Exited() {
8888
return &ProcessExitedError{Pid: dbp.Pid()}
8989
}
90-
dbp.ManualStopRequested()
90+
dbp.CheckAndClearManualStopRequest()
9191
for {
92-
if dbp.ManualStopRequested() {
92+
if dbp.CheckAndClearManualStopRequest() {
9393
return nil
9494
}
9595
trapthread, err := dbp.ContinueOnce()

0 commit comments

Comments
 (0)