summaryrefslogtreecommitdiff
path: root/libdiskfs/demuxer.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-05-14 16:24:21 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-11-06 15:50:28 +0100
commitc1d5c163a89f53a3c6e4e67f5f4119af96f7a470 (patch)
tree89e0fd3e1701c102e5b8c666b2e66b2a0cec6534 /libdiskfs/demuxer.c
parent6c948532d2799bcc172053cac504c4aa5f016bba (diff)
libihash: optimize lookup-or-insert operations
If libihash is used to implement a cache, a insertion is always preceeded by a lookup. hurd_ihash_add has to do the lookup again. Provide a new pair of functions, hurd_ihash_locp_add and hurd_ihash_locp_find, that can be used in combination to avoid the second lookup. * libihash/ihash.c (hurd_ihash_locp_add): New function using a location pointer... (hurd_ihash_locp_find): ... that has been returned by this function. * libihash/ihash.h (hurd_ihash_locp_add): New declaration. (hurd_ihash_locp_find): Likewise. (hurd_ihash_locp_value): New function.
Diffstat (limited to 'libdiskfs/demuxer.c')
0 files changed, 0 insertions, 0 deletions