ocf/src/promotion/nhit/nhit_hash.h
Jan Musial ee3fdb0506 Change nhit_hash names to avoid collision with kernel
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-08-29 13:24:54 +02:00

25 lines
630 B
C

/*
* Copyright(c) 2019 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
#ifndef NHIT_HASH_H_
#define NHIT_HASH_H_
#include "ocf/ocf.h"
typedef struct nhit_hash *nhit_hash_t;
ocf_error_t nhit_hash_init(uint64_t hash_size, nhit_hash_t *ctx);
void nhit_hash_deinit(nhit_hash_t ctx);
void nhit_hash_insert(nhit_hash_t ctx, ocf_core_id_t core_id, uint64_t core_lba);
bool nhit_hash_query(nhit_hash_t ctx, ocf_core_id_t core_id, uint64_t core_lba,
int32_t *counter);
void nhit_hash_set_occurences(nhit_hash_t ctx, ocf_core_id_t core_id,
uint64_t core_lba, int32_t occurences);
#endif /* NHIT_HASH_H_ */