int _aio_suspend(const struct aiocb * const iocbs[], int niocb, const struct timespec *timeout) { int ret; _thread_enter_cancellation_point(); ret = __sys_aio_suspend(iocbs, niocb, timeout); _thread_leave_cancellation_point(); return ret; }
int __aio_suspend(const struct aiocb * const iocbs[], int niocb, const struct timespec *timeout) { struct pthread *curthread = _get_curthread(); int ret; _thr_cancel_enter(curthread); ret = __sys_aio_suspend(iocbs, niocb, timeout); _thr_cancel_leave(curthread, 1); return (ret); }