Commit 98c98192 authored by Russ Cox's avatar Russ Cox

final batch for "declared and not used"

 * update mksyscall.sh and rebuild syscall/z*.go
 * fix a few linux-only files

R=r
DELTA=455  (12 added, 1 deleted, 442 changed)
OCL=34637
CL=34655
parent 9b5eb305
......@@ -421,7 +421,6 @@ func (p *process) uninstallBreakpoints() os.Error {
// event.
func (t *thread) wait() {
for {
var err os.Error;
var ev debugEvent;
ev.t = t;
t.logTrace("beginning wait");
......@@ -764,7 +763,7 @@ func (p *process) do(f func () os.Error) os.Error {
// stopMonitor stops the monitor with the given error. If the monitor
// is already stopped, does nothing.
func (p *process) stopMonitor(err os.Error) {
doNotBlock := p.stopReq <- err;
_ = p.stopReq <- err; // do not block
// TODO(austin) Wait until monitor has exited?
}
......@@ -1215,7 +1214,7 @@ func (p *process) attachAllThreads() os.Error {
continue;
}
t, err := p.attachThread(tid);
_, err = p.attachThread(tid);
if err != nil {
// There could have been a race, or
// this process could be a zobmie.
......@@ -1309,7 +1308,7 @@ func ForkExec(argv0 string, argv []string, envv []string, dir string, fd []*os.F
p.pid = pid;
// The process will raise SIGTRAP when it reaches execve.
t, err := p.newThread(pid, syscall.SIGTRAP, false);
_, err := p.newThread(pid, syscall.SIGTRAP, false);
return err;
});
if err != nil {
......
......@@ -135,7 +135,7 @@ func (p *pollster) WaitFD(nsec int64) (fd int, mode int, err os.Error) {
}
// Other events are error conditions - wake whoever is waiting.
events, already := p.events[fd];
events, _ := p.events[fd];
if events & writeFlags != 0 {
p.StopWaiting(fd, writeFlags);
return fd, 'w', nil;
......
......@@ -127,17 +127,21 @@ while(<>) {
# Actual call.
my $args = join(', ', @args);
$text .= "\tr0, r1, e1 := $asm($sysname, $args);\n";
my $call = "$asm($sysname, $args)";
# Assign return values.
my $body = "";
my @ret = ("_", "_", "_");
for(my $i=0; $i<@out; $i++) {
my $p = $out[$i];
my ($name, $type) = parseparam($p);
my $reg = "";
if($name eq "errno") {
$reg = "e1";
$ret[2] = $reg;
} else {
$reg = sprintf("r%d", $i);
$ret[$i] = $reg;
}
if($type eq "bool") {
$reg = "$reg != 0";
......@@ -152,10 +156,18 @@ while(<>) {
} else {
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
}
$ret[$i] = sprintf("r%d", $i);
$ret[$i+1] = sprintf("r%d", $i+1);
$i++; # loop will do another $i++
}
$text .= "\t$name = $type($reg);\n";
$body .= "\t$name = $type($reg);\n";
}
if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
$text .= "\t$call;\n";
} else {
$text .= "\t$ret[0], $ret[1], $ret[2] := $call;\n";
}
$text .= $body;
$text .= "\treturn;\n";
$text .= "}\n\n";
......
......@@ -180,7 +180,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
func Sleep(nsec int64) (errno int) {
tv := NsecToTimeval(nsec);
n, err := Select(0, nil, nil, nil, &tv);
_, err := Select(0, nil, nil, nil, &tv);
return err;
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment