245 Commits

Author SHA1 Message Date
Bert Belder
9799eec661
tree: implement simpler version without macros 2018-02-12 01:40:07 +01:00
Bert Belder
2af6b901ba util: define static_assert even if clang pretends to be msvc 2017-12-10 05:51:48 +01:00
Bert Belder
d8cf151f30 port: change some internal method names 2017-12-09 23:28:23 +01:00
Bert Belder
b7ab093531 util: fix typo in _SSIZE_T_DEFINED 2017-12-09 23:28:23 +01:00
Bert Belder
206dff3f6a util: don't redefine static_assert if it's already defined 2017-12-09 23:28:19 +01:00
Bert Belder
ac0f54621b util: enable polyfills for gcc 2017-12-08 19:41:40 +01:00
Bert Belder
e10424bf58 win: polyfill ERROR_DEVICE_FEATURE_NOT_SUPPORTED definition for MinGW 2017-12-08 19:41:40 +01:00
Bert Belder
1a2743cf5e win: gcc doesn't grok #pragma warning 2017-12-08 19:41:40 +01:00
Bert Belder
1ef60cb893 win: ensure definitions for Vista or later are included 2017-12-08 19:41:40 +01:00
Bert Belder
a2eeaa5f82 src: move variable declarations to top of block 2017-12-08 19:34:52 +01:00
Bert Belder
2b57c726c8 util: move 'unused_fn' macro to from rb.h to util.h 2017-12-08 19:34:52 +01:00
Bert Belder
1ad34ec3f3 util: rename 'unused' macro to 'unused_var' 2017-12-08 19:34:52 +01:00
Bert Belder
05c384b181 src: rename WEPOLL_INTERNAL_EXTERN to WEPOLL_INTERNAL_VAR 2017-12-08 19:34:52 +01:00
Bert Belder
d84e928508 win: add missing comment after final #endif 2017-12-08 19:34:51 +01:00
Bert Belder
d26c10f852 nt: remove unnecessary '#ifdef _NTDEF_' condition 2017-12-08 19:34:51 +01:00
Bert Belder
7dcc3d5eab error: remove return_handle_error() and helpers 2017-12-07 22:06:11 +01:00
Bert Belder
0f68b70114 api: explicitly check handle validity in epoll_wait() 2017-12-07 22:04:17 +01:00
Bert Belder
093e6f5240 api: explicitly check handle validity in epoll_close() 2017-12-07 22:03:45 +01:00
Bert Belder
157cadf4e4 api: always check handle validity when epoll_ctl_mod() fails 2017-12-07 22:00:11 +01:00
Bert Belder
d448bdf8d8 error: make err_check_handle() an internal api 2017-12-07 21:37:58 +01:00
Bert Belder
097e4fef9a port: epoll_ctl() to report EBADF when both op and sock are invalid 2017-12-07 19:07:01 +01:00
Bert Belder
b5864f3a0f afd: report EPERM+ERROR_DEVICE_FEATURE_NOT_SUPPORTED for non-afd sockets 2017-12-07 18:01:49 +01:00
Bert Belder
42ccc11634 src: suppress warnings caused by Windows SDK headers 2017-12-07 04:42:37 +01:00
Bert Belder
99ce867424 src: polyfill the 'include' keyword for Visual Studio 2013 2017-12-07 04:41:51 +01:00
Bert Belder
f260365c45 port: plug memory leak where deleted socket would never be freed 2017-12-05 20:04:41 +01:00
Bert Belder
05bad1e58b sock: move poll cancellation to _ep_sock_cancel_poll() 2017-12-05 20:04:41 +01:00
Bert Belder
eecfb0e5e3 port: make ep_port_release_poll_group() signature consistent 2017-12-05 20:04:41 +01:00
Bert Belder
50f84cdc6b port: refactor socket update queue 2017-12-05 20:04:35 +01:00
Bert Belder
e5a8d83c8b api: epoll_ctl() to return ENOTSOCK when sock argument is not a socket 2017-12-05 05:02:57 +01:00
Bert Belder
4159a14364 afd: make afd_get_protocol() error reporting more accurate 2017-12-05 04:47:59 +01:00
Bert Belder
283aa5fe76 error: map ERROR_NOT_SUPPORTED to EPERM 2017-12-05 04:46:30 +01:00
Bert Belder
a2f6609d57 api: report EINVAL if epoll_wait() is called with invalid maxevents 2017-12-04 23:21:39 +01:00
Bert Belder
11d7a0395f api: report EINVAL when ephnd is a valid handle but not an epoll instance 2017-12-04 21:04:58 +01:00
Bert Belder
d5b5b605c0 api: epoll_ctl_mod() report EBADF when modifying/deleting invalid socket 2017-12-04 21:03:59 +01:00
Bert Belder
d83871797c error: add return_handle_error(value, handle, [error]) macro
This macro validates that `handle` is valid. If `handle` is valid, it
behaves just like `return_error(value, [error])`. If `handle` is
invalid, it sets errno to EBADF and GetLastError() returns
ERROR_INVALID_HANDLE.
2017-12-04 21:00:44 +01:00
Bert Belder
dc1369886d error: map ERROR_*_SYSTEM_RESOURCES to ENOMEM 2017-12-04 20:06:39 +01:00
Bert Belder
69a297fd22 port: properly propagate CreateIoCompletionPort() error 2017-12-04 20:06:16 +01:00
Bert Belder
981b3caf4e api: epoll_create() and epoll_create1() should return NULL on failure 2017-12-04 20:04:30 +01:00
Bert Belder
49f73f6723 sock: list out known epoll event types 2017-12-03 23:13:01 +01:00
Bert Belder
f7e15f1ba8 reflock-tree: remove unnecessary casts 2017-12-03 19:09:32 +01:00
Bert Belder
b3335d9c19 src: remove unnecessary #ifndef from regular/internal.h 2017-12-03 19:01:03 +01:00
Bert Belder
63d3e3b2bc src: merge ntstatus.h into nt.h 2017-12-03 18:58:43 +01:00
Bert Belder
ddb8bfc9d6 sock: properly detect closed sockets when EPOLLONESHOT is set 2017-12-03 18:15:22 +01:00
Bert Belder
c4756004e0 build: rename 'all-in-one' to 'combined', store in 'dist/' 2017-11-30 23:33:45 +01:00
Bert Belder
f5f606e8b9 src: remove unnecessary wpoll.h includes 2017-11-24 18:07:05 +01:00
Bert Belder
e55a7612b7 sock: disable all events after EPOLLONESHOT event 2017-11-23 03:00:26 +01:00
Bert Belder
2a7c6ded9e sock: set the right epoll events on AFD_POLL_DISCONNECT 2017-11-23 03:00:21 +01:00
Bert Belder
742cc8c7fa sock: merge if branches for AFD_POLL_SEND and AFD_POLL_CONNECT 2017-11-23 03:00:21 +01:00
Bert Belder
0e767efc0b nt: remove STATUS_SEVERITY_* definitions 2017-11-21 17:10:10 +01:00
Bert Belder
a9aec85220 src: have separate internal.h for regular vs all-in-one build 2017-11-21 15:58:19 +01:00