mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
LibC: Mark a bunch of functions as cancellation points
This commit is contained in:
parent
899fd74f8e
commit
c85f307e62
15 changed files with 78 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <bits/pthread_cancel.h>
|
||||
#include <errno.h>
|
||||
#include <poll.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -14,6 +15,8 @@ extern "C" {
|
|||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html
|
||||
int poll(pollfd* fds, nfds_t nfds, int timeout_ms)
|
||||
{
|
||||
__pthread_maybe_cancel();
|
||||
|
||||
timespec timeout;
|
||||
timespec* timeout_ts = &timeout;
|
||||
if (timeout_ms < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue