diff options
author | Patrik Nyblom <[email protected]> | 2012-11-23 11:29:17 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2013-01-23 17:39:34 +0100 |
commit | 90b44f551fd3d988b34a9fb7d32598b789a0c546 (patch) | |
tree | da10a18491fc0305d7af776b7fefbee4bc2ca40a /erts/emulator/beam/erl_process.c | |
parent | d43f1a32489e7d22c73f6d6e7a6df59436ad3e17 (diff) | |
download | otp-90b44f551fd3d988b34a9fb7d32598b789a0c546.tar.gz otp-90b44f551fd3d988b34a9fb7d32598b789a0c546.tar.bz2 otp-90b44f551fd3d988b34a9fb7d32598b789a0c546.zip |
Fix compiler warnings from GCC 4.7.1 on ARCH Linux
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 6e9bf7ca12..70a2dc82f6 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -4270,6 +4270,7 @@ erts_early_init_scheduling(int no_schedulers) int erts_sched_set_wakeup_other_thresold(char *str) { +#ifdef ERTS_SMP ErtsSchedWakeupOtherThreshold threshold; if (sys_strcmp(str, "very_high") == 0) threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_VERY_HIGH; @@ -4283,16 +4284,23 @@ erts_sched_set_wakeup_other_thresold(char *str) threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_VERY_LOW; else return EINVAL; -#ifdef ERTS_SMP wakeup_other.threshold = threshold; set_wakeup_other_data(); -#endif return 0; +#else + if (sys_strcmp(str, "very_high") == 0 || sys_strcmp(str, "high") == 0 || + sys_strcmp(str, "medium") == 0 || sys_strcmp(str, "low") == 0 || + sys_strcmp(str, "very_low") == 0) { + return 0; + } + return EINVAL; +#endif } int erts_sched_set_wakeup_other_type(char *str) { +#ifdef ERTS_SMP ErtsSchedWakeupOtherType type; if (sys_strcmp(str, "default") == 0) type = ERTS_SCHED_WAKEUP_OTHER_TYPE_DEFAULT; @@ -4300,10 +4308,15 @@ erts_sched_set_wakeup_other_type(char *str) type = ERTS_SCHED_WAKEUP_OTHER_TYPE_LEGACY; else return EINVAL; -#ifdef ERTS_SMP wakeup_other.type = type; -#endif return 0; +#else + if (sys_strcmp(str, "proposal") == 0 || sys_strcmp(str, "default") == 0 || + sys_strcmp(str, "legacy") == 0) { + return 0; + } + return EINVAL; +#endif } int |