1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-05 07:00:22 +02:00

Add linux-kernel freestanding

This commit is contained in:
Nick Terrell
2020-08-10 23:11:20 -07:00
parent 1c3cb2c05c
commit 29c5de8780
62 changed files with 957 additions and 32419 deletions

View File

@ -1,16 +1,15 @@
#ifndef LINUX_KERNEL_H_
#define LINUX_KERNEL_H_
/*
* Copyright (c) 2016-2020, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* You may select, at your option, one of the above-listed licenses.
*/
#ifndef LINUX_KERNEL_H
#define LINUX_KERNEL_H
#define ALIGN(x, a) ({ \
typeof(x) const __xe = (x); \
typeof(a) const __ae = (a); \
typeof(a) const __m = __ae - 1; \
typeof(x) const __r = __xe & __m; \
__xe + (__r ? (__ae - __r) : 0); \
})
#define WARN_ON(x)
#define PTR_ALIGN(p, a) (typeof(p))ALIGN((unsigned long long)(p), (a))
#define current Something that doesn't compile :)
#endif // LINUX_KERNEL_H_
#endif