Thomas Weißschuhvdso: Introduce vdso/align.h5b47aba1 year agoHistory
15 lines · 551 B · C
RawDownload
/* SPDX-License-Identifier: GPL-2.0 */#ifndef __VDSO_ALIGN_H#define __VDSO_ALIGN_H #include <vdso/const.h> /* @a is a power of 2 value */#define ALIGN(x, a)		__ALIGN_KERNEL((x), (a))#define ALIGN_DOWN(x, a)	__ALIGN_KERNEL((x) - ((a) - 1), (a))#define __ALIGN_MASK(x, mask)	__ALIGN_KERNEL_MASK((x), (mask))#define PTR_ALIGN(p, a)		((typeof(p))ALIGN((unsigned long)(p), (a)))#define PTR_ALIGN_DOWN(p, a)	((typeof(p))ALIGN_DOWN((unsigned long)(p), (a)))#define IS_ALIGNED(x, a)		(((x) & ((typeof(x))(a) - 1)) == 0) #endif	/* __VDSO_ALIGN_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t