mheily fcc95e5a18 Re-enable the knote mutex and reference counter.
Improve the knote reference counting mechanism.

New function knote_delete().

Rename 'flags' to 'kn_flags' in struct knote.

Rename 'mtx' to 'kn_mtx' in struct knote.

Rename 'kntree_ent' to 'kn_entries' in struct knote.

Add a knote flag named 'KNFL_KNOTE_DELETED' to indicate that a knote has been deleted. With reference counting, this becomes necessary.



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@491 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-27 03:30:31 +00:00

26 lines
1013 B
Plaintext

* When passing a knote pointer to the kernel, the reference count of
the knote structure should be incremented. Conversely, when the pointer
has been returned from the kernel and the event unregistered from the
kernel, the reference count should be decremented.
* Some functions should crash instead of silently printing a debug
message.. for example, knote_release().
* knote_get_by_ident uses 'short' for the ident, but the actual datatype
is 'uintptr_t'.
* need to uninitialize library after fork() using pthread_atfork()
* Solaris unit test failure.
LD_LIBRARY_PATH="..:/usr/sfw/lib/64" ./kqtest
1: test_peer_close_detection()
2: test_kqueue()
3: test_kevent_socket_add()
4: test_kevent_socket_del()
5: test_kevent_socket_add_without_ev_add()
6: test_kevent_socket_get()
[read.c:84]: Unexpected event:_test_no_kevents(): [ident=7, filter=-1, flags = 1 (EV_ADD), fflags = 0, data=0, udata=fffffd7fff08c6b4]: Error 0