Skip to content

Commit

Permalink
UAPI: Rearrange definition of HZ in asm-generic/param.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
  • Loading branch information
dhowells committed Dec 13, 2011
1 parent cb0d935 commit 3d7f1dc
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions include/asm-generic/param.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#ifndef __ASM_GENERIC_PARAM_H
#define __ASM_GENERIC_PARAM_H

#ifdef __KERNEL__
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* some user interfaces are */
# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
#endif

#ifndef HZ
#define HZ 100
#endif
Expand All @@ -21,4 +15,11 @@

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

#ifdef __KERNEL__
# undef HZ
# define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* some user interfaces are */
# define CLOCKS_PER_SEC (USER_HZ) /* in "ticks" like times() */
#endif

#endif /* __ASM_GENERIC_PARAM_H */

0 comments on commit 3d7f1dc

Please sign in to comment.