mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:58:12 +00:00
Kernel+LibC: Share definitions for poll.h
This commit is contained in:
parent
d794ed1de7
commit
d33b43276c
3 changed files with 36 additions and 32 deletions
33
Kernel/API/POSIX/poll.h
Normal file
33
Kernel/API/POSIX/poll.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/API/POSIX/sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define POLLIN (1u << 0)
|
||||
#define POLLPRI (1u << 1)
|
||||
#define POLLOUT (1u << 2)
|
||||
#define POLLERR (1u << 3)
|
||||
#define POLLHUP (1u << 4)
|
||||
#define POLLNVAL (1u << 5)
|
||||
#define POLLRDHUP (1u << 13)
|
||||
|
||||
struct pollfd {
|
||||
int fd;
|
||||
short events;
|
||||
short revents;
|
||||
};
|
||||
|
||||
typedef unsigned nfds_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue