Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 25 additions & 23 deletions qiling/os/posix/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,26 +1065,28 @@ class qnx_mmap_prot_flags(QlPrettyFlag):
SHMGET = 23
SHMCTL = 24

# epoll syscall, see https://codebrowser.dev/glibc/glibc/sysdeps/unix/sysv/linux/sys/epoll.h.html
EPOLL_OPS = {
0x001: "EPOLL_CTL_ADD",
0x002: "EPOLL_CTL_DEL",
0x003: "EPOLL_CTL_MOD"
}

EPOLLIN = 0x001
EPOLLPRI = 0x002
EPOLLOUT = 0x004
EPOLLRDNORM = 0x040
EPOLLRDBAND = 0x080
EPOLLWRNORM = 0x100
EPOLLWRBAND = 0x200
EPOLLMSG = 0x400
EPOLLERR = 0x008
EPOLLHUP = 0x010
EPOLLRDHUP = 0x2000
EPOLLEXCLUSIVE = 268435456 #1 << 28
EPOLLWAKEUP = 536870912 #1 << 29
EPOLLONESHOT = 1073741824 #1 << 30
EPOLLET = 2147483648 #1 << 31
EPOLL_CLOEXEC = 0x02000000
# see: https://elixir.bootlin.com/linux/v5.19.17/source/include/uapi/linux/eventpoll.h
EPOLL_CTL_ADD = 1
EPOLL_CTL_DEL = 2
EPOLL_CTL_MOD = 3

EPOLLIN = 0x00000001
EPOLLPRI = 0x00000002
EPOLLOUT = 0x00000004
EPOLLERR = 0x00000008
EPOLLHUP = 0x00000010
EPOLLNVAL = 0x00000020
EPOLLRDNORM = 0x00000040
EPOLLRDBAND = 0x00000080
EPOLLWRNORM = 0x00000100
EPOLLWRBAND = 0x00000200
EPOLLMSG = 0x00000400
EPOLLRDHUP = 0x00002000

# TODO: should be aligned to emulated system's close-on-exec value
EPOLL_CLOEXEC = 0o2000000

EPOLLEXCLUSIVE = 0b1 << 28
EPOLLWAKEUP = 0b1 << 29
EPOLLONESHOT = 0b1 << 30
EPOLLET = 0b1 << 31
Loading