diff --git a/ChangeLog b/ChangeLog index 13e40f3034..2605cf6998 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1648,6 +1648,12 @@ separately linked images: (1) a kernel-mode RTOS image, and (2) a user- mode application image that communicates to the RTOS kernel via system calls. A lot more still must be done. + * user_initialize(): Eliminated the user_initialize() initialization hook. + It is difficult to maintain and redundant: Board level initialization + an up_initialize() provide the same kind of capability. + * arch/*/include/*/type.h: On some compilers, char defaults as unsigned. + Explicitly add signed to integer types if signed is what is required. + diff --git a/arch/8051/include/types.h b/arch/8051/include/types.h index 7495513b2c..2d195631a1 100644 --- a/arch/8051/include/types.h +++ b/arch/8051/include/types.h @@ -67,20 +67,20 @@ * long long and double are not supported. */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef int _int16_t; +typedef signed int _int16_t; typedef unsigned int _uint16_t; -typedef long _int32_t; +typedef signed long _int32_t; typedef unsigned long _uint32_t; /* For SDCC, a Generic pointer is 3 bytes in length with the * first byte holding data space information. */ -typedef long _intptr_t; +typedef signed long _intptr_t; typedef unsigned long _uintptr_t; /* This is the size of the interrupt state save returned by diff --git a/arch/arm/include/types.h b/arch/arm/include/types.h index 9a45fcb754..c3471ca59b 100644 --- a/arch/arm/include/types.h +++ b/arch/arm/include/types.h @@ -63,22 +63,22 @@ * files */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef short _int16_t; +typedef signed short _int16_t; typedef unsigned short _uint16_t; -typedef int _int32_t; +typedef signed int _int32_t; typedef unsigned int _uint32_t; -typedef long long _int64_t; +typedef signed long long _int64_t; typedef unsigned long long _uint64_t; #define __INT64_DEFINED /* A pointer is 4 bytes */ -typedef int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; /* This is the size of the interrupt state save returned by irqsave(). For @@ -87,9 +87,9 @@ typedef unsigned int _uintptr_t; */ #ifdef __thumb2__ -typedef unsigned short irqstate_t; +typedef unsigned short irqstate_t; #else /* __thumb2__ */ -typedef unsigned int irqstate_t; +typedef unsigned int irqstate_t; #endif /* __thumb2__ */ #endif /* __ASSEMBLY__ */ diff --git a/arch/avr/include/types.h b/arch/avr/include/types.h index fd8c394c41..c93e70df4c 100644 --- a/arch/avr/include/types.h +++ b/arch/avr/include/types.h @@ -63,27 +63,27 @@ * files */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef short _int16_t; +typedef signed short _int16_t; typedef unsigned short _uint16_t; -typedef int _int32_t; +typedef signed int _int32_t; typedef unsigned int _uint32_t; -typedef long long _int64_t; +typedef signed long long _int64_t; typedef unsigned long long _uint64_t; #define __INT64_DEFINED /* A pointer is 4 bytes */ -typedef int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; /* This is the size of the interrupt state save returned by irqsave(). */ -typedef unsigned int irqstate_t; +typedef unsigned int irqstate_t; #endif /* __ASSEMBLY__ */ diff --git a/arch/hc/include/hc12/types.h b/arch/hc/include/hc12/types.h index f29be63940..d676e3d27a 100755 --- a/arch/hc/include/hc12/types.h +++ b/arch/hc/include/hc12/types.h @@ -63,9 +63,9 @@ * files */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef short _int16_t; +typedef signed short _int16_t; typedef unsigned short _uint16_t; /* Normally, mc68hc1x code is compiled with the -mshort option @@ -74,20 +74,20 @@ typedef unsigned short _uint16_t; */ # if __INT__ == 16 -typedef long _int32_t; +typedef signed long _int32_t; typedef unsigned long _uint32_t; #else -typedef int _int32_t; +typedef signed int _int32_t; typedef unsigned int _uint32_t; #endif -typedef long long _int64_t; +typedef signed long long _int64_t; typedef unsigned long long _uint64_t; #define __INT64_DEFINED /* A pointer is two bytes */ -typedef short _intptr_t; +typedef signed short _intptr_t; typedef unsigned short _uintptr_t; /* This is the size of the interrupt state save returned by irqsave()*/ diff --git a/arch/hc/include/hcs12/types.h b/arch/hc/include/hcs12/types.h index 71b311fb79..739ddef215 100755 --- a/arch/hc/include/hcs12/types.h +++ b/arch/hc/include/hcs12/types.h @@ -63,10 +63,10 @@ * files */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef short _int16_t; +typedef signed short _int16_t; typedef unsigned short _uint16_t; /* Normally, mc68hc1x code is compiled with the -mshort option @@ -75,20 +75,20 @@ typedef unsigned short _uint16_t; */ # if __INT__ == 16 -typedef long _int32_t; +typedef signed long _int32_t; typedef unsigned long _uint32_t; #else -typedef int _int32_t; +typedef signed int _int32_t; typedef unsigned int _uint32_t; #endif -typedef long long _int64_t; +typedef signed long long _int64_t; typedef unsigned long long _uint64_t; #define __INT64_DEFINED /* A pointer is two bytes */ -typedef short _intptr_t; +typedef signed short _intptr_t; typedef unsigned short _uintptr_t; /* This is the size of the interrupt state save returned by irqsave()*/ diff --git a/arch/sh/include/m16c/types.h b/arch/sh/include/m16c/types.h index d148128600..4f84a31132 100644 --- a/arch/sh/include/m16c/types.h +++ b/arch/sh/include/m16c/types.h @@ -65,22 +65,22 @@ * int is 16-bits and long is 32-bits */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef int _int16_t; +typedef signed int _int16_t; typedef unsigned int _uint16_t; -typedef long _int32_t; +typedef signed long _int32_t; typedef unsigned long _uint32_t; -typedef long long _int64_t; +typedef signed long long _int64_t; typedef unsigned long long _uint64_t; #define __INT64_DEFINED /* A pointer is 2 bytes */ -typedef unsigned int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; /* This is the size of the interrupt state save returned by diff --git a/arch/sh/include/sh1/types.h b/arch/sh/include/sh1/types.h index 79ed1a1819..ac0769ecd5 100644 --- a/arch/sh/include/sh1/types.h +++ b/arch/sh/include/sh1/types.h @@ -63,22 +63,22 @@ * files */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef short _int16_t; +typedef signed short _int16_t; typedef unsigned short _uint16_t; -typedef int _int32_t; +typedef signed int _int32_t; typedef unsigned int _uint32_t; -typedef long long _int64_t; +typedef signed long long _int64_t; typedef unsigned long long _uint64_t; #define __INT64_DEFINED /* A pointer is 4 bytes */ -typedef int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; /* This is the size of the interrupt state save returned by diff --git a/arch/sim/include/types.h b/arch/sim/include/types.h index 214fbb91b9..5b58264e6c 100644 --- a/arch/sim/include/types.h +++ b/arch/sim/include/types.h @@ -63,22 +63,22 @@ * files */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef short _int16_t; +typedef signed short _int16_t; typedef unsigned short _uint16_t; -typedef int _int32_t; +typedef signed int _int32_t; typedef unsigned int _uint32_t; -typedef long long _int64_t; +typedef signed long long _int64_t; typedef unsigned long long _uint64_t; #define __INT64_DEFINED /* A pointer is 4 bytes */ -typedef unsigned int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; /* This is the size of the interrupt state save returned by diff --git a/arch/x86/include/i486/types.h b/arch/x86/include/i486/types.h index 88379fd0ff..d6f25f3e0e 100755 --- a/arch/x86/include/i486/types.h +++ b/arch/x86/include/i486/types.h @@ -64,22 +64,22 @@ * files */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef short _int16_t; +typedef signed short _int16_t; typedef unsigned short _uint16_t; -typedef int _int32_t; +typedef signed int _int32_t; typedef unsigned int _uint32_t; -typedef long long _int64_t; +typedef signed long long _int64_t; typedef unsigned long long _uint64_t; #define __INT64_DEFINED /* A pointer is 4 bytes */ -typedef unsigned int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; /* This is the size of the interrupt state save returned by diff --git a/arch/z16/include/types.h b/arch/z16/include/types.h index b83a6070de..536cb52a74 100644 --- a/arch/z16/include/types.h +++ b/arch/z16/include/types.h @@ -63,18 +63,18 @@ * files */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef short _int16_t; +typedef signed short _int16_t; typedef unsigned short _uint16_t; -typedef int _int32_t; +typedef signed int _int32_t; typedef unsigned int _uint32_t; /* A pointer is 4 bytes */ -typedef int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; /* This is the size of the interrupt state save returned by diff --git a/arch/z80/include/ez80/types.h b/arch/z80/include/ez80/types.h index 4ca48e6973..f3569d9baa 100644 --- a/arch/z80/include/ez80/types.h +++ b/arch/z80/include/ez80/types.h @@ -72,17 +72,17 @@ * float - 32-bits */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef short _int16_t; +typedef signed short _int16_t; typedef unsigned short _uint16_t; -typedef int _int24_t; +typedef signed int _int24_t; typedef unsigned int _uint24_t; #define __INT24_DEFINED -typedef long _int32_t; +typedef signed long _int32_t; typedef unsigned long _uint32_t; /* A pointer is 2 or 3 bytes, depending upon if the ez80 is in z80 @@ -93,10 +93,10 @@ typedef unsigned long _uint32_t; */ #ifdef CONFIG_EZ80_Z80MODE -typedef short _intptr_t; +typedef signed short _intptr_t; typedef unsigned short _uintptr_t; #else -typedef int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; #endif diff --git a/arch/z80/include/z8/types.h b/arch/z80/include/z8/types.h index 0e269a5de3..324ca236c4 100644 --- a/arch/z80/include/z8/types.h +++ b/arch/z80/include/z8/types.h @@ -79,18 +79,18 @@ * rom pointer - 16-bits */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef int _int16_t; +typedef signed int _int16_t; typedef unsigned int _uint16_t; -typedef long _int32_t; +typedef signed long _int32_t; typedef unsigned long _uint32_t; /* A pointer is 2 bytes */ -typedef unsigned int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; /* This is the size of the interrupt state save returned by irqsave() */ diff --git a/arch/z80/include/z80/types.h b/arch/z80/include/z80/types.h index 652ea5adf3..42bba5ac80 100644 --- a/arch/z80/include/z80/types.h +++ b/arch/z80/include/z80/types.h @@ -72,18 +72,18 @@ * space information. */ -typedef char _int8_t; +typedef signed char _int8_t; typedef unsigned char _uint8_t; -typedef int _int16_t; +typedef signed int _int16_t; typedef unsigned int _uint16_t; -typedef long _int32_t; +typedef signed long _int32_t; typedef unsigned long _uint32_t; /* A pointer is 2 bytes */ -typedef int _intptr_t; +typedef signed int _intptr_t; typedef unsigned int _uintptr_t; /* This is the size of the interrupt state save returned by irqsave() */ diff --git a/configs/ea3131/locked/mklocked.sh b/configs/ea3131/locked/mklocked.sh index 3bfd0726d3..8457ab8187 100755 --- a/configs/ea3131/locked/mklocked.sh +++ b/configs/ea3131/locked/mklocked.sh @@ -2,7 +2,7 @@ ########################################################################### # configs/ea3131/locked/mklocked.sh # -# Copyright (C) 2010 Gregory Nutt. All rights reserved. +# Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -163,7 +163,6 @@ fi echo "EXTERN(mm_initialize)" >>ld-locked.inc echo "EXTERN(irq_initialize)" >>ld-locked.inc -#echo "EXTERN(user_initialize)" >>ld-locked.inc echo "EXTERN(wd_initialize)" >>ld-locked.inc answer=$(checkconfig CONFIG_DISABLE_CLOCK) diff --git a/include/nuttx/init.h b/include/nuttx/init.h index 3dd75209bd..722db85a4b 100644 --- a/include/nuttx/init.h +++ b/include/nuttx/init.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/init.h * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -66,9 +66,8 @@ extern "C" { #define EXTERN extern #endif -/* These are functions that must be supplied by the application */ +/* This entry point must be supplied by the application */ -EXTERN void weak_function user_initialize(void); EXTERN int user_start(int argc, char *argv[]); /* Functions contained in os_task.c *****************************************/ diff --git a/sched/os_start.c b/sched/os_start.c index 0e44099c83..da34ad8950 100644 --- a/sched/os_start.c +++ b/sched/os_start.c @@ -311,18 +311,6 @@ void os_start(void) irq_initialize(); } - /* Provide an access point to initialize any user-specific logic very - * early in the initialization sequence. Note that user_ininitialize() - * is called only if it is provided in the link. - */ - -#ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (user_initialize != NULL) -#endif - { - user_initialize(); - } - /* Initialize the watchdog facility (if included in the link) */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS