Motr
M0
types.h
Go to the documentation of this file.
1
/* -*- C -*- */
2
/*
3
* Copyright (c) 2012-2020 Seagate Technology LLC and/or its Affiliates
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
* For any questions about this software or licensing,
18
* please email opensource@seagate.com or cortx-questions@seagate.com.
19
*
20
*/
21
22
23
#pragma once
24
25
#ifndef __MOTR_LIB_LINUX_KERNEL_TYPES_H__
26
#define __MOTR_LIB_LINUX_KERNEL_TYPES_H__
27
28
#include <linux/types.h>
29
#include <linux/kernel.h>
/* INT_MAX */
30
31
#include "
lib/assert.h
"
32
33
M0_BASSERT
(((uint32_t)0) - 1 == ~(uint32_t)0);
34
35
#define UINT8_MAX ((uint8_t)0xff)
36
#define INT8_MIN ((int8_t)0x80)
37
#define INT8_MAX ((int8_t)0x7f)
38
#define UINT16_MAX ((uint16_t)0xffff)
39
#define INT16_MIN ((int16_t)0x8000)
40
#define INT16_MAX ((int16_t)0x7fff)
41
#define UINT32_MAX ((uint32_t)0xffffffff)
42
#define INT32_MIN ((int32_t)0x80000000)
43
#define INT32_MAX ((int32_t)0x7fffffff)
44
#define UINT64_MAX ((uint64_t)0xffffffffffffffff)
45
#define INT64_MIN ((int64_t)0x8000000000000000)
46
#define INT64_MAX ((int64_t)0x7fffffffffffffff)
47
48
M0_BASSERT
(
INT8_MIN
< 0);
49
M0_BASSERT
(
INT8_MAX
> 0);
50
M0_BASSERT
(
INT16_MIN
< 0);
51
M0_BASSERT
(
INT16_MAX
> 0);
52
M0_BASSERT
(
INT32_MIN
< 0);
53
M0_BASSERT
(
INT32_MAX
> 0);
54
M0_BASSERT
(
INT64_MIN
< 0);
55
M0_BASSERT
(
INT64_MAX
> 0);
56
57
#define PRId64 "lld"
58
#define PRIu64 "llu"
59
#define PRIi64 "lli"
60
#define PRIo64 "llo"
61
#define PRIx64 "llx"
62
#define SCNx64 "llx"
63
#define SCNi64 "lli"
64
65
#define PRId32 "d"
66
#define PRIu32 "u"
67
#define PRIi32 "i"
68
#define PRIo32 "o"
69
#define PRIx32 "x"
70
#define SCNx32 "x"
71
#define SCNi32 "i"
72
73
/* __MOTR_LIB_LINUX_KERNEL_TYPES_H__ */
74
#endif
75
/*
76
* Local variables:
77
* c-indentation-style: "K&R"
78
* c-basic-offset: 8
79
* tab-width: 8
80
* fill-column: 80
81
* scroll-step: 1
82
* End:
83
*/
INT32_MIN
#define INT32_MIN
Definition:
types.h:42
INT64_MAX
#define INT64_MAX
Definition:
types.h:46
assert.h
INT8_MIN
#define INT8_MIN
Definition:
types.h:36
INT8_MAX
#define INT8_MAX
Definition:
types.h:37
INT64_MIN
#define INT64_MIN
Definition:
types.h:45
M0_BASSERT
M0_BASSERT(((uint32_t) 0) - 1==~(uint32_t) 0)
INT16_MIN
#define INT16_MIN
Definition:
types.h:39
INT16_MAX
#define INT16_MAX
Definition:
types.h:40
INT32_MAX
#define INT32_MAX
Definition:
types.h:43
lib
linux_kernel
types.h
Generated on Thu Apr 14 2022 14:02:56 for Motr by
1.8.14