mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 19:58:03 +01:00
12 lines
227 B
Go
12 lines
227 B
Go
|
|
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
|
||
|
|
}
|