File otp_src_R15B03-1-erts-erl_process.patch of Package erlang

diff -Ndurp otp_src_R15B03-1/erts/emulator/beam/erl_process.c otp_src_R15B03-1-erts-erl_process/erts/emulator/beam/erl_process.c
--- otp_src_R15B03-1/erts/emulator/beam/erl_process.c	2012-12-06 16:02:45.000000000 +0200
+++ otp_src_R15B03-1-erts-erl_process/erts/emulator/beam/erl_process.c	2015-01-18 19:48:23.000000000 +0200
@@ -3848,42 +3848,48 @@ erts_early_init_scheduling(int no_schedu
 int
 erts_sched_set_wakeup_other_thresold(char *str)
 {
-    ErtsSchedWakeupOtherThreshold threshold;
+#ifdef ERTS_SMP
     if (sys_strcmp(str, "very_high") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_VERY_HIGH;
+	wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_VERY_HIGH;
     else if (sys_strcmp(str, "high") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_HIGH;
+	wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_HIGH;
     else if (sys_strcmp(str, "medium") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_MEDIUM;
+	wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_MEDIUM;
     else if (sys_strcmp(str, "low") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_LOW;
+	wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_LOW;
     else if (sys_strcmp(str, "very_low") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_VERY_LOW;
+	wakeup_other.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
+    return sys_strcmp(str, "very_high") &&
+	   sys_strcmp(str, "high") &&
+	   sys_strcmp(str, "medium") &&
+	   sys_strcmp(str, "low") &&
+	   sys_strcmp(str, "very_low")
+	   ? EINVAL : 0;
+#endif
 }
 
 int
 erts_sched_set_wakeup_other_type(char *str)
 {
-    ErtsSchedWakeupOtherType type;
+#ifdef ERTS_SMP
     if (sys_strcmp(str, "proposal") == 0)
-	type = ERTS_SCHED_WAKEUP_OTHER_TYPE_PROPOSAL;
-    else if (sys_strcmp(str, "default") == 0)
-	type = ERTS_SCHED_WAKEUP_OTHER_TYPE_LEGACY;
-    else if (sys_strcmp(str, "legacy") == 0)
-	type = ERTS_SCHED_WAKEUP_OTHER_TYPE_LEGACY;
+	wakeup_other.type = ERTS_SCHED_WAKEUP_OTHER_TYPE_PROPOSAL;
+    else if (sys_strcmp(str, "default") == 0 || sys_strcmp(str, "legacy") == 0)
+	wakeup_other.type = ERTS_SCHED_WAKEUP_OTHER_TYPE_LEGACY;
     else
 	return EINVAL;
-#ifdef ERTS_SMP
-    wakeup_other.type = type;
-#endif
     return 0;
+#else
+    return sys_strcmp(str, "proposal") &&
+	   sys_strcmp(str, "default") &&
+	   sys_strcmp(str, "legacy")
+	   ? EINVAL : 0;
+#endif
 }
 
 int