~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/rcutorture/formal/srcu-cbmc/include/linux/types.h

Version: ~ [ linux-6.0-rc6 ] ~ [ linux-5.19.10 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.69 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.144 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.214 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.259 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.294 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.329 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * This header has been modifies to remove definitions of types that
  4  * are defined in standard userspace headers or are problematic for some
  5  * other reason.
  6  */
  7 
  8 #ifndef _LINUX_TYPES_H
  9 #define _LINUX_TYPES_H
 10 
 11 #define __EXPORTED_HEADERS__
 12 #include <uapi/linux/types.h>
 13 
 14 #ifndef __ASSEMBLY__
 15 
 16 #define DECLARE_BITMAP(name, bits) \
 17         unsigned long name[BITS_TO_LONGS(bits)]
 18 
 19 typedef __u32 __kernel_dev_t;
 20 
 21 /* bsd */
 22 typedef unsigned char           u_char;
 23 typedef unsigned short          u_short;
 24 typedef unsigned int            u_int;
 25 typedef unsigned long           u_long;
 26 
 27 /* sysv */
 28 typedef unsigned char           unchar;
 29 typedef unsigned short          ushort;
 30 typedef unsigned int            uint;
 31 typedef unsigned long           ulong;
 32 
 33 #ifndef __BIT_TYPES_DEFINED__
 34 #define __BIT_TYPES_DEFINED__
 35 
 36 typedef         __u8            u_int8_t;
 37 typedef         __s8            int8_t;
 38 typedef         __u16           u_int16_t;
 39 typedef         __s16           int16_t;
 40 typedef         __u32           u_int32_t;
 41 typedef         __s32           int32_t;
 42 
 43 #endif /* !(__BIT_TYPES_DEFINED__) */
 44 
 45 typedef         __u8            uint8_t;
 46 typedef         __u16           uint16_t;
 47 typedef         __u32           uint32_t;
 48 
 49 /* this is a special 64bit data type that is 8-byte aligned */
 50 #define aligned_u64 __u64 __attribute__((aligned(8)))
 51 #define aligned_be64 __be64 __attribute__((aligned(8)))
 52 #define aligned_le64 __le64 __attribute__((aligned(8)))
 53 
 54 /**
 55  * The type used for indexing onto a disc or disc partition.
 56  *
 57  * Linux always considers sectors to be 512 bytes long independently
 58  * of the devices real block size.
 59  *
 60  * blkcnt_t is the type of the inode's block count.
 61  */
 62 typedef u64 sector_t;
 63 
 64 /*
 65  * The type of an index into the pagecache.
 66  */
 67 #define pgoff_t unsigned long
 68 
 69 /*
 70  * A dma_addr_t can hold any valid DMA address, i.e., any address returned
 71  * by the DMA API.
 72  *
 73  * If the DMA API only uses 32-bit addresses, dma_addr_t need only be 32
 74  * bits wide.  Bus addresses, e.g., PCI BARs, may be wider than 32 bits,
 75  * but drivers do memory-mapped I/O to ioremapped kernel virtual addresses,
 76  * so they don't care about the size of the actual bus addresses.
 77  */
 78 #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
 79 typedef u64 dma_addr_t;
 80 #else
 81 typedef u32 dma_addr_t;
 82 #endif
 83 
 84 #ifdef CONFIG_PHYS_ADDR_T_64BIT
 85 typedef u64 phys_addr_t;
 86 #else
 87 typedef u32 phys_addr_t;
 88 #endif
 89 
 90 typedef phys_addr_t resource_size_t;
 91 
 92 /*
 93  * This type is the placeholder for a hardware interrupt number. It has to be
 94  * big enough to enclose whatever representation is used by a given platform.
 95  */
 96 typedef unsigned long irq_hw_number_t;
 97 
 98 typedef struct {
 99         int counter;
100 } atomic_t;
101 
102 #ifdef CONFIG_64BIT
103 typedef struct {
104         long counter;
105 } atomic64_t;
106 #endif
107 
108 struct list_head {
109         struct list_head *next, *prev;
110 };
111 
112 struct hlist_head {
113         struct hlist_node *first;
114 };
115 
116 struct hlist_node {
117         struct hlist_node *next, **pprev;
118 };
119 
120 /**
121  * struct callback_head - callback structure for use with RCU and task_work
122  * @next: next update requests in a list
123  * @func: actual update function to call after the grace period.
124  *
125  * The struct is aligned to size of pointer. On most architectures it happens
126  * naturally due ABI requirements, but some architectures (like CRIS) have
127  * weird ABI and we need to ask it explicitly.
128  *
129  * The alignment is required to guarantee that bits 0 and 1 of @next will be
130  * clear under normal conditions -- as long as we use call_rcu() or
131  * call_srcu() to queue callback.
132  *
133  * This guarantee is important for few reasons:
134  *  - future call_rcu_lazy() will make use of lower bits in the pointer;
135  *  - the structure shares storage spacer in struct page with @compound_head,
136  *    which encode PageTail() in bit 0. The guarantee is needed to avoid
137  *    false-positive PageTail().
138  */
139 struct callback_head {
140         struct callback_head *next;
141         void (*func)(struct callback_head *head);
142 } __attribute__((aligned(sizeof(void *))));
143 #define rcu_head callback_head
144 
145 typedef void (*rcu_callback_t)(struct rcu_head *head);
146 typedef void (*call_rcu_func_t)(struct rcu_head *head, rcu_callback_t func);
147 
148 /* clocksource cycle base type */
149 typedef u64 cycle_t;
150 
151 #endif /*  __ASSEMBLY__ */
152 #endif /* _LINUX_TYPES_H */
153 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp