Commit Graph

509 Commits

Author SHA1 Message Date
mheily
59c2a31d48 Minor fixes for Android
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@593 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-26 02:56:10 +00:00
mheily
1d174668f1 Convert the build script to Makeconf
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@592 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-26 02:42:53 +00:00
mheily
1e3ee7ad18 Use pthread_once() instead of marking libkqueue_init() as a constructor.
This gives the correct behavior for both static and dynamic libraries.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@591 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-26 02:32:45 +00:00
mheily
e41cc259a0 * Ensure that calling close() on a file descriptor will remove any
kevents that reference the descriptor. [merged from ^/branches/stable@551]



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@590 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-25 22:31:57 +00:00
mheily
c769f3fa04 Merge c542 from the stable branch. Fixes a concurrency problem in posix_kevent_wait()
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@589 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-25 21:52:11 +00:00
mheily
82c6b5c5bc Avoid generating extra code if NDEBUG is defined
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@588 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-25 21:35:37 +00:00
mheily
e83001b8fd * Remove the SERIALIZE_KEVENT macro, and always protect kevent_copyin()
and kevent_copyout() with a mutex.
 
 * Remove fine-grained locking at the knote level.



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@585 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-25 20:46:02 +00:00
mheily
655a045482 Warn people not to use the trunk
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@562 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-10-26 01:42:30 +00:00
mheily
0e25c817d0 Document the need to use deferred cancellation with specific cancellation points.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@540 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-04-20 18:18:30 +00:00
mheily
25a23721b5 Document the need to fix the "stub" functions
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@537 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-04-19 19:33:00 +00:00
marius
d38e2e3479 * Merged a bugfix from xdispatch within windows_kevent_wait causing wrong timeouts
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@536 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-02-23 07:34:53 +00:00
mheily
f6a37c0a51 Add support for concurrent tests.
Test providing an invalid kqueue descriptor to kevent()

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@532 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-02-10 01:25:35 +00:00
marius
6df0650bc4 Fixed a compiler warning on 32bit linux introduced while streamlining the variables
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@526 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-06-21 17:50:07 +00:00
marius
9994502c20 Fixed a compiler warning on gcc introduced in r524
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@525 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-06-15 19:46:39 +00:00
marius
f786d2e798 * Streamlined some variables to be of the same type regardless of the architecture used
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@524 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-06-13 19:27:44 +00:00
mheily
8cbdb46b43 Eliminate use of global variable "cur_test_id"
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@523 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-30 14:59:08 +00:00
marius
624c4e6358 * Repair inclusion of stdint on non-windows platforms
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@522 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-27 18:00:58 +00:00
marius
3ff56c255f + stdint.h compatibility when using VS 2008
* Fixed usage of knote_release macros

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@521 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-26 19:17:33 +00:00
mheily
a0d54bda95 Build a debug-enabled static library.
Build two versions of kqtest with and without debugging enabled.
Use static linking for kqtest and kqtest_debug.
Add additional Makefile targets for profiling with Valgrind
Enable gprof profiling in the debug targets.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@520 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-26 03:45:28 +00:00
mheily
cd858d02fd Eliminate the use of global state variables in kqtest to allow the tests
to be run in parallel.

Add two kqtest options: one for iterations, and one for concurrency.

Use -rpath when building kqtest instead of using LD_LIBRARY_PATH



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@519 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-25 02:10:36 +00:00
mheily
68e94a12eb Fix compilation issues on Solaris 10 with GCC 4.5
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@518 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 03:29:14 +00:00
mheily
5d11e7e930 - Build the static library with MAKE_STATIC to expose libkqueue_init().
- Build a statically-linked version of kqtest during 'make check'.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@517 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 03:01:24 +00:00
mheily
0c2f0771b5 - Build two versions of the library: one for debugging, and one for release.
- Link kqtest against libkqueue_debug.so
- Build 


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@516 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 02:44:16 +00:00
mheily
af270012fc Another tracing_mutex_assert() fix
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@515 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 01:20:24 +00:00
mheily
140343f197 Fix tracing_mutex_assert() by tracking the thread ID of the lock owner and
behave properly when the mutex is held by another thread.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@514 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 00:57:44 +00:00
mheily
54cafd9c68 Add -Wextra to CFLAGS and fix all related warnings on Linux.
This will also need to be done on Solaris.


git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@513 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-22 00:28:35 +00:00
jocke
8f90bd7127 Updated Xcode project
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@512 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-20 05:47:20 +00:00
jocke
1f04856a80 Analogous knote locking logic compared to Linux implementation, now we don't fail assertions any more.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@511 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-19 14:18:22 +00:00
jocke
68d14fabb0 Fix proper semantics for read events on Solaris, fixing kqtest failure. According to the original kqueue paper, such events should not be signaled (which is also tested by kqtest).
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@510 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-19 13:38:37 +00:00
jocke
c1e6d52fcf Match signed type of 'filt' coming in (alternatively change line 175 and remove otherwise useless comparison < 0).
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@509 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-19 07:36:55 +00:00
jocke
e6543c4c39 Avoid possible overrun of sigtbl[] if signal would be == SIGNAL_MAX.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@508 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-19 07:35:47 +00:00
marius
90aa7efe71 * Fixed a compiler warning when using clang on Ubuntu 11.04
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@507 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-14 11:49:21 +00:00
mheily
4a2789f45e Make knote_lock() and knote_unlock() macros again, so the assert() will provide useful information
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@506 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-10 02:51:59 +00:00
mheily
ea83addadb - Fix a use-after-free bug with EV_ONESHOT that was introduced in r494.
- Test for incorrect usage of knote_lock() and knote_unlock()

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@505 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-10 02:34:24 +00:00
mheily
4c4a1b9b03 Fix the 'make debug' target under Windows.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@504 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-10 01:59:38 +00:00
mheily
c9f509e34f - Fix compilation issues on MinGW.
- Improve error handling in test/read.c

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@503 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-10 01:30:02 +00:00
marius
6fb331d9b7 Fixed a bug in the static build option in CMakeLists.txt
Made some symbols unique w.r.t. libpthread_workqueue to prevent duplicate symbols when linking as static libs

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@502 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-09 19:05:49 +00:00
marius
e04070c63b Removed unused/unneeded evt_loop implementation
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@501 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-09 19:04:31 +00:00
marius
699bb19e76 Fixed some mistakes within the CMakeLists.txt
Made latest revision compatible to windows again

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@500 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-04 17:39:25 +00:00
mheily
bc9c93a130 Remove www/ directory, since the website is now managed by Trac
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@499 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-05-01 20:25:07 +00:00
mheily
87371cda36 Test commit using new hook
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@498 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-30 18:21:51 +00:00
mheily
f8bee50516 Remove TODO items
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@497 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-30 17:59:30 +00:00
mheily
2aff28d85a Various fixes for Windows.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@496 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-30 04:19:08 +00:00
mheily
0f356c8932 Improvements to EVFILT_READ on Windows.
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@495 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-29 23:47:51 +00:00
mheily
5933ba024c Use tracing_mutex_t instead of pthread_mutex_t for knote and kqueue locks.
Fix a locking bug in Linux kevent_copyout().

Fix and enable the knote_lock() and knote_unlock() macros.

Implement tracing_mutex_destroy().



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@494 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-29 03:59:59 +00:00
mheily
e138f4a4c9 Add tracing mutexes to debug.h.
/*
 * Tracing mutexes are a thin wrapper around the pthread_mutex_t 
 * datatype that tracks and reports when a mutex is locked or unlocked.
 * It also allows you to assert that a mutex has (or has not) been locked
 * by calling tracing_mutex_assert().
 */



git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@493 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-29 03:28:07 +00:00
marius
c4573236fa Some changes to the 'new' ref-count mechanism of knote - please elaborate
Fixed a race condition within windows timers using the ref count mechanism

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@492 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-28 12:01:04 +00:00
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
marius
731410fef0 EVFILT_USER implementation on windows
Change VS Solution structure to be more well-arranged

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@490 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-26 20:12:28 +00:00
marius
3ea5de4571 Updated VS Solution and CMakeLists.txt to reflect latest changes
Added annotation to timer bug on windows
Fixed a wrong visibility in the static build of libkqueue

git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@489 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2011-04-26 19:26:38 +00:00