da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowski * This file and its contents are supplied under the terms of the
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowski * Common Development and Distribution License ("CDDL"), version 1.0.
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowski * You may only use this file in accordance with the terms of version
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowski * 1.0 of the CDDL.
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowski * A full copy of the text of the CDDL should have accompanied this
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowski * source. A copy of the CDDL is also available via the Internet at
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowski * Copyright 2014 Joyent, Inc. All rights reserved.
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskitypedef uint64_t (*refhash_hash_f)(const void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskitypedef int (*refhash_cmp_f)(const void *, const void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskitypedef int (*refhash_eval_f)(const void *, void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskiextern refhash_t *refhash_create(uint_t, refhash_hash_f, refhash_cmp_f,
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowski refhash_dtor_f, size_t, size_t, size_t, int);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskiextern void refhash_insert(refhash_t *, void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskiextern void refhash_remove(refhash_t *, void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskiextern void *refhash_lookup(refhash_t *, const void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskiextern void *refhash_linear_search(refhash_t *, refhash_eval_f, void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskiextern void refhash_hold(refhash_t *, void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskiextern void refhash_rele(refhash_t *, void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskiextern void *refhash_next(refhash_t *, void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowskiextern boolean_t refhash_obj_valid(refhash_t *hp, const void *);
da5ab83fc888325fc812733d8a54bc5eab65c65cKeith M Wesolowski#endif /* _SYS_SCSI_ADAPTERS_MPTHASH_H */