diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-18 19:18:52 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-18 19:18:52 +0000 |
commit | f73fc29d6692e721e50a7a595d07faab29048a03 (patch) | |
tree | dc0b4c271eb1a035241fc9477db935a7e7163704 | |
parent | 2008-08-18 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-f73fc29d6692e721e50a7a595d07faab29048a03.tar.bz2 |
2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/include/rtems/itron/task.h, itron/src/def_cyc.c,
itron/src/task.c, libcsupport/src/newlibc_exit.c,
libcsupport/src/sync.c, libfs/src/imfs/imfs_fchmod.c,
posix/include/rtems/posix/pthread.h, posix/src/pthread.c,
posix/src/sysconf.c, rtems/include/rtems/rtems/tasks.h,
rtems/src/tasks.c, score/include/rtems/score/stack.h,
score/inline/rtems/score/stack.inl,
score/inline/rtems/score/thread.inl, score/src/threadhandler.c: Fix
various nested-externs warnings.
-rw-r--r-- | cpukit/ChangeLog | 12 | ||||
-rw-r--r-- | cpukit/itron/include/rtems/itron/task.h | 8 | ||||
-rw-r--r-- | cpukit/itron/src/def_cyc.c | 11 | ||||
-rw-r--r-- | cpukit/itron/src/task.c | 1 | ||||
-rw-r--r-- | cpukit/libcsupport/src/newlibc_exit.c | 5 | ||||
-rw-r--r-- | cpukit/libcsupport/src/sync.c | 7 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_fchmod.c | 7 | ||||
-rw-r--r-- | cpukit/posix/include/rtems/posix/pthread.h | 9 | ||||
-rw-r--r-- | cpukit/posix/src/pthread.c | 1 | ||||
-rw-r--r-- | cpukit/posix/src/sysconf.c | 2 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/tasks.h | 9 | ||||
-rw-r--r-- | cpukit/rtems/src/tasks.c | 1 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/stack.h | 7 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/stack.inl | 1 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/thread.inl | 11 | ||||
-rw-r--r-- | cpukit/score/src/threadhandler.c | 13 |
16 files changed, 76 insertions, 29 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 006fc5f5e4..8f3c1ec769 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,17 @@ 2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com> + * itron/include/rtems/itron/task.h, itron/src/def_cyc.c, + itron/src/task.c, libcsupport/src/newlibc_exit.c, + libcsupport/src/sync.c, libfs/src/imfs/imfs_fchmod.c, + posix/include/rtems/posix/pthread.h, posix/src/pthread.c, + posix/src/sysconf.c, rtems/include/rtems/rtems/tasks.h, + rtems/src/tasks.c, score/include/rtems/score/stack.h, + score/inline/rtems/score/stack.inl, + score/inline/rtems/score/thread.inl, score/src/threadhandler.c: Fix + various nested-externs warnings. + +2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com> + * libcsupport/Makefile.am, libcsupport/src/newlibc.c: Split libc_init() into a separate file to avoid linkage dependencies on newlibc.c which in turn pulls in fclose() and other C library methods. diff --git a/cpukit/itron/include/rtems/itron/task.h b/cpukit/itron/include/rtems/itron/task.h index 33e30ff898..1f72891a11 100644 --- a/cpukit/itron/include/rtems/itron/task.h +++ b/cpukit/itron/include/rtems/itron/task.h @@ -64,6 +64,14 @@ ITRON_EXTERN itron_initialization_tasks_table *_ITRON_Task_User_initialization_tasks; ITRON_EXTERN uint32_t _ITRON_Task_Number_of_initialization_tasks; +/** + * When the user configures a set of ITRON API initialization tasks, + * This variable will point to the method used to initialize them. + * + * @note It is instantiated and initialized by confdefs.h based upon + * application requirements. + */ +extern void (*_ITRON_Initialize_user_tasks_p)(void); /* * _ITRON_Task_Manager_initialization diff --git a/cpukit/itron/src/def_cyc.c b/cpukit/itron/src/def_cyc.c index 131ae785ee..f0ec0496bc 100644 --- a/cpukit/itron/src/def_cyc.c +++ b/cpukit/itron/src/def_cyc.c @@ -40,12 +40,13 @@ ER def_cyc( #if 0 timeInterval = pk_dcyc->cyctim / 1000; object->delta_interval = timeInterval; -#endif _Watchdog_Initialize( - object, - pk_dcyc->cychdr, - cycno, - pk_dcyc->exinf); + object, + pk_dcyc->cychdr, + cycno, + pk_dcyc->exinf + ); +#endif _Watchdog_Deactivate(object); return E_OK; diff --git a/cpukit/itron/src/task.c b/cpukit/itron/src/task.c index 4220dc8a4d..2d1f5ef59a 100644 --- a/cpukit/itron/src/task.c +++ b/cpukit/itron/src/task.c @@ -96,7 +96,6 @@ User_extensions_routine _ITRON_Task_Delete_extension( void _ITRON_Task_Initialize_user_tasks( void ) { - extern void (*_ITRON_Initialize_user_tasks_p)(void); if ( _ITRON_Initialize_user_tasks_p ) (*_ITRON_Initialize_user_tasks_p)(); } diff --git a/cpukit/libcsupport/src/newlibc_exit.c b/cpukit/libcsupport/src/newlibc_exit.c index 06fdab5cfa..68212b692e 100644 --- a/cpukit/libcsupport/src/newlibc_exit.c +++ b/cpukit/libcsupport/src/newlibc_exit.c @@ -121,6 +121,10 @@ void libc_wrapup(void) #if !defined(RTEMS_UNIX) #define EXIT_SYMBOL _exit + + #if defined(__USE_INIT_FINI__) + extern void _fini( void ); + #endif #else #define EXIT_SYMBOL exit #endif @@ -132,7 +136,6 @@ void EXIT_SYMBOL(int status) * run the global destructors now. */ #if defined(__USE_INIT_FINI__) - extern void _fini( void ); _fini(); #endif diff --git a/cpukit/libcsupport/src/sync.c b/cpukit/libcsupport/src/sync.c index 6e46aaf114..14c20cebb3 100644 --- a/cpukit/libcsupport/src/sync.c +++ b/cpukit/libcsupport/src/sync.c @@ -70,9 +70,14 @@ static void sync_per_thread(Thread_Control *t) } } +/* + * libc_global_reent is not prototyped in any .h files. + * We have to extern it here. + */ +extern struct _reent libc_global_reent; + void sync(void) { - extern struct _reent libc_global_reent; /* * Walk the one used initially by RTEMS. diff --git a/cpukit/libfs/src/imfs/imfs_fchmod.c b/cpukit/libfs/src/imfs/imfs_fchmod.c index 55c1cfe42f..6cb56aa629 100644 --- a/cpukit/libfs/src/imfs/imfs_fchmod.c +++ b/cpukit/libfs/src/imfs/imfs_fchmod.c @@ -30,13 +30,6 @@ int IMFS_fchmod( #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif - int IMFS_memfile_write( - IMFS_jnode_t *the_jnode, - off_t start, - const unsigned char *source, - unsigned int length - ); - jnode = loc->node_access; diff --git a/cpukit/posix/include/rtems/posix/pthread.h b/cpukit/posix/include/rtems/posix/pthread.h index 14eaf36c4c..9f80828eec 100644 --- a/cpukit/posix/include/rtems/posix/pthread.h +++ b/cpukit/posix/include/rtems/posix/pthread.h @@ -49,6 +49,15 @@ POSIX_EXTERN uint32_t _POSIX_Threads_Number_of_initialization_threads; extern const pthread_attr_t _POSIX_Threads_Default_attributes; +/** + * When the user configures a set of POSIX API initialization threads, + * This variable will point to the method used to initialize them. + * + * @note It is instantiated and initialized by confdefs.h based upon + * application requirements. + */ +extern void (*_POSIX_Threads_Initialize_user_threads_p)(void); + /* * _POSIX_Threads_Manager_initialization * diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index a19e2c069c..30989e0f03 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -272,7 +272,6 @@ User_extensions_routine _POSIX_Threads_Exitted_extension( void _POSIX_Threads_Initialize_user_threads( void ) { - extern void (*_POSIX_Threads_Initialize_user_threads_p)(void); if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); } diff --git a/cpukit/posix/src/sysconf.c b/cpukit/posix/src/sysconf.c index fbe790de5a..c0b18ed7dc 100644 --- a/cpukit/posix/src/sysconf.c +++ b/cpukit/posix/src/sysconf.c @@ -20,6 +20,7 @@ #include <rtems/system.h> #include <rtems/seterr.h> #include <rtems/score/tod.h> +#include <rtems/libio_.h> #include <sys/param.h> @@ -38,7 +39,6 @@ long sysconf( return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick); case _SC_OPEN_MAX: { - extern uint32_t rtems_libio_number_iops; return rtems_libio_number_iops; } diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h index 75a069ec72..07b78f465b 100644 --- a/cpukit/rtems/include/rtems/rtems/tasks.h +++ b/cpukit/rtems/include/rtems/rtems/tasks.h @@ -228,6 +228,15 @@ typedef struct { RTEMS_TASKS_EXTERN Objects_Information _RTEMS_tasks_Information; /** + * When the user configures a set of Classic API initialization tasks, + * This variable will point to the method used to initialize them. + * + * @note It is instantiated and initialized by confdefs.h based upon + * application requirements. + */ +extern void (*_RTEMS_tasks_Initialize_user_tasks_p)(void); + +/** * @brief _RTEMS_tasks_Manager_initialization * * This routine initializes all Task Manager related data structures. diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c index 442f5e6954..b49975bb6f 100644 --- a/cpukit/rtems/src/tasks.c +++ b/cpukit/rtems/src/tasks.c @@ -302,7 +302,6 @@ void _RTEMS_tasks_Manager_initialization( void _RTEMS_tasks_Initialize_user_tasks( void ) { - extern void (*_RTEMS_tasks_Initialize_user_tasks_p)(void); if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); } diff --git a/cpukit/score/include/rtems/score/stack.h b/cpukit/score/include/rtems/score/stack.h index a4ed0a74bc..758ad36c38 100644 --- a/cpukit/score/include/rtems/score/stack.h +++ b/cpukit/score/include/rtems/score/stack.h @@ -48,6 +48,13 @@ typedef struct { void *area; } Stack_Control; +/** + * This variable contains the the minimum stack size; + * + * @note It is instantiated and set by User Configuration via confdefs.h. + */ +extern uint32_t rtems_minimum_stack_size; + #ifndef __RTEMS_APPLICATION__ #include <rtems/score/stack.inl> #endif diff --git a/cpukit/score/inline/rtems/score/stack.inl b/cpukit/score/inline/rtems/score/stack.inl index 7726cf1a05..b7fb538747 100644 --- a/cpukit/score/inline/rtems/score/stack.inl +++ b/cpukit/score/inline/rtems/score/stack.inl @@ -47,7 +47,6 @@ RTEMS_INLINE_ROUTINE void _Stack_Initialize ( */ RTEMS_INLINE_ROUTINE uint32_t _Stack_Minimum (void) { - extern uint32_t rtems_minimum_stack_size; return rtems_minimum_stack_size; } diff --git a/cpukit/score/inline/rtems/score/thread.inl b/cpukit/score/inline/rtems/score/thread.inl index d790b4d9c4..ca692aa8a9 100644 --- a/cpukit/score/inline/rtems/score/thread.inl +++ b/cpukit/score/inline/rtems/score/thread.inl @@ -150,15 +150,19 @@ RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) #if defined(RTEMS_HEAVY_STACK_DEBUG) || defined(RTEMS_HEAVY_MALLOC_DEBUG) #include <rtems/bspIo.h> #include <rtems/fatal.h> + #include <rtems/stackchk.h> #include <rtems/score/sysstate.h> #include <rtems/score/heap.h> + + /* + * This is currently not defined in any .h file, so we have to + * extern it here. + */ + extern Heap_Control RTEMS_Malloc_Heap; #endif RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) { - extern boolean rtems_stack_checker_is_blown( void ); - extern void malloc_walk(size_t, size_t); - /* * This check is very brutal to system performance but is very helpful * at finding blown stack problems. If you have a stack problem and @@ -184,7 +188,6 @@ RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) */ #if defined(RTEMS_HEAVY_MALLOC_DEBUG) if ( _Thread_Dispatch_disable_level == 1 ) { - extern Heap_Control RTEMS_Malloc_Heap; _Heap_Walk( &RTEMS_Malloc_Heap,99, FALSE ); } #endif diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c index 187ec62f39..22c9f141cc 100644 --- a/cpukit/score/src/threadhandler.c +++ b/cpukit/score/src/threadhandler.c @@ -34,6 +34,13 @@ #include <stdlib.h> /* for atexit() */ #endif +#if defined(__USE_INIT_FINI__) + extern void _init(void); +#endif +#if defined(__USE__MAIN__) + extern void _main(void); +#endif + /*PAGE * * _Thread_Handler @@ -70,12 +77,6 @@ void _Thread_Handler( void ) static char doneConstructors; char doneCons; #endif -#if defined(__USE_INIT_FINI__) - extern void _init(void); -#endif -#if defined(__USE__MAIN__) - extern void _main(void); -#endif executing = _Thread_Executing; |