1 /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) */
6 * Copyright (C) 2020 Francis Deslauriers <francis.deslauriers@efficios.com>
9 #include <linux/jhash.h>
10 #include <linux/string.h>
11 #include <linux/types.h>
14 struct hlist_head
*utils_borrow_hash_table_bucket(
15 struct hlist_head
*hash_table
,
16 unsigned int hash_table_size
,
17 const char *event_name
)
22 name_len
= strlen(event_name
);
24 hash
= jhash(event_name
, name_len
, 0);
25 return &hash_table
[hash
& (hash_table_size
- 1)];
27 #endif /* _LTTNG_UTILS_H */
This page took 0.03451 seconds and 4 git commands to generate.