1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:07:34 +00:00

Implement basic support for POSIX-style select().

Now we can block on both the PTY *and* the GUI event stream in Terminal.
This commit is contained in:
Andreas Kling 2019-01-15 23:12:20 +01:00
parent 46181cf023
commit 10387beda7
8 changed files with 164 additions and 30 deletions

View file

@ -71,8 +71,11 @@
__ENUMERATE_SYSCALL(gui_destroy_window) \
__ENUMERATE_SYSCALL(gui_get_window_backing_store) \
__ENUMERATE_SYSCALL(gui_invalidate_window) \
__ENUMERATE_SYSCALL(select) \
struct fd_set;
namespace Syscall {
enum Function {
@ -102,6 +105,14 @@ struct SC_mmap_params {
int32_t offset; // FIXME: 64-bit off_t?
};
struct SC_select_params {
int nfds;
fd_set* readfds;
fd_set* writefds;
fd_set* exceptfds;
struct timeval* timeout;
};
void initialize();
int sync();