#ifndef CPUS_H #define CPUS_H #include #include "built_in.h" #include "die.h" static inline unsigned int get_number_cpus(void) { int ret = sysconf(_SC_NPROCESSORS_CONF); if (unlikely(ret <= 0)) panic("get_number_cpus error!\n"); return ret; } static inline unsigned int get_number_cpus_online(void) { int ret = sysconf(_SC_NPROCESSORS_ONLN); if (unlikely(ret <= 0)) panic("get_number_cpus_online error!\n"); return ret; } #endif /* CPUS_H */ pository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-05-19 15:44:06 -0600
committerEric W. Biederman <ebiederm@xmission.com>2012-05-19 15:44:40 -0600
commit4b06a81f1daee668fbd6de85557bfb36dd36078f (patch)
tree5c5440d2abc6e279db81a0b9067d2fd54bcbbc10 /kernel/user.c
parent8ca937a668d4be0b0c89c4fc9a912a5885ac06fe (diff)
userns: Silence silly gcc warning.
On 32bit builds gcc says: kernel/user.c:30:4: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] kernel/user.c:38:4: warning: this decimal constant is unsigned only in ISO C90 [enabled by default] Silence gcc by changing the constant 4294967295 to 4294967295U. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'kernel/user.c')