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.
 
 
 
 

17 lines
325 B

  1. #include <errno.h>
  2. #include "io_internal.h"
  3. int64 io_trywritetimeout(int64 d,const char* buf,int64 len) {
  4. int64 r=io_trywrite(d,buf,len);
  5. if (r==-1) {
  6. tai6464 x;
  7. io_entry* e=iarray_get(&io_fds,d);
  8. taia_now(&x);
  9. if (!taia_less(&x,&e->timeout)) {
  10. errno=ETIMEDOUT;
  11. r=-2;
  12. }
  13. }
  14. return r;
  15. }