mirror of /home/gitosis/repositories/libowfat.git
Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat
https://www.fefe.de/libowfat/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
401 B
19 lines
401 B
#include <unistd.h> |
|
#include <sys/time.h> |
|
#include <poll.h> |
|
#include <errno.h> |
|
#include "io_internal.h" |
|
|
|
int64 io_trywritetimeout(int64 d,const char* buf,int64 len) { |
|
int64 r=io_trywrite(d,buf,len); |
|
if (r==-1) { |
|
tai6464 x; |
|
io_entry* e=array_get(&io_fds,sizeof(io_entry),d); |
|
taia_now(&x); |
|
if (!taia_less(&x,&e->timeout)) { |
|
errno=ETIMEDOUT; |
|
r=-2; |
|
} |
|
} |
|
return r; |
|
}
|
|
|