diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-31 17:59:22 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-31 17:59:22 +0000 |
commit | 8a99a139ba3683e981c9e71c57f7fce313d92cae (patch) | |
tree | 2dfeb694139cc0dbfcbb69bcbaae8ff6ddecbdd3 /nuttx/include | |
parent | b1fd89b2e088a49381c698ef69904124605e81dc (diff) | |
download | nuttx-8a99a139ba3683e981c9e71c57f7fce313d92cae.tar.gz nuttx-8a99a139ba3683e981c9e71c57f7fce313d92cae.tar.bz2 nuttx-8a99a139ba3683e981c9e71c57f7fce313d92cae.zip |
Z16F integration changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@595 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/compiler.h | 2 | ||||
-rw-r--r-- | nuttx/include/nuttx/sched.h | 12 | ||||
-rw-r--r-- | nuttx/include/semaphore.h | 47 | ||||
-rw-r--r-- | nuttx/include/signal.h | 24 | ||||
-rw-r--r-- | nuttx/include/unistd.h | 30 | ||||
-rw-r--r-- | nuttx/include/wdog.h | 39 |
6 files changed, 75 insertions, 79 deletions
diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h index 91f7c4d0b..10f0c1802 100644 --- a/nuttx/include/nuttx/compiler.h +++ b/nuttx/include/nuttx/compiler.h @@ -263,7 +263,7 @@ # define FAR _Far # define NEAR _Near # define DSEG _Far -# define CODE _Near +# define CODE _Far /* Select the large, 32-bit addressing model */ diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h index 4548b3365..c3cc5d809 100644 --- a/nuttx/include/nuttx/sched.h +++ b/nuttx/include/nuttx/sched.h @@ -75,16 +75,14 @@ /* General Task Management Types ************************************************/ -/* This is the type of the task_state field of the TCB. - * NOTE: the order and content of this enumeration is - * critical since there are some OS tables indexed by these - * values. +/* This is the type of the task_state field of the TCB. NOTE: the order and + * content of this enumeration is critical since there are some OS tables indexed + * by these values. The range of values is assumed to fit into a ubyte in _TCB. */ enum tstate_e { - TSTATE_TASK_INVALID = 0, /* INVALID - The TCB is is not in a valid state - * (Uninitialized or between context switches) */ + TSTATE_TASK_INVALID = 0, /* INVALID - The TCB is uninitialized */ TSTATE_TASK_PENDING = 1, /* READY_TO_RUN - Pending preemption unlock */ TSTATE_TASK_READYTORUN = 2, /* READY-TO-RUN - But not running */ TSTATE_TASK_RUNNING = 3, /* READY_TO_RUN - And running */ @@ -179,7 +177,7 @@ struct _TCB entry_t entry; /* Entry Point into the thread */ exitfunc_t exitfunc; /* Called if exit is called. */ ubyte sched_priority; /* Current priority of the thread */ - tstate_t task_state; /* Current state of the thread */ + ubyte task_state; /* Current state of the thread */ uint16 flags; /* Misc. general status flags */ sint16 lockcount; /* 0=preemptable (not-locked) */ #ifndef CONFIG_DISABLE_PTHREAD diff --git a/nuttx/include/semaphore.h b/nuttx/include/semaphore.h index 565acaf31..bd2a24db1 100644 --- a/nuttx/include/semaphore.h +++ b/nuttx/include/semaphore.h @@ -1,7 +1,7 @@ -/************************************************************ - * semaphore.h +/**************************************************************************** + * include/semaphore.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,14 +31,14 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ #ifndef __SEMAPHORE_H #define __SEMAPHORE_H -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <limits.h> @@ -50,13 +50,13 @@ extern "C" { #define EXTERN extern #endif -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Type Declarations - ************************************************************/ + ****************************************************************************/ /* This is the generic semaphore structure. */ @@ -67,25 +67,25 @@ struct sem_s }; typedef struct sem_s sem_t; -/************************************************************ +/**************************************************************************** * Public Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Function Prototypes - ************************************************************/ + ****************************************************************************/ /* Counting Semaphore Interfaces (based on POSIX APIs) */ -EXTERN int sem_init(sem_t *sem, int pshared, unsigned int value); -EXTERN int sem_destroy(sem_t *sem); -EXTERN FAR sem_t *sem_open(const char *name, int oflag, ...); +EXTERN int sem_init(FAR sem_t *sem, int pshared, unsigned int value); +EXTERN int sem_destroy(FAR sem_t *sem); +EXTERN FAR sem_t *sem_open(FAR const char *name, int oflag, ...); EXTERN int sem_close(FAR sem_t *sem); -EXTERN int sem_unlink(const char *name); -EXTERN int sem_wait(sem_t *sem); -EXTERN int sem_trywait(sem_t *sem); -EXTERN int sem_post(sem_t *sem); -EXTERN int sem_getvalue(sem_t *sem, int *sval); +EXTERN int sem_unlink(FAR const char *name); +EXTERN int sem_wait(FAR sem_t *sem); +EXTERN int sem_trywait(FAR sem_t *sem); +EXTERN int sem_post(FAR sem_t *sem); +EXTERN int sem_getvalue(FAR sem_t *sem, FAR int *sval); #undef EXTERN #ifdef __cplusplus @@ -93,4 +93,3 @@ EXTERN int sem_getvalue(sem_t *sem, int *sval); #endif #endif /* __SEMAPHORE_H */ - diff --git a/nuttx/include/signal.h b/nuttx/include/signal.h index 76963784f..ee3e7d6de 100644 --- a/nuttx/include/signal.h +++ b/nuttx/include/signal.h @@ -177,18 +177,18 @@ extern "C" { #endif EXTERN int kill(pid_t, int); -EXTERN int sigemptyset(sigset_t *set); -EXTERN int sigfillset(sigset_t *set); -EXTERN int sigaddset(sigset_t *set, int signo); -EXTERN int sigdelset(sigset_t *set, int signo); -EXTERN int sigismember(const sigset_t *set, int signo); -EXTERN int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); -EXTERN int sigprocmask(int how, const sigset_t *set, sigset_t *oset); -EXTERN int sigpending(sigset_t *set); -EXTERN int sigsuspend(const sigset_t *sigmask); -EXTERN int sigwaitinfo(const sigset_t *set, struct siginfo *value); -EXTERN int sigtimedwait(const sigset_t *set, struct siginfo *value, - const struct timespec *timeout); +EXTERN int sigemptyset(FAR sigset_t *set); +EXTERN int sigfillset(FAR sigset_t *set); +EXTERN int sigaddset(FAR sigset_t *set, int signo); +EXTERN int sigdelset(FAR sigset_t *set, int signo); +EXTERN int sigismember(FAR const sigset_t *set, int signo); +EXTERN int sigaction(int sig, FAR const struct sigaction *act, FAR struct sigaction *oact); +EXTERN int sigprocmask(int how, FAR const sigset_t *set, FAR sigset_t *oset); +EXTERN int sigpending(FAR sigset_t *set); +EXTERN int sigsuspend(FAR const sigset_t *sigmask); +EXTERN int sigwaitinfo(FAR const sigset_t *set, FAR struct siginfo *value); +EXTERN int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *value, + FAR const struct timespec *timeout); #ifdef CONFIG_CAN_PASS_STRUCTS EXTERN int sigqueue(int pid, int signo, union sigval value); #else diff --git a/nuttx/include/unistd.h b/nuttx/include/unistd.h index ef5bc26b2..8351b8c45 100644 --- a/nuttx/include/unistd.h +++ b/nuttx/include/unistd.h @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * unistd.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,21 +31,21 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ #ifndef __UNISTD_H #define __UNISTD_H -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <nuttx/compiler.h> -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ /* The number of functions that may be registerd to be called * at program exit. @@ -96,9 +96,9 @@ #define fdatasync(f) fsync(f) -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ #undef EXTERN #if defined(__cplusplus) @@ -110,13 +110,13 @@ extern "C" { /* Used by getopt (obviously NOT thread safe!) */ -EXTERN char *optarg; /* Optional argument following option */ -EXTERN int optind; /* Index into argv */ -EXTERN int optopt; /* unrecognized option character */ +EXTERN FAR char *optarg; /* Optional argument following option */ +EXTERN int optind; /* Index into argv */ +EXTERN int optopt; /* unrecognized option character */ -/************************************************************ +/**************************************************************************** * Global Function Prototypes - ************************************************************/ + ****************************************************************************/ /* Task Control Interfaces */ diff --git a/nuttx/include/wdog.h b/nuttx/include/wdog.h index d54c66fed..5056ab4cf 100644 --- a/nuttx/include/wdog.h +++ b/nuttx/include/wdog.h @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * wdog.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,29 +31,29 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ #ifndef __WDOG_H #define __WDOG_H -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> #include <sched.h> -/************************************************************ +/**************************************************************************** * Compilations Switches - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Type Declarations - ************************************************************/ + ****************************************************************************/ /* The arguments are passed as uint32 values. For systems * where the sizeof(pointer) < sizeof(uint32), the following @@ -67,8 +67,8 @@ union wdparm_u { - void *pvarg; - uint32 *dwarg; + FAR void *pvarg; + FAR uint32 *dwarg; }; typedef union wdparm_u wdparm_t; @@ -76,19 +76,19 @@ typedef union wdparm_u wdparm_t; * watchdog function expires. Up to four parameters may be passed. */ -typedef void (*wdentry_t)(int argc, uint32 arg1, ...); +typedef CODE void (*wdentry_t)(int argc, uint32 arg1, ...); /* Watchdog 'handle' */ typedef FAR struct wdog_s *WDOG_ID; -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Function Prototypes - ************************************************************/ + ****************************************************************************/ #ifdef __cplusplus #define EXTERN extern "C" @@ -110,4 +110,3 @@ EXTERN int wd_gettime(WDOG_ID wdog); #endif #endif /* _WDOG_H_ */ - |