diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-05-14 16:24:21 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-11-06 15:50:28 +0100 |
commit | c1d5c163a89f53a3c6e4e67f5f4119af96f7a470 (patch) | |
tree | 89e0fd3e1701c102e5b8c666b2e66b2a0cec6534 /utils/mount.c | |
parent | 6c948532d2799bcc172053cac504c4aa5f016bba (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 'utils/mount.c')
0 files changed, 0 insertions, 0 deletions