mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
Remove user_initialize(); Make sure all integer types are signed that need to be
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3474 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
|
||||
@@ -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()*/
|
||||
|
||||
@@ -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()*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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() */
|
||||
|
||||
@@ -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() */
|
||||
|
||||
@@ -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 <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# 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)
|
||||
|
||||
@@ -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 <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* 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 *****************************************/
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user