File: align.h

package info (click to toggle)
linux 6.17.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,734,788 kB
  • sloc: ansic: 26,682,992; asm: 271,227; sh: 147,381; python: 75,980; makefile: 57,306; perl: 36,943; xml: 19,562; cpp: 5,899; yacc: 4,909; lex: 2,943; awk: 1,556; sed: 29; ruby: 25
file content (12 lines) | stat: -rw-r--r-- 339 bytes parent folder | download | duplicates (26)
1
2
3
4
5
6
7
8
9
10
11
12
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef _TOOLS_LINUX_ALIGN_H
#define _TOOLS_LINUX_ALIGN_H

#include <uapi/linux/const.h>

#define ALIGN(x, a)		__ALIGN_KERNEL((x), (a))
#define ALIGN_DOWN(x, a)	__ALIGN_KERNEL((x) - ((a) - 1), (a))
#define IS_ALIGNED(x, a)	(((x) & ((typeof(x))(a) - 1)) == 0)

#endif /* _TOOLS_LINUX_ALIGN_H */