mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-10-07 01:03:27 +00:00
More Solaris improvements
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@428 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
parent
ee14f0ff35
commit
3c17c8a2b0
@ -106,8 +106,10 @@ evfilt_socket_knote_modify(struct filter *filt, struct knote *kn,
|
||||
int
|
||||
evfilt_socket_knote_delete(struct filter *filt, struct knote *kn)
|
||||
{
|
||||
/* FIXME: should be handled at kevent_copyin()
|
||||
if (kn->kev.flags & EV_DISABLE)
|
||||
return (0);
|
||||
*/
|
||||
|
||||
if (port_dissociate(filter_epfd(filt), PORT_SOURCE_FD, kn->kev.ident) < 0) {
|
||||
dbg_perror("port_dissociate(2)");
|
||||
@ -120,12 +122,14 @@ evfilt_socket_knote_delete(struct filter *filt, struct knote *kn)
|
||||
int
|
||||
evfilt_socket_knote_enable(struct filter *filt, struct knote *kn)
|
||||
{
|
||||
dbg_printf("enabling knote %p", kn);
|
||||
return evfilt_socket_knote_create(filt, kn);
|
||||
}
|
||||
|
||||
int
|
||||
evfilt_socket_knote_disable(struct filter *filt, struct knote *kn)
|
||||
{
|
||||
dbg_printf("disabling knote %p", kn);
|
||||
return evfilt_socket_knote_delete(filt, kn);
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,8 @@ kevent_add(int kqfd, struct kevent *kev,
|
||||
} while (0);
|
||||
|
||||
/* Checks if any events are pending, which is an error. */
|
||||
void test_no_kevents(int);
|
||||
#define test_no_kevents(a) _test_no_kevents(a, __FILE__, __LINE__)
|
||||
void _test_no_kevents(int, const char *, int);
|
||||
|
||||
/* From test.c */
|
||||
void test_begin(const char *);
|
||||
|
@ -20,7 +20,7 @@ extern int kqfd;
|
||||
|
||||
/* Checks if any events are pending, which is an error. */
|
||||
void
|
||||
test_no_kevents(int kqfd)
|
||||
_test_no_kevents(int kqfd, const char *file, int line)
|
||||
{
|
||||
int nfds;
|
||||
struct timespec timeo;
|
||||
@ -31,7 +31,7 @@ test_no_kevents(int kqfd)
|
||||
if (nfds < 0)
|
||||
die("kevent(2)");
|
||||
if (nfds > 0) {
|
||||
puts("\nUnexpected event:");
|
||||
printf("\n[%s:%d]: Unexpected event:", file, line);
|
||||
die(kevent_to_str(&kev));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user