The Linux kernel manpages declare the epoll_ctl
procedure as follows:
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
As evident, the event
parameter is declared as a pointer to the epoll_event
struct
.
The significance of said observation in the context of this question is that there is no const
ahead of the pointer type declaration, and thus, the procedure appears to be permitted to modify the contents of the passed structure.
Is this an omission of sorts, or was the procedure made like that by design and we have to assume that the passed structure may indeed be modified inside the procedure?
I understand that the declaration is unambiguous here, but is there reason to believe this to be an omission?
I have also taken a look at the relevant source code in kernel 4.6 tree, and I don't see much evidence that the procedure even intends to modify the structure, so there.