rx: Use a red black tree for the event stack
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 23 Oct 2011 20:21:39 +0000 (21:21 +0100)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 29 Nov 2011 20:29:41 +0000 (12:29 -0800)
commit043c31bf8d81f5aba968f69c613b639e1d0e3ee7
treeec28bb7788120a3af00f6b54a67ca12a2ca6d648
parenta9682775fcb047e4bcd3994d582ada430d28e264
rx: Use a red black tree for the event stack

Instead of the current event stack, which uses a sorted linked
list, use a red/black tree to maintain the timer stack. This
dramatically improves event insertion times, at the expense of
some additional implementation complexity.

This change also adds reference counting to the rxevent
structure. We've always had a race between an event being
fired, and that event being simultaneously cancelled by
the user thread. Reference counting avoids that race resulting
in the structure appearing twice in the free list.

Change-Id: Icbef6e04e01f3eef5b888bc3cb77b7a3d1be26ae
Reviewed-on: http://gerrit.openafs.org/5841
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
23 files changed:
Makefile.in
configure.ac
src/afsmonitor/Makefile.in
src/aklog/Makefile.in
src/libadmin/samples/Makefile.in
src/libadmin/test/Makefile.in
src/libuafs/Makefile.common.in
src/rx/rx.c
src/rx/rx.h
src/rx/rx_clock.h
src/rx/rx_event.c
src/rx/rx_event.h
src/rx/rx_packet.h
src/rxdebug/Makefile.in
src/shlibafsrpc/Makefile.in
src/tbutc/Makefile.in
src/xstat/Makefile.in
tests/Makefile.in
tests/TESTS
tests/auth/Makefile.in
tests/rx/Makefile.in [new file with mode: 0644]
tests/rx/event-t.c [new file with mode: 0644]
tests/volser/Makefile.in