228 Commits

Author SHA1 Message Date
leitner
f045b33647 document the new functions 2024-04-08 12:34:08 +00:00
leitner
af8a2d7215 typo 2024-04-05 17:55:16 +00:00
leitner
6f8e168ae3 proper return value handling 2024-04-05 17:37:38 +00:00
leitner
cf112a57fa timespec is absolute, not relative! 2024-04-05 16:26:43 +00:00
leitner
4200c23f6e try to accomodate apple 2024-04-05 14:49:51 +00:00
leitner
e19831955e sigh 2024-04-03 21:52:18 +00:00
leitner
cf6441b0c4 another bsd warning 2024-04-03 21:49:05 +00:00
leitner
8d027b2a2b silence bsd warning 2024-04-03 21:47:07 +00:00
leitner
e394b3cb06 silence warnings under bsd 2024-04-03 21:44:28 +00:00
leitner
80328bccf9 return early 2023-07-20 09:19:40 +00:00
leitner
444c36f3e8 silence clang static analyzer 2023-05-02 13:10:41 +00:00
leitner
4422ec3770 gcc 13 -fanalyze run with fixes / comments about false positives 2023-05-02 12:51:56 +00:00
leitner
ee44f1a430 #define _POSIX_C_SOURCE 200809L 2023-03-22 12:49:36 +00:00
leitner
00bc4e4a5d add iob_write2 which takes an additional sendfile callback 2022-11-07 14:39:37 +00:00
leitner
fe1cb50ec1 remove unused local var 2022-04-25 14:21:38 +00:00
leitner
1564beb8a3 change io_eagain to io_eagain_wite 2022-04-25 14:20:47 +00:00
leitner
fc223dc725 recent kernel return POLLERR and then calling read returns EGAIN which
leads to busy loop. Try to work around.
2022-03-11 12:07:53 +00:00
leitner
0556994916 try to prevent ARM from reordering writes in hardware 2021-10-26 09:54:22 +00:00
leitner
853242b078 next attempt (I need a bsd shell) 2021-04-25 11:09:25 +00:00
leitner
efb1a8a2ae kqueue path assumed EVFILT_READ and EVFILT_WRITE are bits that can be used with | and ~ and &
they aren't
2021-04-25 11:03:53 +00:00
leitner
2788b18f32 provide prototype 2021-04-24 12:48:50 +00:00
leitner
cef53a5907 try too fix erdgeist's bug 2021-04-24 12:47:18 +00:00
leitner
1a793700a8 try to fix erdgeist's bug 2021-04-24 12:46:53 +00:00
leitner
45f99bbd0a in io_eagain, make sure the kernel knows we wanted to write to the
descriptor in case we optimized the syscall away previously
in iob_send leave loop if we got a partial write
2021-04-24 11:39:18 +00:00
leitner
f4cd377378 fix out of bounds memory access 2021-04-23 08:02:09 +00:00
leitner
86e596b870 limit iovec size for sendmsg code path to 50 2021-04-22 12:53:53 +00:00
leitner
1fb5505cc2 add missing includes 2021-04-22 11:12:52 +00:00
leitner
b5f21a3900 add support for saving syscalls with accept4 2021-03-12 16:23:32 +00:00
leitner
c4b0dd6b81 move cleanup after check that all events are handled 2021-03-12 10:43:46 +00:00
leitner
15f004df55 prevent infinite loop in cleanup code for
io_close-with-outstanding-events-queued race prevention
2021-03-11 14:13:51 +00:00
leitner
5f9f1a2a62 properly initialize deferred list in io_fd (did not help though) 2021-03-09 13:54:59 +00:00
leitner
ad37bd83de add snarky comment 2021-02-18 23:21:57 +00:00
leitner
d4ac8fe906 might actually work now 2021-02-17 13:48:39 +00:00
leitner
75fe9a620e attempt to prevent future endless loops in io_wait half-closed fd
cleanup
2021-02-16 15:50:38 +00:00
leitner
ddfdd4d077 add compiler.h to abstract gcc attributes 2020-11-08 00:29:35 +00:00
leitner
69c9d1454d port the epoll optimizations to kqueue, hopefully repairing it in the process 2020-05-15 11:42:53 +00:00
leitner
9d51f000ef silence another compiler warning 2020-05-14 14:48:40 +00:00
leitner
bbaf63c7fd remove compiler warnings in ent
try to fix io_waituntil2 on freebsd
2020-05-14 14:46:31 +00:00
leitner
8b0450cd29 some old glibc may define MSG_ZEROCOPY but not SO_ZEROCOPY :-( 2020-04-05 20:19:25 +00:00
leitner
278a675a69 bsd fix 2019-02-21 12:43:06 +00:00
leitner
97368fbfa6 BSD build fix (hopefully)
move more #include to <libowfat/...>
2019-02-21 12:24:05 +00:00
leitner
3873bab74b add stralloc_APPEND
use atomic updates for iom->working
2018-04-11 14:12:50 +00:00
leitner
ce595ae0cc add experimental iom API for multithreaded I/O multiplexing (in io.h) 2018-03-27 02:23:00 +00:00
leitner
94feba3667 use write in buffer_put for a slight perf improvement 2018-03-12 13:04:30 +00:00
leitner
e4a2f4d068 compile if MSG_ZEROCOPY is not defined by libc 2017-11-24 17:21:10 +00:00
leitner
f8c4132df0 add MSG_ZEROCOPY support (only used for buffers >8k) 2017-11-15 14:09:26 +00:00
leitner
760598ec2f #include <foo.h> -> #include <libowfat/foo.h> 2017-05-13 22:51:26 +00:00
leitner
c29096b2e0 some more eagain handling in tryread and trywrite
cosmetic change
2017-02-04 17:23:33 +00:00
leitner
d862c9e482 "fmt.h" instead of <fmt.h> 2016-10-15 12:29:00 +00:00
leitner
b4c4eb607e remove OpenBSD #warning (obsd maintainer says no longer needed) 2016-10-11 11:45:46 +00:00