Date: Wed, 21 Feb 2007 21:55:16 +0000
Subject: [PATCH] Progress toward clean SDCC compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@18 42af7a65-404d-4744-a932-0658087f49c3
---
Documentation/NuttxUserGuide.html | 63 ++++++++++---
Makefile | 34 +++----
arch/README.txt | 17 +++-
arch/c5471/Make.defs | 3 +-
arch/c5471/defconfig | 14 ++-
arch/c5471/include/irq.h | 12 +--
arch/c5471/include/types.h | 12 +++
arch/c5471/src/Makefile | 11 ++-
arch/c5471/src/up_assert.c | 4 +-
arch/c5471/src/up_createstack.c | 6 +-
arch/c5471/src/up_schedulesigaction.c | 2 +-
arch/c5471/src/up_serial.c | 8 +-
arch/c5471/src/up_usestack.c | 6 +-
arch/sim/Make.defs | 3 +-
arch/sim/defconfig | 14 ++-
arch/sim/include/irq.h | 6 +-
arch/sim/include/types.h | 12 +++
arch/sim/src/Makefile | 11 ++-
arch/sim/src/up_createstack.c | 9 +-
arch/sim/src/up_head.c | 4 +-
arch/sim/src/up_usestack.c | 9 +-
drivers/Makefile | 7 +-
examples/ostest/Makefile | 7 +-
examples/ostest/timedwait.c | 38 +++++---
fs/Makefile | 7 +-
include/assert.h | 54 ++++++++---
include/errno.h | 8 ++
include/nuttx/arch.h | 4 +-
include/nuttx/compiler.h | 1 +
include/nuttx/irq.h | 2 +-
include/pthread.h | 28 +++---
include/sched.h | 8 +-
include/sys/types.h | 20 ++--
include/wdog.h | 27 +++++-
lib/Makefile | 7 +-
mm/Makefile | 7 +-
mm/mm_environment.h | 4 -
mm/mm_initialize.c | 6 +-
mm/mm_internal.h | 42 ++++++---
mm/mm_mallinfo.c | 6 +-
mm/mm_malloc.c | 2 +-
mm/mm_memalign.c | 18 ++--
mm/mm_realloc.c | 12 +--
mm/mm_shrinkchunk.c | 2 +-
mm/mm_size2ndx.c | 2 +-
mm/mm_test.c | 1 -
sched/Makefile | 9 +-
sched/get_errorptr.c | 83 +++++++++++++++++
sched/irq_attach.c | 2 +-
sched/mq_close.c | 8 +-
sched/mq_msgfree.c | 2 +-
sched/mq_notify.c | 12 +--
sched/mq_open.c | 5 +
sched/mq_receive.c | 14 +--
sched/mq_send.c | 28 ++++--
sched/mq_unlink.c | 6 +-
sched/os_start.c | 2 +-
sched/pthread_condtimedwait.c | 14 ++-
sched/pthread_create.c | 8 +-
sched/pthread_getspecific.c | 6 ++
sched/pthread_keycreate.c | 6 ++
sched/pthread_keydelete.c | 3 +
sched/pthread_setspecific.c | 8 ++
sched/sched_free.c | 2 +-
sched/sched_setparam.c | 12 +--
sched/sched_setscheduler.c | 2 +-
sched/sem_open.c | 5 +
sched/sem_post.c | 6 +-
sched/sem_trywait.c | 6 +-
sched/sem_wait.c | 6 +-
sched/sem_waitirq.c | 2 +-
sched/sig_allocatependingsigaction.c | 4 +-
sched/sig_deliver.c | 12 +--
sched/sig_mqnotempty.c | 22 ++++-
sched/sig_pending.c | 2 +-
sched/sig_procmask.c | 8 +-
sched/sig_received.c | 23 ++---
sched/sig_releasependingsigaction.c | 2 +-
sched/sig_releasependingsignal.c | 2 +-
sched/sig_removependingsignal.c | 5 +-
sched/sig_suspend.c | 2 +-
sched/sig_timedwait.c | 49 +++++++---
sched/task_create.c | 6 +-
sched/task_delete.c | 8 +-
sched/task_restart.c | 8 +-
sched/wd_cancel.c | 8 +-
sched/wd_create.c | 4 +-
sched/wd_delete.c | 2 +-
sched/wd_internal.h | 7 +-
sched/wd_start.c | 126 ++++++++++++++++++++------
90 files changed, 789 insertions(+), 348 deletions(-)
create mode 100644 sched/get_errorptr.c
diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html
index 213f75d751..8396651c66 100644
--- a/Documentation/NuttxUserGuide.html
+++ b/Documentation/NuttxUserGuide.html
@@ -1806,7 +1806,7 @@ initialization time).
Function Prototype:
#include <wdog.h>
- STATUS wd_delete (WDOG_ID wdId);
+ STATUS wd_delete (WDOG_ID wdog);
@@ -1816,7 +1816,7 @@ has been started.
Input Parameters:
-- wdId. The watchdog ID to delete. This is actually a
+
- wdog. The watchdog ID to delete. This is actually a
pointer to a watchdog structure.
@@ -1834,7 +1834,7 @@ it.
POSIX Compatibility: This is a NON-POSIX interface.
VxWorks provides the following comparable interface:
- STATUS wdDelete (WDOG_ID wdId);
+ STATUS wdDelete (WDOG_ID wdog);
@@ -1850,8 +1850,8 @@ before de-allocating it (i.e., never returns ERROR).
Function Prototype:
#include <wdog.h>
- STATUS wd_start( WDOG_ID wdId, int delay, wdentry_t wdentry,
- int parm1, int parm2, int parm3, int parm4 );
+ STATUS wd_start( WDOG_ID wdog, int delay, wdentry_t wdentry,
+ intt argc, ....);
@@ -1867,15 +1867,16 @@ was called.
Watchdog timers execute only once.
To replace either the timeout delay or the function to be executed,
-call wd_start again with the same wdId; only the most recent
+call wd_start again with the same wdog; only the most recent
wd_start() on a given watchdog ID has any effect.
Input Parameters:
-- wdId. Watchdog ID
+
- wdog. Watchdog ID
- delay. Delay count in clock ticks
- wdentry. Function to call on timeout
-
- parm1..4. Parameters to pass to wdentry
+
- argc. The number of uint32 parameters to pass to wdentry.
+
- .... uint32 size parameters to pass to wdentry
@@ -1892,14 +1893,15 @@ restrictions.
POSIX Compatibility: This is a NON-POSIX interface.
VxWorks provides the following comparable interface:
- STATUS wdStart (WDOG_ID wdId, int delay, FUNCPTR wdentry, int parameter);
+ STATUS wdStart (WDOG_ID wdog, int delay, FUNCPTR wdentry, int parameter);
Differences from the VxWorks interface include:
-- The present implementation supports four parameters passed
-to wdentry; VxWorks supports only a single parameter.
+
- The present implementation supports multiple parameters passed
+to wdentry; VxWorks supports only a single parameter. The maximum
+number of parameters is determined by
2.6.4 wd_cancel
@@ -1908,7 +1910,7 @@ to wdentry; VxWorks supports only a single parameter.
Function Prototype:
#include <wdog.h>
- STATUS wd_cancel (WDOG_ID wdId);
+ STATUS wd_cancel (WDOG_ID wdog);
@@ -1918,7 +1920,7 @@ level.
Input Parameters:
-- wdId. ID of the watchdog to cancel.
+
- wdog. ID of the watchdog to cancel.
@@ -1933,7 +1935,7 @@ level.
POSIX Compatibility: This is a NON-POSIX interface.
VxWorks provides the following comparable interface:
- STATUS wdCancel (WDOG_ID wdId);
+ STATUS wdCancel (WDOG_ID wdog);
@@ -4073,6 +4075,39 @@ notify a task when a message is available on a queue.
int sigev_notify;
};
+
+3.4.9 Watchdog Data Types
+
+
+ When a watchdog expires, the callback function with this
+ type is called:
+
+
+ typedef void (*wdentry_t)(int argc, ...);
+
+
+ Where argc is the number of uint32 type arguments that follow.
+
+ The arguments are passed as uint32 values.
+ For systems where the sizeof(pointer) < sizeof(uint32), the
+ following union defines the alignment of the pointer within the
+ uint32. For example, the SDCC MCS51 general pointer is
+ 24-bits, but uint32 is 32-bits (of course).
+