Files
asciinema/util/fdset_freebsd_amd64.go

12 lines
227 B
Go
Raw Permalink Normal View History

2015-04-24 13:11:04 +02:00
package util
import "syscall"
func FD_SET(p *syscall.FdSet, fd int) {
p.X__fds_bits[fd/64] |= 1 << uint(fd) % 64
}
func FD_ISSET(p *syscall.FdSet, fd int) bool {
return (p.X__fds_bits[fd/64] & (1 << uint(fd) % 64)) != 0
}