Codebase list golang-golang-x-sys / 23485d5
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
3 changed file(s) with 14 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
2222 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
2323
2424 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)
2730 }
2831
2932 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
2525 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
2626
2727 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)
3033 }
3134
3235 //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
291291 t.Errorf("CpuClr: didn't clear CPU %d in set: %v", cpu, newMask)
292292 }
293293
294 if runtime.NumCPU() < 2 {
295 t.Skip("skipping setaffinity tests on single CPU system")
296 }
297
294298 err = unix.SchedSetaffinity(0, &newMask)
295299 if err != nil {
296300 t.Fatalf("SchedSetaffinity: %v", err)