projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the toolchain list in the settings
[bertos.git]
/
bertos
/
kern
/
sem_test.c
diff --git
a/bertos/kern/sem_test.c
b/bertos/kern/sem_test.c
index b2031b3ba6a67719d9dcab50acb88b30824d0bd9..b6428c1be5f73314743c8ec4442b702096dfb895 100644
(file)
--- a/
bertos/kern/sem_test.c
+++ b/
bertos/kern/sem_test.c
@@
-49,8
+49,8
@@
// Global settings for the test.
#define MAX_GLOBAL_COUNT 1024
// Global settings for the test.
#define MAX_GLOBAL_COUNT 1024
-#define TEST_TIME_OUT_MS
4
000
-#define DELAY
10
+#define TEST_TIME_OUT_MS
6
000
+#define DELAY
5
// Settings for the test process.
//Process 1
// Settings for the test process.
//Process 1
@@
-64,26
+64,25
@@
#define DELAY_PROC_T3 INC_PROC_T3*DELAY
//Process 4
#define INC_PROC_T4 7
#define DELAY_PROC_T3 INC_PROC_T3*DELAY
//Process 4
#define INC_PROC_T4 7
-#define DELAY_PROC_T4 INC_PROC_T
3
*DELAY
+#define DELAY_PROC_T4 INC_PROC_T
4
*DELAY
//Process 5
#define INC_PROC_T5 11
//Process 5
#define INC_PROC_T5 11
-#define DELAY_PROC_T5 INC_PROC_T
3
*DELAY
+#define DELAY_PROC_T5 INC_PROC_T
5
*DELAY
//Process 6
#define INC_PROC_T6 13
//Process 6
#define INC_PROC_T6 13
-#define DELAY_PROC_T6 INC_PROC_T
3
*DELAY
+#define DELAY_PROC_T6 INC_PROC_T
6
*DELAY
//Process 7
#define INC_PROC_T7 17
//Process 7
#define INC_PROC_T7 17
-#define DELAY_PROC_T7 INC_PROC_T
3
*DELAY
+#define DELAY_PROC_T7 INC_PROC_T
7
*DELAY
//Process 8
#define INC_PROC_T8 19
//Process 8
#define INC_PROC_T8 19
-#define DELAY_PROC_T8 INC_PROC_T
3
*DELAY
+#define DELAY_PROC_T8 INC_PROC_T
8
*DELAY
Semaphore sem;
unsigned int global_count = 0;
/*
Semaphore sem;
unsigned int global_count = 0;
/*
- * These macro generate the code that needed to create the
- * test process function and all it needed.
+ * These macros generate the code needed to create the test process functions.
*/
#define PROC_TEST(num) static void proc_test##num(void) \
{ \
*/
#define PROC_TEST(num) static void proc_test##num(void) \
{ \
@@
-148,14
+147,14
@@
int sem_testRun(void)
kputs("> Main: Processes created\n");
/*
kputs("> Main: Processes created\n");
/*
- * Wait until all process
finishing, if some going wrong we retur
n
- * error after time
_out_ms
ms.
+ * Wait until all process
es exit, if something goes wrong we return a
n
+ * error after time
out_
ms.
*/
while((timer_clock() - start_time) < ms_to_ticks(TEST_TIME_OUT_MS))
{
if (sem_attempt(&sem))
{
*/
while((timer_clock() - start_time) < ms_to_ticks(TEST_TIME_OUT_MS))
{
if (sem_attempt(&sem))
{
- kputs("> Main: Check if test
is finish
..\n");
+ kputs("> Main: Check if test
has finished
..\n");
if(global_count == MAX_GLOBAL_COUNT)
{
kputs("> Main: Test Finished..Ok!\n");
if(global_count == MAX_GLOBAL_COUNT)
{
kputs("> Main: Test Finished..Ok!\n");