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