mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-23 11:49:50 +00:00
Remove TODO items
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@497 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
parent
2aff28d85a
commit
f8bee50516
31
TODO
31
TODO
@ -1,34 +1,3 @@
|
|||||||
* There are very likely to be lock-related bugs stemming from when the
|
|
||||||
kevent_copyin() and kevent_copyout() functions stopped holding the
|
|
||||||
kqueue lock. It would be nice to have a lock testing mechanism to
|
|
||||||
check that the correct locks are held.. something like:
|
|
||||||
|
|
||||||
#define MTX_LOCKED 1
|
|
||||||
#define MTX_UNLOCKED 0
|
|
||||||
#if NDEBUG
|
|
||||||
#define LOCK_MONITOR(x) int x
|
|
||||||
#define lock_assert(x,y) assert((x) == (y))
|
|
||||||
#define lock_acquire(x,y) do { pthread_mutex_lock((x)); y = MTX_LOCKED } while (0)
|
|
||||||
#define lock_release(x,y) do { pthread_mutex_unlock((x)); y = MTX_UNLOCKED } while (0)
|
|
||||||
#else
|
|
||||||
#define LOCK_MONITOR(x) /**/
|
|
||||||
#define lock_assert(x,y) do {} while (0)
|
|
||||||
#define lock_acquire(x,y) do { pthread_mutex_lock((x)); } while (0)
|
|
||||||
#define lock_release(x,y) do { pthread_mutex_unlock((x)); } while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct foo {
|
|
||||||
LOCK_MONITOR(foo_lockstat);
|
|
||||||
}
|
|
||||||
...
|
|
||||||
|
|
||||||
lock_assert(&kn->kn_lockmon, MTX_LOCKED);
|
|
||||||
lock_assert(&kn->kn_lockmon, MTX_UNLOCKED);
|
|
||||||
|
|
||||||
* Add a counter that increments on each each kevent() call. When printing
|
|
||||||
debug information within kevent(), display the value of the counter.
|
|
||||||
This will be helpful when debugging a multithreaded program that may have
|
|
||||||
multiple kevent() calls executing in parallel.
|
|
||||||
|
|
||||||
* Add a dbg_printf() statement within kevent_wait() to report the value
|
* Add a dbg_printf() statement within kevent_wait() to report the value
|
||||||
of the timeout.
|
of the timeout.
|
||||||
|
Loading…
Reference in New Issue
Block a user