From c37fdc28c2cfdf41a549ba245c1cad85b757e53a Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 13 Dec 2009 15:13:37 +0000 Subject: Eliminate some hcs12 compile errors/warnings git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2329 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/examples/ostest/barrier.c | 8 +++++--- nuttx/examples/ostest/main.c | 13 +++++++------ nuttx/examples/ostest/mqueue.c | 4 +++- 3 files changed, 15 insertions(+), 10 deletions(-) (limited to 'nuttx/examples') diff --git a/nuttx/examples/ostest/barrier.c b/nuttx/examples/ostest/barrier.c index 6b33ac0e3..56c0b75b1 100644 --- a/nuttx/examples/ostest/barrier.c +++ b/nuttx/examples/ostest/barrier.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/ostest/barrier.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -48,6 +48,8 @@ * Definitions ****************************************************************************/ +#define HALF_SECOND 500000L + /**************************************************************************** * Private Data ****************************************************************************/ @@ -69,7 +71,7 @@ static void *barrier_func(void *parameter) printf("barrier_func: Thread %d started\n", id); #ifndef CONFIG_DISABLE_SIGNALS - usleep(500*1000); + usleep(HALF_SECOND); #endif /* Wait at the barrier until all threads are synchronized. */ @@ -96,7 +98,7 @@ static void *barrier_func(void *parameter) } #ifndef CONFIG_DISABLE_SIGNALS - usleep(500*1000); + usleep(HALF_SECOND); #endif printf("barrier_func: Thread %d done\n", id); return NULL; diff --git a/nuttx/examples/ostest/main.c b/nuttx/examples/ostest/main.c index 261f7974b..22a45dcfc 100644 --- a/nuttx/examples/ostest/main.c +++ b/nuttx/examples/ostest/main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * ostest/main.c + * examples/ostest/main.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -51,8 +51,9 @@ * Definitions ****************************************************************************/ -#define PRIORITY 100 -#define NARGS 4 +#define PRIORITY 100 +#define NARGS 4 +#define HALF_SECOND_USEC 500000L /**************************************************************************** * Private Data @@ -133,7 +134,7 @@ static void check_test_memory_usage(void) { /* Wait a little bit to let any threads terminate */ - usleep(500*1000); + usleep(HALF_SECOND_USEC); /* Get the current memory usage */ @@ -224,7 +225,7 @@ static int user_main(int argc, char *argv[]) /* Sample the memory usage now */ #ifndef CONFIG_DISABLE_SIGNALS - usleep(500*1000); + usleep(HALF_SECOND_USEC); #ifdef CONFIG_CAN_PASS_STRUCTS g_mmbefore = mallinfo(); @@ -405,7 +406,7 @@ static int user_main(int argc, char *argv[]) */ #ifndef CONFIG_DISABLE_SIGNALS - usleep(500*1000); + usleep(HALF_SECOND_USEC); #ifdef CONFIG_CAN_PASS_STRUCTS g_mmafter = mallinfo(); diff --git a/nuttx/examples/ostest/mqueue.c b/nuttx/examples/ostest/mqueue.c index 8c96d9cf4..e68cfc012 100644 --- a/nuttx/examples/ostest/mqueue.c +++ b/nuttx/examples/ostest/mqueue.c @@ -73,6 +73,8 @@ # define TEST_RECEIVE_NMSGS (10) #endif +#define HALF_SECOND_USEC_USEC 500000L + /************************************************************************** * Private Types **************************************************************************/ @@ -370,7 +372,7 @@ void mqueue_test(void) /* Wait a bit to see if the thread exits on its own */ - usleep(500*1000); + usleep(HALF_SECOND_USEC_USEC); #endif /* Then cancel the thread and see if it did */ -- cgit v1.2.3