1 /* asyn_synch() - step back to synch Author: Kees J. Bot
6 int asyn_synch(asynchio_t
*asyn
, int fd
)
7 /* No more asynchronous operations on this file descriptor. */
12 if ((unsigned) fd
>= FD_SETSIZE
) { errno
= EBADF
; return -1; }
13 afd
= &asyn
->asyn_afd
[fd
];
15 for (op
= 0; op
< SEL_NR
; op
++) {
16 if (afd
->afd_state
[op
] != IDLE
) {
22 /* Make sure the file flags are as they once were. */
23 if (afd
->afd_seen
&& fcntl(fd
, F_SETFL
, afd
->afd_flags
) < 0) return -1;