X-Git-Url: http://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fopr%2Fopr.h;h=1130b335a82d3773acdcebcc6265e4324497858e;hp=784ccb54f9a5a3a679648ee3469fb98409b2557f;hb=48fbb45967381f10df092a1ec18b5fb820387e05;hpb=f895a9b51671ffdc920fd9b4284337c5b737a0ef diff --git a/src/opr/opr.h b/src/opr/opr.h index 784ccb5..1130b33 100644 --- a/src/opr/opr.h +++ b/src/opr/opr.h @@ -86,4 +86,22 @@ opr_threadname_set(const char *threadname) } #endif +/* cache.c */ + +struct opr_cache_opts { + afs_uint32 max_entries; + afs_uint32 n_buckets; +}; +struct opr_cache; + +extern int opr_cache_init(struct opr_cache_opts *opts, + struct opr_cache **a_cache) AFS_NONNULL(); +extern void opr_cache_free(struct opr_cache **a_cache) AFS_NONNULL(); + +extern int opr_cache_get(struct opr_cache *cache, void *key_buf, + size_t key_len, void *val_buf, size_t *a_val_len) + AFS_NONNULL((4,5)); +extern void opr_cache_put(struct opr_cache *cache, void *key_buf, + size_t key_len, void *val_buf, size_t val_len); + #endif