mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
48fbb45967
Add a simple general-purpose in-memory cache implementation, called opr_cache. Keys and values are simple flat opaque buffers (no complex nested structures allowed), hashing is done with jhash, and cache eviction is mostly random with some LRU bias. Partly based off a different implementation by mbarbosa@sinenomine.net. Change-Id: I16b5988947ff603dfe31613cd7be3908a69264e5 Reviewed-on: https://gerrit.openafs.org/13884 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
45 lines
1.1 KiB
Makefile
45 lines
1.1 KiB
Makefile
srcdir=@srcdir@
|
|
abs_top_builddir=@abs_top_builddir@
|
|
include @TOP_OBJDIR@/src/config/Makefile.config
|
|
include @TOP_OBJDIR@/src/config/Makefile.pthread
|
|
|
|
MODULE_CFLAGS = -I$(TOP_OBJDIR)
|
|
|
|
LIBS=../tap/libtap.a $(abs_top_builddir)/src/opr/liboafs_opr.la
|
|
|
|
tests = cache-t dict-t fmt-t jhash-t queues-t rbtree-t softsig-helper time-t \
|
|
uuid-t
|
|
|
|
all check test tests: $(tests)
|
|
|
|
cache-t: cache-t.o
|
|
$(LT_LDRULE_static) cache-t.o $(LIBS) $(XLIBS)
|
|
|
|
dict-t: dict-t.o
|
|
$(LT_LDRULE_static) dict-t.o $(LIBS) $(XLIBS)
|
|
|
|
fmt-t: fmt-t.o
|
|
$(LT_LDRULE_static) fmt-t.o $(LIBS) $(XLIBS)
|
|
|
|
queues-t: queues-t.o
|
|
$(LT_LDRULE_static) queues-t.o ../tap/libtap.a $(XLIBS)
|
|
|
|
rbtree-t: rbtree-t.o $(LIBS)
|
|
$(LT_LDRULE_static) rbtree-t.o ../tap/libtap.a $(LIBS) $(XLIBS)
|
|
|
|
jhash-t: jhash-t.o
|
|
$(LT_LDRULE_static) jhash-t.o ../tap/libtap.a $(XLIBS)
|
|
|
|
time-t: time-t.o
|
|
$(LT_LDRULE_static) time-t.o ../tap/libtap.a $(XLIBS)
|
|
|
|
uuid-t: uuid-t.o
|
|
$(LT_LDRULE_static) uuid-t.o ../tap/libtap.a $(LIBS) $(XLIBS)
|
|
|
|
softsig-helper: softsig-helper.o $(LIBS)
|
|
$(LT_LDRULE_static) softsig-helper.o $(LIBS) $(XLIBS)
|
|
|
|
clean distclean:
|
|
$(LT_CLEAN)
|
|
$(RM) -f $(tests) *.o core
|