diff --git a/ChangeLog b/ChangeLog index 0788d88dac6..290942b12b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -990,4 +990,9 @@ can be used with any file system. Good performance of this layer will depend upon functioning write buffer support! NOTE: FTL support is untested as of the initial check-in. + * Numerous minor changes for m68hc12 to eliminate compilation errors and + warnings due to the fact that it uses 16-bit integer types and for casts + between uint32 (32-bits) and an mc68hc12 pointer (16-bits). + * sys/types: Size of off_t and blkcnt_t should not depend on size of + int in the architecture; Removed non-standard type STATUS diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 00b100abb00..bbe8fb6b518 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: December 5 2009

+

Last Updated: December 13, 2009

@@ -1616,6 +1616,11 @@ nuttx-2010.1 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> can be used with any file system. Good performance of this layer will depend upon functioning write buffer support! NOTE: FTL support is untested as of the initial check-in. + * Numerous minor changes for m68hc12 to eliminate compilation errors and + warnings due to the fact that it uses 16-bit integer types and for casts + between uint32 (32-bits) and an mc68hc12 pointer (16-bits). + * sys/types: Size of off_t and blkcnt_t should not depend on size of + int in the architecture; Removed non-standard type STATUS pascal-2010.1 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index de45bf743dd..a7880d8f8d2 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -438,8 +438,10 @@
  • arch/arm/include/lpc214x and arch/arm/src/lpc214x: These directories provide support for NXP LPC214x family of processors. - STATUS: This port is in progress and should be available in the - nuttx-0.2.5 release. + STATUS: This port boots and passes the OS test (examples/ostest). + The port is complete and verified. As of NuttX 0.3.17, the port includes: + timer interrupts, serial console, USB driver, and SPI-based MMC/SD card + support. A verified NuttShell configuration is also available.
  • @@ -700,7 +702,14 @@
  • configs/us7032evb1: This is a port of the Hitachi SH-1 on the Hitachi SH-1/US7032EVB1 board. - STATUS: Work has just began on this port. + STATUS: This port is available as of release 0.3.18 of NuttX. The port is basically + complete and many examples run correctly. However, there are remaining instabilities + that make the port un-usable. The nature of these is not understood; the behavior is + that certain SH-1 instructions stop working as advertised. This could be a silicon + problem, some pipeline issue that is not handled properly by the gcc 3.4.5 toolchain + (which has very limited SH-1 support to begin with), or perhaps with the CMON debugger. + At any rate, I have exhausted all of the energy that I am willing to put into this cool + old processor for the time being.
  • configs/xtrs: diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html index 3a3eafe3ea8..5d477c8cfc3 100644 --- a/Documentation/NuttxUserGuide.html +++ b/Documentation/NuttxUserGuide.html @@ -13,7 +13,7 @@

    NuttX Operating System

    User's Manual

    by

    Gregory Nutt

    -

    Last Updated: May 22, 2009

    +

    Last Updated: December 13, 2009

    @@ -296,8 +296,8 @@ VxWorks provides the following similar interface: Function Prototype:
        #include <sched.h>
    -   STATUS task_init(_TCB *tcb, char *name, int priority, uint32 *stack, uint32 stack_size,
    -                    maint_t entry, const char *argv[]);
    +   int task_init(_TCB *tcb, char *name, int priority, uint32 *stack, uint32 stack_size,
    +                 maint_t entry, const char *argv[]);
     

    @@ -368,7 +368,7 @@ VxWorks provides the following similar interface: Function Prototype:

         #include <sched.h>
    -    STATUS task_activate( _TCB *tcb );
    +    int task_activate( _TCB *tcb );
     

    @@ -418,7 +418,7 @@ the pointer to the WIND_TCB cast to an integer. Function Prototype:

         #include <sched.h>
    -    STATUS task_delete( pid_t pid );
    +    int task_delete( pid_t pid );
     

    @@ -514,7 +514,7 @@ And the UNIX interface: Function Prototype:

         #include <sched.h>
    -    STATUS task_restart( pid_t pid );
    +    int task_restart( pid_t pid );
     

    @@ -974,7 +974,7 @@ priority of the calling task is returned. Function Prototype:

         #include <sched.h>
    -    STATUS sched_lock( void );
    +    int sched_lock( void );
     

    @@ -994,7 +994,7 @@ number of times) or until it blocks itself.

    Assumptions/Limitations:

    - POSIX Compatibility: This is a NON-POSIX interface. +POSIX Compatibility: This is a NON-POSIX interface. VxWorks provides the comparable interface:

         STATUS taskLock( void );
    @@ -1006,7 +1006,7 @@ VxWorks provides the comparable interface:
     Function Prototype: 
     
         #include <sched.h>
    -    STATUS sched_unlock( void );
    +    int sched_unlock( void );
     

    @@ -1027,7 +1027,7 @@ eligible to preempt the current task will execute.

    Assumptions/Limitations:

    - POSIX Compatibility: This is a NON-POSIX interface. +POSIX Compatibility: This is a NON-POSIX interface. VxWorks provides the comparable interface:

         STATUS taskUnlock( void );
    @@ -2296,7 +2296,7 @@ initialization time).
     Function Prototype: 
     
         #include <wdog.h>
    -    STATUS wd_delete (WDOG_ID wdog);
    +    int wd_delete (WDOG_ID wdog);
     

    @@ -2321,7 +2321,7 @@ pointer to a watchdog structure. caller to assure that the watchdog is inactive before deleting it.

    - POSIX Compatibility: This is a NON-POSIX interface. +POSIX Compatibility: This is a NON-POSIX interface. VxWorks provides the following comparable interface:

         STATUS wdDelete (WDOG_ID wdog);
    @@ -2340,7 +2340,7 @@ before deallocating it (i.e., never returns ERROR).
     Function Prototype: 
     
         #include <wdog.h>
    -    STATUS wd_start( WDOG_ID wdog, int delay, wdentry_t wdentry,
    +    int wd_start( WDOG_ID wdog, int delay, wdentry_t wdentry,
                          intt argc, ....);
     
    @@ -2378,7 +2378,7 @@ wd_start() on a given watchdog ID has any effect. context of the timer interrupt handler and is subject to all ISR restrictions.

    - POSIX Compatibility: This is a NON-POSIX interface. +POSIX Compatibility: This is a NON-POSIX interface. VxWorks provides the following comparable interface:

         STATUS wdStart (WDOG_ID wdog, int delay, FUNCPTR wdentry, int parameter);
    @@ -2397,7 +2397,7 @@ number of parameters is determined by
     Function Prototype: 
     
         #include <wdog.h>
    -    STATUS wd_cancel (WDOG_ID wdog);
    +    int wd_cancel (WDOG_ID wdog);
     

    @@ -2419,7 +2419,7 @@ level.

    Assumptions/Limitations:

    - POSIX Compatibility: This is a NON-POSIX interface. +POSIX Compatibility: This is a NON-POSIX interface. VxWorks provides the following comparable interface:

         STATUS wdCancel (WDOG_ID wdog);
    @@ -7392,7 +7392,6 @@ interface include:
     
  • pid_t
  • size_t
  • sigset_t -
  • STATUS
  • time_t diff --git a/README.txt b/README.txt index 0e50bfcff9d..56f6e5b739d 100755 --- a/README.txt +++ b/README.txt @@ -9,20 +9,36 @@ README INSTALLATION ^^^^^^^^^^^^ -Download and unpack the NuttX tarball. If you are reading this, then you -have probably already done that. After unpacking, you will end up with a -directory called nuttx-version (where version is the NuttX version number). -You might want to rename that directory nuttx to match the various instructions -in the documentation and some scripts in the source tree. +Download and Unpack: -That nuttx build directory should reside in a path that contains no spaces -in the higher level directory names. For example, under Cygwin, your home -directory might be formed from your first and last names like: "/home/First Last". -That will cause strange errors when the make system tries to build. + Download and unpack the NuttX tarball. If you are reading this, then + you have probably already done that. After unpacking, you will end + up with a directory called nuttx-version (where version is the NuttX + version number). You might want to rename that directory nuttx to + match the various instructions in the documentation and some scripts + in the source tree. -[Actually, that is probably not to difficult to fix. Some Makefiles probably -just need some pathes within double quotes] + That nuttx build directory should reside in a path that contains no + spaces in the higher level directory names. For example, under + Cygwin, your home directory might be formed from your first and last + names like: "/home/First Last". That will cause strange errors when + the make system tries to build. + [Actually, that problem is probably not to difficult to fix. Some + Makefiles probably just need some pathes within double quotes] + +A Note about Header Files: + + NuttX compiles without using the standard header files that are + distributed with your toolchain. That is correct behavior in most + cases because the header files bundled with your toolchain (such as + stdio.h) are probably not correct for use with NuttX. Certain + header files, such as setjmp.h, may be needed from your toolchain. + In that case, one solution is to copy that file from your toolchain + into the NuttX include directory. If you prefer to use the stdint.h + and stdbool.h header files from your toolchain, those could be copied + too. Using most other header files from your toolchain would probably + cause errors. CONFIGURING NUTTX ^^^^^^^^^^^^^^^^^ diff --git a/TODO b/TODO index 9fab0128894..a418abf1584 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,5 @@ -NuttX TODO List (Last updated December 5, 2009) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +NuttX TODO List (Last updated December 13, 2009) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (5) Task/Scheduler (sched/) (2) Memory Managment (mm/) @@ -32,6 +32,7 @@ NuttX TODO List (Last updated December 5, 2009) (4) Renesas M16C/26 (arch/sh/src/m16c) (8) z80/z8/ez80 (arch/z80/) (8) z16 (arch/z16/) + (0) mc68hc1x (arch/hc) o Task/Scheduler (sched/) ^^^^^^^^^^^^^^^^^^^^^^^ @@ -734,7 +735,10 @@ o pjrc-8052 / MCS51 (arch/pjrc-8051/) examples/ostest/barrier.c around lines 53 and 74 examples/ostest/sighand.c at 225 and 244 driver/serial.c in usleep calls around 347 and 354 - Status: Open + Status: Open. Update: These were reviewed during the hcs12 port. The + hcs12 also has 16-bit integer types (if -mshort is in the CFLAGS). + I believe that the warnings in most of the above have been fixed + but this has not been verified on this platform). Priority: Medium Description Global data is not being initialized. Logic like that of SDCCs @@ -805,10 +809,11 @@ o Renesas M16C/26 (arch/sh/src/m16c) o z80/z8/ez80 (arch/z80) ^^^^^^^^^^^^^^^^^^^^^^^ - Description: The SDCC version the same problems with interger overflow during + Description: The SDCC version the same problems with integer overflow during compilation as described for pjrc-8051. At typical cause is code like - usleep(500*1000) which exceeds the range of a 16-bit integer - Status: See pjrc-8051 + usleep(500*1000) which exceeds the range of a 16-bit integer. + Status: See pjrc-8051. These have probably been fixed but have not yet + been verified on these platforms. Priority: See pjrc-8051 Description: The simulated Z80 serial console (configs/z80sim/src/z80_serial.c + @@ -976,5 +981,5 @@ o z16 (arch/z16) Status: Open Priority: Low - - +o mc68hc1x (arch/hc) + ^^^^^^^^^^^^^^^^^^ diff --git a/arch/arm/src/common/up_createstack.c b/arch/arm/src/common/up_createstack.c index c3e213eb434..e76e05696b6 100644 --- a/arch/arm/src/common/up_createstack.c +++ b/arch/arm/src/common/up_createstack.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/common/up_createstack.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 @@ -82,7 +82,7 @@ * must be allocated. ****************************************************************************/ -STATUS up_create_stack(_TCB *tcb, size_t stack_size) +int up_create_stack(_TCB *tcb, size_t stack_size) { if (tcb->stack_alloc_ptr && tcb->adj_stack_size != stack_size) diff --git a/arch/arm/src/common/up_usestack.c b/arch/arm/src/common/up_usestack.c index c67dd6ad0a0..bd7411f0ce1 100644 --- a/arch/arm/src/common/up_usestack.c +++ b/arch/arm/src/common/up_usestack.c @@ -78,7 +78,7 @@ * ****************************************************************************/ -STATUS up_use_stack(_TCB *tcb, void *stack, size_t stack_size) +int up_use_stack(_TCB *tcb, void *stack, size_t stack_size) { size_t top_of_stack; size_t size_of_stack; diff --git a/arch/hc/src/common/up_createstack.c b/arch/hc/src/common/up_createstack.c index 1f2cb691c06..4750c463bee 100755 --- a/arch/hc/src/common/up_createstack.c +++ b/arch/hc/src/common/up_createstack.c @@ -82,7 +82,7 @@ * ****************************************************************************/ -STATUS up_create_stack(_TCB *tcb, size_t stack_size) +int up_create_stack(_TCB *tcb, size_t stack_size) { if (tcb->stack_alloc_ptr && tcb->adj_stack_size != stack_size) { diff --git a/arch/hc/src/common/up_usestack.c b/arch/hc/src/common/up_usestack.c index 51b3c1622ac..ab7109a8c21 100755 --- a/arch/hc/src/common/up_usestack.c +++ b/arch/hc/src/common/up_usestack.c @@ -77,7 +77,7 @@ * ****************************************************************************/ -STATUS up_use_stack(_TCB *tcb, void *stack, size_t stack_size) +int up_use_stack(_TCB *tcb, void *stack, size_t stack_size) { size_t top_of_stack; size_t size_of_stack; diff --git a/arch/sh/src/common/up_createstack.c b/arch/sh/src/common/up_createstack.c index 1a1ecb8d83b..853601726f1 100644 --- a/arch/sh/src/common/up_createstack.c +++ b/arch/sh/src/common/up_createstack.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sh/src/common/up_createstack.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -82,7 +82,7 @@ * must be allocated. ****************************************************************************/ -STATUS up_create_stack(_TCB *tcb, size_t stack_size) +int up_create_stack(_TCB *tcb, size_t stack_size) { if (tcb->stack_alloc_ptr && tcb->adj_stack_size != stack_size) diff --git a/arch/sh/src/common/up_usestack.c b/arch/sh/src/common/up_usestack.c index 5fd8acb8a90..226d5f52f77 100644 --- a/arch/sh/src/common/up_usestack.c +++ b/arch/sh/src/common/up_usestack.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sh/src/common/up_usestack.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -78,7 +78,7 @@ * ****************************************************************************/ -STATUS up_use_stack(_TCB *tcb, void *stack, size_t stack_size) +int up_use_stack(_TCB *tcb, void *stack, size_t stack_size) { size_t top_of_stack; size_t size_of_stack; diff --git a/arch/sim/src/up_createstack.c b/arch/sim/src/up_createstack.c index f0aa8fdf6b1..4d31701a157 100644 --- a/arch/sim/src/up_createstack.c +++ b/arch/sim/src/up_createstack.c @@ -1,7 +1,7 @@ /**************************************************************************** - * up_createstack.c + * arch/sim/src/up_createstack.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 @@ -81,9 +81,9 @@ * ****************************************************************************/ -STATUS up_create_stack(_TCB *tcb, size_t stack_size) +int up_create_stack(_TCB *tcb, size_t stack_size) { - STATUS ret = ERROR; + int ret = ERROR; /* Move up to next even word boundary if necessary */ diff --git a/arch/sim/src/up_usestack.c b/arch/sim/src/up_usestack.c index e28cac3129f..309dc2dc40e 100644 --- a/arch/sim/src/up_usestack.c +++ b/arch/sim/src/up_usestack.c @@ -1,7 +1,7 @@ /**************************************************************************** - * up_usestack.c + * arch/sim/src/up_usestack.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 @@ -81,7 +81,7 @@ * ****************************************************************************/ -STATUS up_use_stack(_TCB *tcb, void *stack, size_t stack_size) +int up_use_stack(_TCB *tcb, void *stack, size_t stack_size) { /* Move up to next even word boundary if necessary */ diff --git a/arch/z16/src/common/up_createstack.c b/arch/z16/src/common/up_createstack.c index 68c3da28fc4..166ae25e100 100644 --- a/arch/z16/src/common/up_createstack.c +++ b/arch/z16/src/common/up_createstack.c @@ -1,7 +1,7 @@ /**************************************************************************** - * common/up_createstack.c + * arch/z16/common/up_createstack.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -83,7 +83,7 @@ * must be allocated. ****************************************************************************/ -STATUS up_create_stack(_TCB *tcb, size_t stack_size) +int up_create_stack(_TCB *tcb, size_t stack_size) { if (tcb->stack_alloc_ptr && tcb->adj_stack_size != stack_size) diff --git a/arch/z16/src/common/up_usestack.c b/arch/z16/src/common/up_usestack.c index d633fa294d0..c65c4e4b91c 100644 --- a/arch/z16/src/common/up_usestack.c +++ b/arch/z16/src/common/up_usestack.c @@ -1,7 +1,7 @@ /************************************************************ - * common/up_usestack.c + * arch/z16/common/up_usestack.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -78,7 +78,7 @@ * ************************************************************/ -STATUS up_use_stack(_TCB *tcb, void *stack, size_t stack_size) +int up_use_stack(_TCB *tcb, void *stack, size_t stack_size) { size_t top_of_stack; size_t size_of_stack; diff --git a/arch/z80/src/common/up_createstack.c b/arch/z80/src/common/up_createstack.c index dc3f715c99f..1c2d08b1fe7 100644 --- a/arch/z80/src/common/up_createstack.c +++ b/arch/z80/src/common/up_createstack.c @@ -1,7 +1,7 @@ /**************************************************************************** - * common/up_createstack.c + * arch/z80/src/common/up_createstack.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 @@ -79,7 +79,7 @@ * must be allocated. ****************************************************************************/ -STATUS up_create_stack(_TCB *tcb, size_t stack_size) +int up_create_stack(_TCB *tcb, size_t stack_size) { if (tcb->stack_alloc_ptr && tcb->adj_stack_size != stack_size) diff --git a/arch/z80/src/common/up_usestack.c b/arch/z80/src/common/up_usestack.c index de8e7e87cf8..c73e99bc132 100644 --- a/arch/z80/src/common/up_usestack.c +++ b/arch/z80/src/common/up_usestack.c @@ -1,7 +1,7 @@ /************************************************************ - * common/up_usestack.c + * arch/z80/src/common/up_usestack.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 @@ -78,7 +78,7 @@ * ************************************************************/ -STATUS up_use_stack(_TCB *tcb, void *stack, size_t stack_size) +int up_use_stack(_TCB *tcb, void *stack, size_t stack_size) { size_t top_of_stack; size_t size_of_stack; diff --git a/configs/demo9s12ne64/README.txt b/configs/demo9s12ne64/README.txt index ef063b78419..72b2c581d40 100755 --- a/configs/demo9s12ne64/README.txt +++ b/configs/demo9s12ne64/README.txt @@ -191,6 +191,48 @@ FreeScale HCS12 Serial Monitor therefore keep the normal (non-monitor) vector locations (0xff80–0xfffe). +Soft Registers +^^^^^^^^^^^^^^ + + The mc68hcs12 compilation is prone to errors like the following: + + CC: lib_b16sin.c + lib_b16sin.c: In function `b16sin': + lib_b16sin.c:110: error: unable to find a register to spill in class `S_REGS' + lib_b16sin.c:110: error: this is the insn: + (insn:HI 41 46 44 8 (parallel [ + (set (subreg:SI (reg:DI 58 [ rad ]) 4) + (reg/v:SI 54 [ rad ])) + (clobber (scratch:HI)) + ]) 20 {movsi_internal} (insn_list 46 (nil)) + (expr_list:REG_UNUSED (scratch:HI) + (expr_list:REG_NO_CONFLICT (reg/v:SI 54 [ rad ]) + (nil)))) + lib_b16sin.c:110: confused by earlier errors, bailing out + + There are several ways that this error could be fixed: + + 1. Increase the number of soft regiaters (i.e., "fake" registers defined + at fixed memory locations). This can be done by adding something like + -msoft-reg-count=4 to the CFLAGS. This approach was not taken + because: + + - This slows hcs12 performance + - All of these soft registers wouil have to be saved and restored + on every interrupt and context switch. + + 2. Lowering the optimization level. Also not desireable becauase 99% of the + files that do not have this problem also increase in size. Special case + compilation with reduced optimization levels just for the files that need + it could be done, but this would complicate the make system. + + 3. Restructuring files to reduce the complexity. If you add local variables + to hold intermediate computational results, this error can be eliminated. + This is the approach taken in NuttX. It has disadvantages only in that + (1) it takes some effort and good guessing to eliminate the problem, and (2) + the problem is not really eliminated -- it can and will re-occur when files + are changed or new files are added. + HCS12/DEMO9S12NEC64-specific Configuration Options ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/fs/fs_inoderemove.c b/fs/fs_inoderemove.c index 1dcfce467ff..2034234dbdc 100644 --- a/fs/fs_inoderemove.c +++ b/fs/fs_inoderemove.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/fs_inoderemove.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 @@ -105,7 +105,7 @@ static void inode_unlink(struct inode *node, * NOTE: Caller must hold the inode semaphore ****************************************************************************/ -STATUS inode_remove(const char *path) +int inode_remove(const char *path) { const char *name = path; FAR struct inode *node; diff --git a/fs/fs_internal.h b/fs/fs_internal.h index 34b722e9821..48849436f3d 100644 --- a/fs/fs_internal.h +++ b/fs/fs_internal.h @@ -1,7 +1,7 @@ /**************************************************************************** - * fs_internal.h + * fs/fs_internal.h * - * Copyright (C) 2007 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 @@ -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. * @@ -208,7 +208,7 @@ EXTERN FAR struct inode *inode_reserve(const char *path); /* fs_inoderemove.c **********************************************************/ -EXTERN STATUS inode_remove(const char *path); +EXTERN int inode_remove(const char *path); /* fs_inodefind.c ************************************************************/ diff --git a/fs/fs_registerblockdriver.c b/fs/fs_registerblockdriver.c index aad6a922456..248e3e2a74c 100644 --- a/fs/fs_registerblockdriver.c +++ b/fs/fs_registerblockdriver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * fs_registerblockdriver.c + * fs/fs_registerblockdriver.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -67,12 +67,12 @@ * Name: register_driver ****************************************************************************/ -STATUS register_blockdriver(const char *path, +int register_blockdriver(const char *path, const struct block_operations *bops, mode_t mode, void *priv) { struct inode *node; - STATUS ret = -ENOMEM; + int ret = -ENOMEM; /* Insert an inode for the device driver -- we need to hold the inode semaphore * to prevent access to the tree while we this. This is because we will have a diff --git a/fs/fs_registerdriver.c b/fs/fs_registerdriver.c index 5299ba28d2f..7b3520435f8 100644 --- a/fs/fs_registerdriver.c +++ b/fs/fs_registerdriver.c @@ -67,11 +67,11 @@ * Name: register_driver ****************************************************************************/ -STATUS register_driver(const char *path, const struct file_operations *fops, +int register_driver(const char *path, const struct file_operations *fops, mode_t mode, void *priv) { struct inode *node; - STATUS ret = ERROR; + int ret = ERROR; /* Insert a dummy node -- we need to hold the inode semaphore * to do this because we will have a momentarily bad structure. diff --git a/fs/fs_unregisterblockdriver.c b/fs/fs_unregisterblockdriver.c index 2e0bc667315..cb737f2e348 100644 --- a/fs/fs_unregisterblockdriver.c +++ b/fs/fs_unregisterblockdriver.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/fs_unregisterblockdriver.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 @@ -71,9 +71,9 @@ * Name: unregister_blockdriver() ****************************************************************************/ -STATUS unregister_blockdriver(const char *path) +int unregister_blockdriver(const char *path) { - STATUS ret; + int ret; inode_semtake(); ret = inode_remove(path); inode_semgive(); diff --git a/fs/fs_unregisterdriver.c b/fs/fs_unregisterdriver.c index 377154263e3..2455742db99 100644 --- a/fs/fs_unregisterdriver.c +++ b/fs/fs_unregisterdriver.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/fs_unregisterdriver.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 @@ -71,9 +71,9 @@ * Name: unregister_driver() ****************************************************************************/ -STATUS unregister_driver(const char *path) +int unregister_driver(const char *path) { - STATUS ret; + int ret; inode_semtake(); ret = inode_remove(path); inode_semgive(); diff --git a/include/cxx/cstddef b/include/cxx/cstddef index d932eecf009..a3c474a6c33 100755 --- a/include/cxx/cstddef +++ b/include/cxx/cstddef @@ -87,7 +87,6 @@ namespace std using ::gid_t; using ::dev_t; using ::ino_t; - using ::sig_atomic_t; using ::pid_t; using ::socklen_t; diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index a1182b19846..6e855c82f89 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -1,5 +1,5 @@ /**************************************************************************** - * nuttx/arch.h + * include/nuttx/arch.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -152,7 +152,7 @@ EXTERN void up_initial_state(FAR _TCB *tcb); ****************************************************************************/ #ifndef CONFIG_CUSTOM_STACK -EXTERN STATUS up_create_stack(FAR _TCB *tcb, size_t stack_size); +EXTERN int up_create_stack(FAR _TCB *tcb, size_t stack_size); #endif /**************************************************************************** @@ -177,7 +177,7 @@ 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); +EXTERN int up_use_stack(FAR _TCB *tcb, FAR void *stack, size_t stack_size); #endif /**************************************************************************** diff --git a/include/nuttx/fs.h b/include/nuttx/fs.h index a0c70390ddf..2f399d2d298 100644 --- a/include/nuttx/fs.h +++ b/include/nuttx/fs.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/fs.h * - * 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 @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __NUTTX_FS_H -#define __NUTTX_FS_H +#ifndef __INCLUDE_NUTTX_FS_H +#define __INCLUDE_NUTTX_FS_H /**************************************************************************** * Included Files @@ -312,27 +312,27 @@ EXTERN void weak_function fs_initialize(void); /* fs_registerdriver.c ******************************************************/ -EXTERN STATUS register_driver(const char *path, - const struct file_operations *fops, - mode_t mode, void *priv); +EXTERN int register_driver(const char *path, + const struct file_operations *fops, + mode_t mode, void *priv); /* fs_registerdriver.c ******************************************************/ -EXTERN STATUS register_blockdriver(const char *path, - const struct block_operations *bops, - mode_t mode, void *priv); +EXTERN int register_blockdriver(const char *path, + const struct block_operations *bops, + mode_t mode, void *priv); /* fs_unregisterdriver.c ****************************************************/ -EXTERN STATUS unregister_driver(const char *path); +EXTERN int unregister_driver(const char *path); /* fs_unregisterblockdriver.c ***********************************************/ -EXTERN STATUS unregister_blockdriver(const char *path); +EXTERN int unregister_blockdriver(const char *path); /* fs_open.c ****************************************************************/ -EXTERN int inode_checkflags(FAR struct inode *inode, int oflags); +EXTERN int inode_checkflags(FAR struct inode *inode, int oflags); /* fs_files.c ***************************************************************/ @@ -429,4 +429,4 @@ EXTERN ssize_t bchlib_write(FAR void *handle, FAR const char *buffer, size_t off } #endif -#endif /* __NUTTX_FS_H */ +#endif /* __INCLUDE_NUTTX_FS_H */ diff --git a/include/sched.h b/include/sched.h index 0923987f356..ed43f38d8e2 100644 --- a/include/sched.h +++ b/include/sched.h @@ -1,7 +1,7 @@ /******************************************************************************** * include/sched.h * - * 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 @@ -87,41 +87,41 @@ 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, const char *argv[]); +EXTERN int task_init(FAR _TCB *tcb, const char *name, int priority, + FAR uint32 *stack, uint32 stack_size, + main_t entry, const char *argv[]); #else -EXTERN STATUS task_init(FAR _TCB *tcb, const char *name, int priority, - main_t entry, const char *argv[]); +EXTERN int task_init(FAR _TCB *tcb, const char *name, int priority, + main_t entry, const char *argv[]); #endif -EXTERN STATUS task_activate(FAR _TCB *tcb); +EXTERN int task_activate(FAR _TCB *tcb); #ifndef CONFIG_CUSTOM_STACK -EXTERN int task_create(const char *name, int priority, int stack_size, - main_t entry, const char *argv[]); +EXTERN int task_create(const char *name, int priority, int stack_size, + main_t entry, const char *argv[]); #else -EXTERN int task_create(const char *name, int priority, - main_t entry, const char *argv[]); +EXTERN int task_create(const char *name, int priority, + main_t entry, const char *argv[]); #endif -EXTERN STATUS task_delete(pid_t pid); -EXTERN STATUS task_restart(pid_t pid); +EXTERN int task_delete(pid_t pid); +EXTERN int task_restart(pid_t pid); /* Task Scheduling Interfaces (based on POSIX APIs) */ -EXTERN int sched_setparam(pid_t pid, const struct sched_param *param); -EXTERN int sched_getparam(pid_t pid, struct sched_param *param); -EXTERN int sched_setscheduler(pid_t pid, int policy, - const struct sched_param *param); -EXTERN int sched_getscheduler(pid_t pid); -EXTERN int sched_yield(void); -EXTERN int sched_get_priority_max(int policy); -EXTERN int sched_get_priority_min(int policy); -EXTERN int sched_rr_get_interval(pid_t pid, struct timespec *interval); +EXTERN int sched_setparam(pid_t pid, const struct sched_param *param); +EXTERN int sched_getparam(pid_t pid, struct sched_param *param); +EXTERN int sched_setscheduler(pid_t pid, int policy, + const struct sched_param *param); +EXTERN int sched_getscheduler(pid_t pid); +EXTERN int sched_yield(void); +EXTERN int sched_get_priority_max(int policy); +EXTERN int sched_get_priority_min(int policy); +EXTERN int sched_rr_get_interval(pid_t pid, struct timespec *interval); /* Task Switching Interfaces (non-standard) */ -EXTERN STATUS sched_lock(void); -EXTERN STATUS sched_unlock(void); -EXTERN sint32 sched_lockcount(void); +EXTERN int sched_lock(void); +EXTERN int sched_unlock(void); +EXTERN sint32 sched_lockcount(void); /* If instrumentation of the scheduler is enabled, then some * outboard logic must provide the following interfaces. @@ -129,9 +129,9 @@ EXTERN sint32 sched_lockcount(void); #ifdef CONFIG_SCHED_INSTRUMENTATION -EXTERN void sched_note_start(FAR _TCB *tcb ); -EXTERN void sched_note_stop(FAR _TCB *tcb ); -EXTERN void sched_note_switch(FAR _TCB *pFromTcb, FAR _TCB *pToTcb); +EXTERN void sched_note_start(FAR _TCB *tcb ); +EXTERN void sched_note_stop(FAR _TCB *tcb ); +EXTERN void sched_note_switch(FAR _TCB *pFromTcb, FAR _TCB *pToTcb); #else # define sched_note_start(t) diff --git a/include/sys/types.h b/include/sys/types.h index 91544bf0cf7..a8baa9a5883 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -107,30 +107,61 @@ typedef double float64; /* Misc. scalar types */ -typedef unsigned int mode_t; /* Needs at least 16-bits but must be */ - /* sizeof(int) because it is passed */ - /* via varargs. */ +/* mode_t is an integer type used for file attributes. mode_t needs + * to be at least 16-bits but, in fact must be sizeof(int) because it is + * pased via varargs. + */ + +typedef unsigned int mode_t; + +/* size_t is used for sizes of objects. + * ssize_t is used for a count of bytes or an error indication. + */ + #ifdef CONFIG_SMALL_MEMORY typedef uint16 size_t; typedef sint16 ssize_t; -typedef sint16 off_t; -typedef uint16 blksize_t; -typedef uint16 blkcnt_t; #else typedef uint32 size_t; typedef sint32 ssize_t; -typedef sint32 off_t; -typedef uint16 blksize_t; -typedef uint32 blkcnt_t; #endif -typedef off_t fpos_t; + +/* uid_t is used for user IDs + * gid_t is used for group IDs. + */ + typedef sint16 uid_t; typedef sint16 gid_t; + +/* dev_t is used for device IDs */ + typedef uint16 dev_t; + +/* ino_t is used for file serial numbers */ + typedef uint16 ino_t; -typedef unsigned int sig_atomic_t; + +/* pid_t is used for process IDs and process group IDs */ + typedef int pid_t; -typedef int STATUS; + +/* blkcnt_t and off_t are signed integer types. + * + * blkcnt_t is used for file block counts. + * off_t is used for file sizes. + * + * Hence, both should be independent of processor architecture. + */ + +typedef uint32 blkcnt_t; +typedef sint32 off_t; +typedef off_t fpos_t; + +/* blksize_t is a signed integer value used for file block sizes */ + +typedef sint16 blksize_t; + +/* Network related */ typedef unsigned int socklen_t; typedef uint16 sa_family_t; diff --git a/include/wdog.h b/include/wdog.h index 5056ab4cf3a..69fb59f0f77 100644 --- a/include/wdog.h +++ b/include/wdog.h @@ -98,10 +98,9 @@ extern "C" { #endif EXTERN WDOG_ID wd_create(void); -EXTERN STATUS wd_delete(WDOG_ID wdog); -EXTERN STATUS wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, - int argc, ...); -EXTERN STATUS wd_cancel(WDOG_ID wdog); +EXTERN int wd_delete(WDOG_ID wdog); +EXTERN int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...); +EXTERN int wd_cancel(WDOG_ID wdog); EXTERN int wd_gettime(WDOG_ID wdog); #undef EXTERN diff --git a/lib/lib_fgetpos.c b/lib/lib_fgetpos.c index 9bb1af2a3aa..e9147681330 100644 --- a/lib/lib_fgetpos.c +++ b/lib/lib_fgetpos.c @@ -1,7 +1,7 @@ /**************************************************************************** * lib/lib_fgetpos.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -118,6 +118,6 @@ int fgetpos(FAR FILE *stream, FAR fpos_t *pos) return ERROR; } - *pos = (fpos_t)pos; + *pos = (fpos_t)position; return OK; } diff --git a/sched/os_internal.h b/sched/os_internal.h index 84a2997c7bc..a7b55acfde3 100644 --- a/sched/os_internal.h +++ b/sched/os_internal.h @@ -239,11 +239,11 @@ extern const tasklist_t g_tasklisttable[NUM_TASK_STATES]; ****************************************************************************/ extern void task_start(void); -extern STATUS task_schedsetup(FAR _TCB *tcb, int priority, +extern int task_schedsetup(FAR _TCB *tcb, int priority, start_t start, main_t main); -extern STATUS task_argsetup(FAR _TCB *tcb, const char *name, +extern int task_argsetup(FAR _TCB *tcb, const char *name, const char *argv[]); -extern STATUS task_deletecurrent(void); +extern int task_deletecurrent(void); extern boolean sched_addreadytorun(FAR _TCB *rtrtcb); extern boolean sched_removereadytorun(FAR _TCB *rtrtcb); diff --git a/sched/pthread_create.c b/sched/pthread_create.c index 836b422c663..4f3d05bdc1c 100644 --- a/sched/pthread_create.c +++ b/sched/pthread_create.c @@ -247,7 +247,7 @@ int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr, { FAR _TCB *ptcb; FAR join_t *pjoin; - STATUS status; + int status; int priority; #if CONFIG_RR_INTERVAL > 0 int policy; diff --git a/sched/sched_lock.c b/sched/sched_lock.c index 344d3d75b16..5cddc436e6b 100644 --- a/sched/sched_lock.c +++ b/sched/sched_lock.c @@ -1,7 +1,7 @@ -/************************************************************ - * sched_lock.c +/************************************************************************ + * sched/sched_lock.c * - * Copyright (C) 2007 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 @@ -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,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Included Files - ************************************************************/ + ************************************************************************/ #include #include @@ -44,35 +44,35 @@ #include #include "os_internal.h" -/************************************************************ +/************************************************************************ * Definitions - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Private Type Declarations - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Global Variables - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Private Variables - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Private Function Prototypes - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Private Functionss - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Public Functions - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Name: sched_lock * * Description: @@ -89,9 +89,9 @@ * Return Value: * OK on success; ERROR on failure * - ************************************************************/ + ************************************************************************/ -STATUS sched_lock(void) +int sched_lock(void) { _TCB *rtcb = (_TCB*)g_readytorun.head; diff --git a/sched/sched_unlock.c b/sched/sched_unlock.c index 073f5e31fe4..1d56b07e751 100644 --- a/sched/sched_unlock.c +++ b/sched/sched_unlock.c @@ -1,7 +1,7 @@ -/************************************************************ - * sched_unlock.c +/************************************************************************ + * sched/sched_unlock.c * - * Copyright (C) 2007 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 @@ -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,46 +31,46 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Included Files - ************************************************************/ + ************************************************************************/ #include #include #include #include "os_internal.h" -/************************************************************ +/************************************************************************ * Definitions - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Private Type Declarations - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Global Variables - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Private Variables - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Private Function Prototypes - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Private Functionss - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Public Functions - ************************************************************/ + ************************************************************************/ -/************************************************************ +/************************************************************************ * Name: sched_unlock * * Description: This function decrements the preemption lock @@ -80,9 +80,9 @@ * times as sched_lock(). When the lockcount is decremented * to zero, any tasks that were eligible to preempt the * current task will execute. - ************************************************************/ + ************************************************************************/ -STATUS sched_unlock(void) +int sched_unlock(void) { _TCB *rtcb = (_TCB*)g_readytorun.head; diff --git a/sched/sem_post.c b/sched/sem_post.c index 3c5ccaf77e0..bed58f6bcbc 100644 --- a/sched/sem_post.c +++ b/sched/sem_post.c @@ -101,7 +101,7 @@ int sem_post(FAR sem_t *sem) { FAR _TCB *stcb = NULL; - STATUS ret = ERROR; + int ret = ERROR; irqstate_t saved_state; /* Make sure we were supplied with a valid semaphore. */ diff --git a/sched/task_activate.c b/sched/task_activate.c index e324e17a3f0..12038960f32 100644 --- a/sched/task_activate.c +++ b/sched/task_activate.c @@ -88,7 +88,7 @@ * ****************************************************************************/ -STATUS task_activate(FAR _TCB *tcb) +int task_activate(FAR _TCB *tcb) { irqstate_t flags = irqsave(); diff --git a/sched/task_create.c b/sched/task_create.c index 5d7a5872bc8..247183ecac0 100644 --- a/sched/task_create.c +++ b/sched/task_create.c @@ -1,5 +1,5 @@ /**************************************************************************** - * task_create.c + * sched/task_create.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -116,7 +116,7 @@ int task_create(const char *name, int priority, #endif { FAR _TCB *tcb; - STATUS status; + int status; pid_t pid; /* Allocate a TCB for the new task. */ diff --git a/sched/task_delete.c b/sched/task_delete.c index 369f601ed0a..683fbd18de3 100644 --- a/sched/task_delete.c +++ b/sched/task_delete.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/task_delete.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 @@ -93,12 +93,12 @@ * ****************************************************************************/ -STATUS task_delete(pid_t pid) +int task_delete(pid_t pid) { FAR _TCB *rtcb; FAR _TCB *dtcb; irqstate_t saved_state; - STATUS ret = ERROR; + int ret = ERROR; /* Check if the task to delete is the calling task */ diff --git a/sched/task_deletecurrent.c b/sched/task_deletecurrent.c index 8246bb47135..4de621b2ad6 100644 --- a/sched/task_deletecurrent.c +++ b/sched/task_deletecurrent.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/task_deletecurrent.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -93,7 +93,7 @@ * ****************************************************************************/ -STATUS task_deletecurrent(void) +int task_deletecurrent(void) { FAR _TCB *dtcb = (FAR _TCB*)g_readytorun.head; FAR _TCB *rtcb; diff --git a/sched/task_init.c b/sched/task_init.c index 6d539559439..6c70bf43513 100644 --- a/sched/task_init.c +++ b/sched/task_init.c @@ -1,5 +1,5 @@ /**************************************************************************** - * task_init.c + * sched/task_init.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -108,15 +108,15 @@ ****************************************************************************/ #ifndef CONFIG_CUSTOM_STACK -STATUS task_init(FAR _TCB *tcb, const char *name, int priority, - FAR uint32 *stack, uint32 stack_size, - main_t entry, const char *argv[]) +int task_init(FAR _TCB *tcb, const char *name, int priority, + FAR uint32 *stack, uint32 stack_size, + main_t entry, const char *argv[]) #else -STATUS task_init(FAR _TCB *tcb, const char *name, int priority, - main_t entry, const char *argv[]) +int task_init(FAR _TCB *tcb, const char *name, int priority, + main_t entry, const char *argv[]) #endif { - STATUS ret; + int ret; /* Associate file descriptors with the new task */ diff --git a/sched/task_restart.c b/sched/task_restart.c index 00b8bf0a852..1cd575a4e1b 100644 --- a/sched/task_restart.c +++ b/sched/task_restart.c @@ -96,11 +96,11 @@ * ****************************************************************************/ -STATUS task_restart(pid_t pid) +int task_restart(pid_t pid) { FAR _TCB *rtcb; FAR _TCB *tcb; - STATUS status; + int status; irqstate_t state; /* Make sure this task does not become ready-to-run while diff --git a/sched/task_setup.c b/sched/task_setup.c index 83bae570b12..f54796e5904 100644 --- a/sched/task_setup.c +++ b/sched/task_setup.c @@ -70,7 +70,7 @@ static const char g_noname[] = ""; * Private Function Prototypes ****************************************************************************/ -static STATUS task_assignpid(FAR _TCB* tcb); +static int task_assignpid(FAR _TCB* tcb); /**************************************************************************** * Private Functions @@ -90,7 +90,7 @@ static STATUS task_assignpid(FAR _TCB* tcb); * ****************************************************************************/ -static STATUS task_assignpid(FAR _TCB *tcb) +static int task_assignpid(FAR _TCB *tcb) { pid_t next_pid; int hash_ndx; @@ -207,10 +207,9 @@ static inline void task_dupdspace(FAR _TCB *tcb) * ****************************************************************************/ -STATUS task_schedsetup(FAR _TCB *tcb, int priority, - start_t start, main_t main) +int task_schedsetup(FAR _TCB *tcb, int priority, start_t start, main_t main) { - STATUS ret; + int ret; /* Assign a unique task ID to the task. */ @@ -289,7 +288,7 @@ STATUS task_schedsetup(FAR _TCB *tcb, int priority, * ****************************************************************************/ -STATUS task_argsetup(FAR _TCB *tcb, const char *name, const char *argv[]) +int task_argsetup(FAR _TCB *tcb, const char *name, const char *argv[]) { int i; diff --git a/sched/wd_cancel.c b/sched/wd_cancel.c index 9bdeafcf87d..acf957163c2 100644 --- a/sched/wd_cancel.c +++ b/sched/wd_cancel.c @@ -1,5 +1,5 @@ /**************************************************************************** - * wd_cancel.c + * sched/wd_cancel.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -85,12 +85,12 @@ * ****************************************************************************/ -STATUS wd_cancel (WDOG_ID wdid) +int wd_cancel (WDOG_ID wdid) { wdog_t *curr; wdog_t *prev; irqstate_t saved_state; - STATUS ret = ERROR; + int ret = ERROR; /* Prohibit timer interactions with the timer queue until the * cancellation is complete diff --git a/sched/wd_delete.c b/sched/wd_delete.c index 25f2db8abe7..eebfc0dc88c 100644 --- a/sched/wd_delete.c +++ b/sched/wd_delete.c @@ -1,7 +1,7 @@ /**************************************************************************** - * wd_delete.c + * sched/wd_delete.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 @@ -92,7 +92,7 @@ * ****************************************************************************/ -STATUS wd_delete(WDOG_ID wdId) +int wd_delete(WDOG_ID wdId) { irqstate_t saved_state; diff --git a/sched/wd_start.c b/sched/wd_start.c index a406b3f30c8..39525c0bc5c 100644 --- a/sched/wd_start.c +++ b/sched/wd_start.c @@ -125,7 +125,7 @@ typedef void (*wdentry4_t)(int argc, uint32 arg1, uint32 arg2, * ****************************************************************************/ -STATUS wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...) +int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry, int argc, ...) { va_list ap; FAR wdog_t *curr;