Logo
Explore Help
Sign In
mirror/libbpf
1
0
Fork 0
You've already forked libbpf
mirror of https://github.com/netdata/libbpf.git synced 2026-03-24 02:09:06 +08:00
Code Issues Packages Projects Releases Wiki Activity
Files
66684189f0f5d182b1c3ab362fc0f919970c7079
libbpf/include/linux/kernel.h

13 lines
376 B
C
Raw Normal View History

initial commit This initial commit added the following files from bpf-next repository: src: <files from linux:tools/lib/bpf> bpf.c bpf.h btf.c btf.h libbpf.c libbpf.h libbpf_errno.c netlink.c nlattr.c nlattr.h str_error.c str_error.h include: <files from linux:tools/include/uapi/linux> uapi/linux/{bpf.h, btf.h} <files from linux:tools/include/tools> tools/libc_compat.h The following files are also added: include/linux/{err.h, kernel.h, list.h, overflow.h, types.h} These files are customized headers to satisfy compilation. Their original counterparts are at linux:tools/include/linux directory. Signed-off-by: Yonghong Song <yhs@fb.com>
2018-10-09 17:50:12 -07:00
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#ifndef __LINUX_KERNEL_H
#define __LINUX_KERNEL_H
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#define container_of(ptr, type, member) ({ \
const typeof(((type *)0)->member) * __mptr = (ptr); \
(type *)((char *)__mptr - offsetof(type, member)); })
#endif
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 20ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API 粤ICP备2023071974号-5