Update upstream source from tag 'upstream/0.0_git20180308.349b81f'
Update to upstream version '0.0~git20180308.349b81f'
with Debian dir e3f0ac2607b2500006953c8c0f44ca5423ec2d36
Anthony Fok
6 years ago
22 | 22 |
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
23 | 23 |
|
24 | 24 |
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
25 | |
ts := Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
|
26 | |
return Pselect(nfd, r, w, e, &ts, nil)
|
|
25 |
var ts *Timespec
|
|
26 |
if timeout != nil {
|
|
27 |
ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
|
|
28 |
}
|
|
29 |
return Pselect(nfd, r, w, e, ts, nil)
|
27 | 30 |
}
|
28 | 31 |
|
29 | 32 |
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
25 | 25 |
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
|
26 | 26 |
|
27 | 27 |
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
28 | |
ts := Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
|
29 | |
return Pselect(nfd, r, w, e, &ts, nil)
|
|
28 |
var ts *Timespec
|
|
29 |
if timeout != nil {
|
|
30 |
ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
|
|
31 |
}
|
|
32 |
return Pselect(nfd, r, w, e, ts, nil)
|
30 | 33 |
}
|
31 | 34 |
|
32 | 35 |
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
|
291 | 291 |
t.Errorf("CpuClr: didn't clear CPU %d in set: %v", cpu, newMask)
|
292 | 292 |
}
|
293 | 293 |
|
|
294 |
if runtime.NumCPU() < 2 {
|
|
295 |
t.Skip("skipping setaffinity tests on single CPU system")
|
|
296 |
}
|
|
297 |
|
294 | 298 |
err = unix.SchedSetaffinity(0, &newMask)
|
295 | 299 |
if err != nil {
|
296 | 300 |
t.Fatalf("SchedSetaffinity: %v", err)
|