Displaying 7 results from an estimated 7 matches for "__bits_per_long".
2015 May 18
5
kernel/libc uapi changes for y2038
...e __kernel_* structure name
to the name we actually want in user space, based on a __KERNEL_TIME_BITS
macro that can be set to either 32 or 64 for 32-bit architectures by
the libc. Depending on that macro, the compiler will either see one
of these combinations (for each of the five structures):
a) __BITS_PER_LONG == 32 && __KERNEL_TIME_BITS == 32:
struct timespec based on 32-bit __kernel_time_t
struct __kernel_timespec based on 64-bit __kernel_time64_t
b) __BITS_PER_LONG == 64 && __KERNEL_TIME_BITS == 64:
struct timespec based on 64-bit __kernel_time...
2023 Jan 14
1
[klibc:time64] time: Use 64-bit time types on all architectures
...>
> #include <klibc/extern.h>
> +#include <klibc/endian.h>
> #include <stddef.h>
> #include <sys/types.h>
> -#include <linux/time.h>
> +
> +struct timespec {
> + __kernel_time64_t tv_sec;
> +#if __BYTE_ORDER == __BIG_ENDIAN && __BITS_PER_LONG == 32
> + long __tv_pad;
> +#endif
> + long tv_nsec;
> +#if __BYTE_ORDER == __LITTLE_ENDIAN && __BITS_PER_LONG == 32
> + long __tv_pad;
> +#endif
> +};
The problem with this definition is applications doing things like
struct timespec ts = { 0, 5000 }; /* 5 ?s *...
2015 May 27
0
kernel/libc uapi changes for y2038
...t; to the name we actually want in user space, based on a __KERNEL_TIME_BITS
> macro that can be set to either 32 or 64 for 32-bit architectures by
> the libc. Depending on that macro, the compiler will either see one
> of these combinations (for each of the five structures):
>
> a) __BITS_PER_LONG == 32 && __KERNEL_TIME_BITS == 32:
>
> struct timespec based on 32-bit __kernel_time_t
> struct __kernel_timespec based on 64-bit __kernel_time64_t
>
> b) __BITS_PER_LONG == 64 && __KERNEL_TIME_BITS == 64:
>
> struct timespec...
2023 Jan 14
1
[klibc:time64] time: Use 64-bit time types on all architectures
.../sys/time.h
@@ -6,9 +6,63 @@
#define _SYS_TIME_H
#include <klibc/extern.h>
+#include <klibc/endian.h>
#include <stddef.h>
#include <sys/types.h>
-#include <linux/time.h>
+
+struct timespec {
+ __kernel_time64_t tv_sec;
+#if __BYTE_ORDER == __BIG_ENDIAN && __BITS_PER_LONG == 32
+ long __tv_pad;
+#endif
+ long tv_nsec;
+#if __BYTE_ORDER == __LITTLE_ENDIAN && __BITS_PER_LONG == 32
+ long __tv_pad;
+#endif
+};
+
+struct timeval {
+ __kernel_time64_t tv_sec;
+ __kernel_suseconds_t tv_usec;
+};
+
+struct timeval_old {
+ __kernel_time_t tv_sec;
+ __kernel_s...
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...bitsperlong.h
@@ -1,5 +1,5 @@
-#ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG
-#define _UAPI__ASM_GENERIC_BITS_PER_LONG
+#ifndef _UAPI_ASM_GENERIC_BITS_PER_LONG
+#define _UAPI_ASM_GENERIC_BITS_PER_LONG
/*
* There seems to be no way of detecting this automatically from user
@@ -12,4 +12,4 @@
#define __BITS_PER_LONG 32
#endif
-#endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */
+#endif /* _UAPI_ASM_GENERIC_BITS_PER_LONG */
diff --git a/include/uapi/asm-generic/errno-base.h b/include/uapi/asm-generic/errno-base.h
index 6511597..08e447b 100644
--- a/include/uapi/asm-generic/errno-base.h
+++ b/include/uapi/asm-gener...
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...bitsperlong.h
@@ -1,5 +1,5 @@
-#ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG
-#define _UAPI__ASM_GENERIC_BITS_PER_LONG
+#ifndef _UAPI_ASM_GENERIC_BITS_PER_LONG
+#define _UAPI_ASM_GENERIC_BITS_PER_LONG
/*
* There seems to be no way of detecting this automatically from user
@@ -12,4 +12,4 @@
#define __BITS_PER_LONG 32
#endif
-#endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */
+#endif /* _UAPI_ASM_GENERIC_BITS_PER_LONG */
diff --git a/include/uapi/asm-generic/errno-base.h b/include/uapi/asm-generic/errno-base.h
index 6511597..08e447b 100644
--- a/include/uapi/asm-generic/errno-base.h
+++ b/include/uapi/asm-gener...
2013 Aug 02
3
[PATCH trivial] include: uapi: standard all files' macro prefix and suffix, excluding "linux/" sub-directory
...bitsperlong.h
@@ -1,5 +1,5 @@
-#ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG
-#define _UAPI__ASM_GENERIC_BITS_PER_LONG
+#ifndef _UAPI_ASM_GENERIC_BITS_PER_LONG
+#define _UAPI_ASM_GENERIC_BITS_PER_LONG
/*
* There seems to be no way of detecting this automatically from user
@@ -12,4 +12,4 @@
#define __BITS_PER_LONG 32
#endif
-#endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */
+#endif /* _UAPI_ASM_GENERIC_BITS_PER_LONG */
diff --git a/include/uapi/asm-generic/errno-base.h b/include/uapi/asm-generic/errno-base.h
index 6511597..08e447b 100644
--- a/include/uapi/asm-generic/errno-base.h
+++ b/include/uapi/asm-gener...