[gdb] Handle EINTR in ser-event.c

Use gdb syscall wrappers to handle EINTR in ser-event.c.

Tested on aarch64-linux.
This commit is contained in:
Tom de Vries
2024-11-22 17:44:29 +01:00
parent 4e4dfc4728
commit 2af94d6c92
2 changed files with 19 additions and 12 deletions

View File

@@ -101,6 +101,17 @@ read (int fd, void *buf, size_t count)
return gdb::handle_eintr (-1, ::read, fd, buf, count);
}
template<typename... Args> int fcntl (int fd, int op, Args... args)
{
return gdb::handle_eintr (-1, ::fcntl, fd, op, args...);
}
inline ssize_t
write (int fd, const void *buf, size_t count)
{
return gdb::handle_eintr (-1, ::write, fd, buf, count);
}
} /* namespace gdb */
#endif /* GDBSUPPORT_EINTR_H */