Skip to content

Commit 3d7f1dc

Browse files
committed
UAPI: Rearrange definition of HZ in asm-generic/param.h
Rearrange the definition of HZ in asm-generic/param.h so that the user-specific is declared before the kernel-specific one. We then explicitly #undef the userspace HZ value and replace it with the kernel HZ value. This allows the userspace params to be excised into a separate header as part of the UAPI header split. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
1 parent cb0d935 commit 3d7f1dc

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎include/asm-generic/param.h‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
#ifndef __ASM_GENERIC_PARAM_H
22
#define __ASM_GENERIC_PARAM_H
33

4-
#ifdef __KERNEL__
5-
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
6-
# define USER_HZ 100 /* some user interfaces are */
7-
# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
8-
#endif
9-
104
#ifndef HZ
115
#define HZ 100
126
#endif
@@ -21,4 +15,11 @@
2115

2216
#define MAXHOSTNAMELEN 64 /* max length of hostname */
2317

18+
#ifdef __KERNEL__
19+
# undef HZ
20+
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
21+
# define USER_HZ 100 /* some user interfaces are */
22+
# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
23+
#endif
24+
2425
#endif /* __ASM_GENERIC_PARAM_H */

0 commit comments

Comments
 (0)