Contributors: 13
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Frédéric Weisbecker |
105 |
30.26% |
1 |
4.35% |
Adrian Hunter |
91 |
26.22% |
1 |
4.35% |
Arnaldo Carvalho de Melo |
66 |
19.02% |
7 |
30.43% |
Karolina Drobnik |
37 |
10.66% |
1 |
4.35% |
Irina Tirdea |
13 |
3.75% |
2 |
8.70% |
Alexander (Sasha) Levin |
10 |
2.88% |
2 |
8.70% |
Matthew Wilcox |
8 |
2.31% |
2 |
8.70% |
Wei Yang |
6 |
1.73% |
2 |
8.70% |
Shuah Khan |
5 |
1.44% |
1 |
4.35% |
Jiri Olsa |
2 |
0.58% |
1 |
4.35% |
Wang Nan |
2 |
0.58% |
1 |
4.35% |
Paul E. McKenney |
1 |
0.29% |
1 |
4.35% |
Greg Kroah-Hartman |
1 |
0.29% |
1 |
4.35% |
Total |
347 |
|
23 |
|
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __TOOLS_LINUX_KERNEL_H
#define __TOOLS_LINUX_KERNEL_H
#include <stdarg.h>
#include <stddef.h>
#include <assert.h>
#include <linux/build_bug.h>
#include <linux/compiler.h>
#include <linux/math.h>
#include <linux/panic.h>
#include <endian.h>
#include <byteswap.h>
#include <linux/container_of.h>
#ifndef UINT_MAX
#define UINT_MAX (~0U)
#endif
#define _RET_IP_ ((unsigned long)__builtin_return_address(0))
#define PERF_ALIGN(x, a) __PERF_ALIGN_MASK(x, (typeof(x))(a)-1)
#define __PERF_ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
#ifndef max
#define max(x, y) ({ \
typeof(x) _max1 = (x); \
typeof(y) _max2 = (y); \
(void) (&_max1 == &_max2); \
_max1 > _max2 ? _max1 : _max2; })
#endif
#ifndef min
#define min(x, y) ({ \
typeof(x) _min1 = (x); \
typeof(y) _min2 = (y); \
(void) (&_min1 == &_min2); \
_min1 < _min2 ? _min1 : _min2; })
#endif
#define max_t(type, x, y) max((type)x, (type)y)
#define min_t(type, x, y) min((type)x, (type)y)
#define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
#ifndef BUG_ON
#ifdef NDEBUG
#define BUG_ON(cond) do { if (cond) {} } while (0)
#else
#define BUG_ON(cond) assert(!(cond))
#endif
#endif
#define BUG() BUG_ON(1)
#if __BYTE_ORDER == __BIG_ENDIAN
#define cpu_to_le16 bswap_16
#define cpu_to_le32 bswap_32
#define cpu_to_le64 bswap_64
#define le16_to_cpu bswap_16
#define le32_to_cpu bswap_32
#define le64_to_cpu bswap_64
#define cpu_to_be16
#define cpu_to_be32
#define cpu_to_be64
#define be16_to_cpu
#define be32_to_cpu
#define be64_to_cpu
#else
#define cpu_to_le16
#define cpu_to_le32
#define cpu_to_le64
#define le16_to_cpu
#define le32_to_cpu
#define le64_to_cpu
#define cpu_to_be16 bswap_16
#define cpu_to_be32 bswap_32
#define cpu_to_be64 bswap_64
#define be16_to_cpu bswap_16
#define be32_to_cpu bswap_32
#define be64_to_cpu bswap_64
#endif
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
int scnprintf(char * buf, size_t size, const char * fmt, ...);
int scnprintf_pad(char * buf, size_t size, const char * fmt, ...);
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
#endif
#define current_gfp_context(k) 0
#define synchronize_rcu()
#endif