diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-02 21:27:47 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-02 21:27:47 +0000 |
commit | 36727bb989aaf6110386f75262bd6a5f6dbec809 (patch) | |
tree | 031ccc9da4a48ac560992ebbc80cfe201eb4eb15 /nuttx/include | |
parent | f06ed1467da35379a46c5fce7535c35d1811b888 (diff) | |
download | px4-nuttx-36727bb989aaf6110386f75262bd6a5f6dbec809.tar.gz px4-nuttx-36727bb989aaf6110386f75262bd6a5f6dbec809.tar.bz2 px4-nuttx-36727bb989aaf6110386f75262bd6a5f6dbec809.zip |
Code complete for 8051 (not tested)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@29 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/arch.h | 8 | ||||
-rw-r--r-- | nuttx/include/nuttx/irq.h | 4 | ||||
-rw-r--r-- | nuttx/include/sched.h | 15 | ||||
-rw-r--r-- | nuttx/include/string.h | 10 |
4 files changed, 28 insertions, 9 deletions
diff --git a/nuttx/include/nuttx/arch.h b/nuttx/include/nuttx/arch.h index 11e6a96fc..a243a3f6a 100644 --- a/nuttx/include/nuttx/arch.h +++ b/nuttx/include/nuttx/arch.h @@ -150,7 +150,9 @@ EXTERN void up_initial_state(FAR _TCB *tcb); * must be allocated. ************************************************************/ +#ifndef CONFIG_CUSTOM_STACK EXTERN STATUS up_create_stack(FAR _TCB *tcb, size_t stack_size); +#endif /************************************************************ * Name: up_use_stack @@ -173,7 +175,9 @@ EXTERN STATUS up_create_stack(FAR _TCB *tcb, size_t stack_size); * ************************************************************/ +#ifndef CONFIG_CUSTOM_STACK EXTERN STATUS up_use_stack(FAR _TCB *tcb, FAR void *stack, size_t stack_size); +#endif /************************************************************ * Name: up_release_stack @@ -184,7 +188,9 @@ EXTERN STATUS up_use_stack(FAR _TCB *tcb, FAR void *stack, size_t stack_size); * ************************************************************/ +#ifndef CONFIG_CUSTOM_STACK EXTERN void up_release_stack(FAR _TCB *dtcb); +#endif /************************************************************ * Name: up_unblock_task @@ -314,7 +320,9 @@ EXTERN void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority); * ************************************************************/ +#ifndef CONFIG_DISABLE_SIGNALS EXTERN void up_schedule_sigaction(FAR _TCB *tcb, sig_deliver_t sigdeliver); +#endif /************************************************************ * Name: up_allocate_heap diff --git a/nuttx/include/nuttx/irq.h b/nuttx/include/nuttx/irq.h index a806adb15..e9b66293c 100644 --- a/nuttx/include/nuttx/irq.h +++ b/nuttx/include/nuttx/irq.h @@ -73,10 +73,6 @@ typedef int (*swint_t)(int code, int parm2, int parm3, * Public Variables ************************************************************/ -#ifndef __ASSEMBLY__ -struct xcptcontext *current_xcp; -#endif - /************************************************************ * Public Function Prototypes ************************************************************/ diff --git a/nuttx/include/sched.h b/nuttx/include/sched.h index f83cfbe53..0cf8d58d5 100644 --- a/nuttx/include/sched.h +++ b/nuttx/include/sched.h @@ -190,6 +190,7 @@ struct _TCB /* Stack-Related Fields *********************************************/ +#ifndef CONFIG_CUSTOM_STACK size_t adj_stack_size; /* Stack size after adjustment */ /* for hardware, processor, etc. */ /* (for debug purposes only) */ @@ -197,6 +198,7 @@ struct _TCB /* Need to deallocate stack */ FAR void *adj_stack_ptr; /* Adjusted StatckAllocPtr for HW */ /* The initial stack pointer value */ +#endif /* POSIX thread Specific Data ***************************************/ @@ -269,14 +271,27 @@ extern "C" { /* Task Control Interfaces (non-standard) */ +#ifndef CONFIG_CUSTOM_STACK EXTERN STATUS task_init(FAR _TCB *tcb, const char *name, int priority, FAR uint32 *stack, uint32 stack_size, main_t entry, FAR char *arg1, FAR char *arg2, FAR char *arg3, FAR char *arg4); +#else +EXTERN STATUS task_init(FAR _TCB *tcb, const char *name, int priority, + main_t entry, + FAR char *arg1, FAR char *arg2, + FAR char *arg3, FAR char *arg4); +#endif EXTERN STATUS task_activate(FAR _TCB *tcb); +#ifndef CONFIG_CUSTOM_STACK EXTERN int task_create(const char *name, int priority, int stack_size, main_t main, FAR char *arg1, FAR char *arg2, FAR char *arg3, FAR char *arg4); +#else +EXTERN int task_create(const char *name, int priority, main_t main, + FAR char *arg1, FAR char *arg2, + FAR char *arg3, FAR char *arg4); +#endif EXTERN STATUS task_delete(pid_t pid); EXTERN STATUS task_restart(pid_t pid); diff --git a/nuttx/include/string.h b/nuttx/include/string.h index 0b05eccc5..a5c1a1a9e 100644 --- a/nuttx/include/string.h +++ b/nuttx/include/string.h @@ -74,12 +74,12 @@ EXTERN char *strrchr(const char *, int); EXTERN size_t strspn(const char *, const char *); EXTERN size_t strcspn(const char *, const char *); EXTERN char *strstr(const char *, const char *); -EXTERN char *strtok(FAR char *, const char *); +EXTERN char *strtok(char *, const char *); -EXTERN void *memset(FAR void *s, int c, size_t n); -EXTERN void *memcpy(FAR void *dest, FAR const void *src, size_t n); -EXTERN int memcmp(FAR const void *s1, FAR const void *s2, size_t n); -EXTERN void *memmove(FAR void *dest, FAR const void *src, size_t count); +EXTERN void *memset(void *s, int c, size_t n); +EXTERN void *memcpy(void *dest, const void *src, size_t n); +EXTERN int memcmp(const void *s1, const void *s2, size_t n); +EXTERN void *memmove(void *dest, const void *src, size_t count); #ifndef CONFIG_ARCH_BZERO # define bzero(s,n) (void)memset(s,0,n) |