Remove warnings from nightly tests.
authorlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 17 May 2011 16:35:21 +0000 (16:35 +0000)
committerlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 17 May 2011 16:35:21 +0000 (16:35 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4911 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/kern/proc.h
bertos/kern/sem_test.c

index 6aec28d3ea5d1627cc20bf4118df2fc1c2dd41a4..1cacc2bc4a12f42605144234eeeef60f7f6f361a 100644 (file)
 #ifndef KERN_PROC_H
 #define KERN_PROC_H
 
 #ifndef KERN_PROC_H
 #define KERN_PROC_H
 
-#include "sem.h"
 #include "cfg/cfg_proc.h"
 #include "cfg/cfg_signal.h"
 #include "cfg/cfg_monitor.h"
 #include "cfg/cfg_proc.h"
 #include "cfg/cfg_signal.h"
 #include "cfg/cfg_monitor.h"
+#include "sem.h"
 
 #include <struct/list.h> // Node, PriNode
 
 
 #include <struct/list.h> // Node, PriNode
 
 #include <cpu/types.h> // cpu_stack_t
 #include <cpu/frame.h> // CPU_SAVED_REGS_CNT
 
 #include <cpu/types.h> // cpu_stack_t
 #include <cpu/frame.h> // CPU_SAVED_REGS_CNT
 
+/* The following silents warnings on nightly tests. We need to regenerate
+ * all the projects before this can be removed.
+ */
+#ifndef CONFIG_KERN_PRI_INHERIT
+#define CONFIG_KERN_PRI_INHERIT 0
+#endif
+
 /*
  * WARNING: struct Process is considered private, so its definition can change any time
  * without notice. DO NOT RELY on any field defined here, use only the interface
 /*
  * WARNING: struct Process is considered private, so its definition can change any time
  * without notice. DO NOT RELY on any field defined here, use only the interface
index e304dc37b8cf904039cf9cf68e935710a08212c4..abaa35a366eeabcc72e47d95920e74db7a219dc1 100644 (file)
@@ -158,7 +158,7 @@ typedef enum ProcType {NONE, S1, S2, S1S2} ProcType;
  */
 #define PROC_INV_TEST(num) static void proc_semInvTest##num(void) \
 { \
  */
 #define PROC_INV_TEST(num) static void proc_semInvTest##num(void) \
 { \
-       ProcType p_type = (ProcType)((long) proc_currentUserData()); \
+       ProcType p_type = (ProcType)((int) proc_currentUserData()); \
        int mult = p_type == NONE ? 5 : 1; \
        unsigned int i, local_count = 0; \
        ticks_t start; \
        int mult = p_type == NONE ? 5 : 1; \
        unsigned int i, local_count = 0; \
        ticks_t start; \
@@ -244,7 +244,7 @@ PROC_TEST_STACK(6)
 PROC_TEST_STACK(7)
 PROC_TEST_STACK(8)
 
 PROC_TEST_STACK(7)
 PROC_TEST_STACK(8)
 
-int sem_ser_test(void)
+static int sem_ser_test(void)
 {
        ticks_t start_time = timer_clock();
 
 {
        ticks_t start_time = timer_clock();
 
@@ -290,7 +290,7 @@ int sem_ser_test(void)
 
 #if CONFIG_KERN_PRI
 
 
 #if CONFIG_KERN_PRI
 
-int sem_inv_test(void)
+static int sem_inv_test(void)
 {
        int i, orig_pri = proc_current()->link.pri;
        ticks_t fake, start_time;
 {
        int i, orig_pri = proc_current()->link.pri;
        ticks_t fake, start_time;
@@ -338,7 +338,7 @@ int sem_inv_test(void)
                if (sem_attempt(&sem)) {
                        if (global_count >= loops*7 + loops*5) {
                                for (i = 0; i < 8; i++)
                if (sem_attempt(&sem)) {
                        if (global_count >= loops*7 + loops*5) {
                                for (i = 0; i < 8; i++)
-                                       kprintf("> Main: I-O latency of %d = %dms\n", i+1, ms_to_ticks(finishing_time[i]));
+                                       kprintf("> Main: I-O latency of %d = %ldms\n", i+1, ms_to_ticks(finishing_time[i]));
                                kputs("> Main: Test Finished..Ok!\n");
                                return 0;
                        }
                                kputs("> Main: Test Finished..Ok!\n");
                                return 0;
                        }