diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-05 21:18:29 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-05 21:18:29 +0000 |
commit | 88157a76de80e6182db7fb24baa374b7cfcdc960 (patch) | |
tree | 7bf1ee8d83b96092bc2531a5fa3e9e349f730432 /cpukit | |
parent | 2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-88157a76de80e6182db7fb24baa374b7cfcdc960.tar.bz2 |
2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/Makefile.am, rtems/Makefile.am, rtems/preinstall.am,
sapi/Makefile.am, sapi/preinstall.am, score/Makefile.am,
score/preinstall.am, score/include/rtems/score/heap.h,
score/inline/rtems/score/heap.inl: Remove inline version now that it
is in a C file.
* libcsupport/src/end_profile.c: New file.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 9 | ||||
-rw-r--r-- | cpukit/libcsupport/Makefile.am | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/end_profile.c | 5 | ||||
-rw-r--r-- | cpukit/rtems/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/rtems/preinstall.am | 16 | ||||
-rw-r--r-- | cpukit/sapi/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/sapi/preinstall.am | 16 | ||||
-rw-r--r-- | cpukit/score/Makefile.am | 34 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/heap.h | 17 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/heap.inl | 22 | ||||
-rw-r--r-- | cpukit/score/preinstall.am | 36 |
11 files changed, 107 insertions, 52 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 5c60dd65f6..da0718840f 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,14 @@ 2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com> + * libcsupport/Makefile.am, rtems/Makefile.am, rtems/preinstall.am, + sapi/Makefile.am, sapi/preinstall.am, score/Makefile.am, + score/preinstall.am, score/include/rtems/score/heap.h, + score/inline/rtems/score/heap.inl: Remove inline version now that it + is in a C file. + * libcsupport/src/end_profile.c: New file. + +2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com> + * score/Makefile.am: Move from inline to body to avoid path explosion from inlining this. Makes coverage analysis easier. * score/src/heapalignupuptr.c: New file. diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am index 8b59c5830a..ad50d80723 100644 --- a/cpukit/libcsupport/Makefile.am +++ b/cpukit/libcsupport/Makefile.am @@ -113,6 +113,8 @@ libcsupport_a_SOURCES = src/gxx_wrappers.c src/getchark.c src/printk.c \ $(BSD_LIBC_C_FILES) $(BASE_FS_C_FILES) $(MALLOC_C_FILES) \ $(ERROR_C_FILES) $(ASSOCIATION_C_FILES) +libcsupport_a_SOURCES += src/end_profile.c + if UNIX libcsupport_a_SOURCES += src/unixlibc.c src/unixlibc_io.c src/hosterr.c else diff --git a/cpukit/libcsupport/src/end_profile.c b/cpukit/libcsupport/src/end_profile.c new file mode 100644 index 0000000000..d0081a8323 --- /dev/null +++ b/cpukit/libcsupport/src/end_profile.c @@ -0,0 +1,5 @@ + +/* special symbol to mark end of profiling */ +void end_of_profiling(void) +{ +} diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am index 400fc40ad7..863652e8f9 100644 --- a/cpukit/rtems/Makefile.am +++ b/cpukit/rtems/Makefile.am @@ -7,6 +7,7 @@ include $(top_srcdir)/automake/compile.am AM_CPPFLAGS += -D__RTEMS_INSIDE__ +project_lib_LIBRARIES = librtems.a noinst_LIBRARIES = librtems.a librtems_a_CPPFLAGS = $(AM_CPPFLAGS) diff --git a/cpukit/rtems/preinstall.am b/cpukit/rtems/preinstall.am index 0d87743601..7e5b5692fa 100644 --- a/cpukit/rtems/preinstall.am +++ b/cpukit/rtems/preinstall.am @@ -8,16 +8,30 @@ endif PREINSTALL_DIRS = DISTCLEANFILES = $(PREINSTALL_DIRS) +all-local: $(TMPINSTALL_FILES) + +TMPINSTALL_FILES = +CLEANFILES = $(TMPINSTALL_FILES) + all-am: $(PREINSTALL_FILES) PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) +CLEANFILES += $(PREINSTALL_FILES) + +$(PROJECT_LIB)/$(dirstamp): + @$(MKDIR_P) $(PROJECT_LIB) + @: > $(PROJECT_LIB)/$(dirstamp) +PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) $(PROJECT_INCLUDE)/$(dirstamp): @$(MKDIR_P) $(PROJECT_INCLUDE) @: > $(PROJECT_INCLUDE)/$(dirstamp) PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) +$(PROJECT_LIB)/librtems.a: librtems.a $(PROJECT_LIB)/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_LIB)/librtems.a +TMPINSTALL_FILES += $(PROJECT_LIB)/librtems.a + $(PROJECT_INCLUDE)/rtems.h: include/rtems.h $(PROJECT_INCLUDE)/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems.h diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am index d279aa88e9..605cf84324 100644 --- a/cpukit/sapi/Makefile.am +++ b/cpukit/sapi/Makefile.am @@ -20,6 +20,7 @@ include_rtems_HEADERS += inline/rtems/chain.inl \ ## src AM_CPPFLAGS += -D__RTEMS_INSIDE__ +project_lib_LIBRARIES = libsapi.a noinst_LIBRARIES = libsapi.a libsapi_a_SOURCES = src/debug.c src/extension.c src/extensioncreate.c \ src/extensiondelete.c src/extensionident.c src/fatal.c src/exinit.c \ diff --git a/cpukit/sapi/preinstall.am b/cpukit/sapi/preinstall.am index ba4ef1200c..975828246c 100644 --- a/cpukit/sapi/preinstall.am +++ b/cpukit/sapi/preinstall.am @@ -8,10 +8,20 @@ endif PREINSTALL_DIRS = DISTCLEANFILES = $(PREINSTALL_DIRS) +all-local: $(TMPINSTALL_FILES) + +TMPINSTALL_FILES = +CLEANFILES = $(TMPINSTALL_FILES) + all-am: $(PREINSTALL_FILES) PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) +CLEANFILES += $(PREINSTALL_FILES) + +$(PROJECT_LIB)/$(dirstamp): + @$(MKDIR_P) $(PROJECT_LIB) + @: > $(PROJECT_LIB)/$(dirstamp) +PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) $(PROJECT_INCLUDE)/rtems/$(dirstamp): @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems @@ -62,3 +72,7 @@ $(PROJECT_INCLUDE)/rtems/extension.inl: inline/rtems/extension.inl $(PROJECT_INC $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/extension.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/extension.inl +$(PROJECT_LIB)/libsapi.a: libsapi.a $(PROJECT_LIB)/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_LIB)/libsapi.a +TMPINSTALL_FILES += $(PROJECT_LIB)/libsapi.a + diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am index df91a3865f..12a4be81f7 100644 --- a/cpukit/score/Makefile.am +++ b/cpukit/score/Makefile.am @@ -21,8 +21,7 @@ include_rtems_score_HEADERS = include/rtems/score/address.h \ include/rtems/score/bitfield.h include/rtems/score/chain.h \ include/rtems/score/context.h include/rtems/score/copyrt.h \ include/rtems/score/corebarrier.h include/rtems/score/coremsg.h \ - include/rtems/score/coremutex.h include/rtems/score/corerwlock.h \ - include/rtems/score/coresem.h \ + include/rtems/score/coremutex.h include/rtems/score/coresem.h \ include/rtems/score/heap.h include/rtems/score/protectedheap.h \ include/rtems/score/interr.h include/rtems/score/isr.h \ include/rtems/score/object.h include/rtems/score/priority.h \ @@ -35,8 +34,9 @@ include_rtems_score_HEADERS = include/rtems/score/address.h \ include/rtems/score/watchdog.h include/rtems/score/wkspace.h \ include/rtems/score/cpuopts.h -if LIBPOSIX -include_rtems_score_HEADERS += include/rtems/score/corespinlock.h +if HAS_PTHREADS +include_rtems_score_HEADERS += include/rtems/score/corespinlock.h \ + include/rtems/score/corerwlock.h endif if HAS_MP @@ -49,17 +49,18 @@ endif ## inline include_rtems_score_HEADERS += inline/rtems/score/address.inl \ inline/rtems/score/chain.inl inline/rtems/score/corebarrier.inl \ - inline/rtems/score/coremsg.inl inline/rtems/score/corerwlock.inl \ - inline/rtems/score/coremutex.inl inline/rtems/score/coresem.inl \ - inline/rtems/score/heap.inl inline/rtems/score/isr.inl \ - inline/rtems/score/object.inl inline/rtems/score/priority.inl \ - inline/rtems/score/stack.inl inline/rtems/score/states.inl \ - inline/rtems/score/sysstate.inl inline/rtems/score/thread.inl \ - inline/rtems/score/threadq.inl inline/rtems/score/tod.inl \ - inline/rtems/score/tqdata.inl \ + inline/rtems/score/coremsg.inl inline/rtems/score/coremutex.inl \ + inline/rtems/score/coresem.inl inline/rtems/score/heap.inl \ + inline/rtems/score/isr.inl inline/rtems/score/object.inl \ + inline/rtems/score/priority.inl inline/rtems/score/stack.inl \ + inline/rtems/score/states.inl inline/rtems/score/sysstate.inl \ + inline/rtems/score/thread.inl inline/rtems/score/threadq.inl \ + inline/rtems/score/tod.inl inline/rtems/score/tqdata.inl \ inline/rtems/score/watchdog.inl inline/rtems/score/wkspace.inl -if LIBPOSIX -include_rtems_score_HEADERS += inline/rtems/score/corespinlock.inl + +if HAS_PTHREADS +include_rtems_score_HEADERS += inline/rtems/score/corespinlock.inl \ + inline/rtems/score/corerwlock.inl endif if HAS_MP @@ -72,6 +73,7 @@ endif AM_CPPFLAGS += -D__RTEMS_INSIDE__ +project_lib_LIBRARIES = libscore.a noinst_LIBRARIES = libscore.a libscore_a_SOURCES = libscore_a_CPPFLAGS = $(AM_CPPFLAGS) @@ -101,15 +103,17 @@ libscore_a_SOURCES += src/coremutex.c src/coremutexflush.c \ src/coremutexseizeintr.c ## CORE_RWLOCK_C_FILES +if HAS_PTHREADS libscore_a_SOURCES += src/corerwlock.c src/corerwlockobtainread.c \ src/corerwlockobtainwrite.c src/corerwlockrelease.c src/corerwlocktimeout.c +endif ## CORE_SEMAPHORE_C_FILES libscore_a_SOURCES += src/coresem.c src/coresemflush.c src/coresemseize.c \ src/coresemsurrender.c ## CORE_SPINLOCK_C_FILES -if LIBPOSIX +if HAS_PTHREADS libscore_a_SOURCES += src/corespinlock.c src/corespinlockrelease.c \ src/corespinlockwait.c endif diff --git a/cpukit/score/include/rtems/score/heap.h b/cpukit/score/include/rtems/score/heap.h index 30d1bd6846..240cf0cd42 100644 --- a/cpukit/score/include/rtems/score/heap.h +++ b/cpukit/score/include/rtems/score/heap.h @@ -449,7 +449,7 @@ void _Heap_Get_free_information( * * @return This method returns block size on success, 0 if overflow occured. */ -extern size_t _Heap_Calc_block_size( +size_t _Heap_Calc_block_size( size_t size, uint32_t page_size, uint32_t min_size @@ -471,12 +471,25 @@ extern size_t _Heap_Calc_block_size( * * @return This methods returns the size of the allocated block. */ -extern uint32_t _Heap_Block_allocate( +uint32_t _Heap_Block_allocate( Heap_Control* the_heap, Heap_Block* the_block, uint32_t alloc_size ); +/** + * Align @a *value up to the nearest multiple of @a alignment. + * + * @param[in] value is a pointer to be aligned. + * @param[in] alignment is the alignment value. + * + * @return Upon return, @a value will contain the aligned result. + */ +void _Heap_Align_up_uptr ( + _H_uptr_t *value, + uint32_t alignment +); + /* * Debug support */ diff --git a/cpukit/score/inline/rtems/score/heap.inl b/cpukit/score/inline/rtems/score/heap.inl index f080ed7fdc..bdbe40029a 100644 --- a/cpukit/score/inline/rtems/score/heap.inl +++ b/cpukit/score/inline/rtems/score/heap.inl @@ -226,28 +226,6 @@ RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned_ptr ( } /** - * Align @a *value up to the nearest multiple of @a alignment. - * - * @param[in] value is a pointer to be aligned. - * @param[in] alignment is the alignment value. - * - * @return Upon return, @a value will contain the aligned result. - */ -RTEMS_INLINE_ROUTINE void _Heap_Align_up_uptr ( - _H_uptr_t *value, - uint32_t alignment -) -{ - _H_uptr_t remainder; - _H_uptr_t v = *value; - - remainder = v % alignment; - - if ( remainder ) - *value = v - remainder + alignment; -} - -/** * Align @a *value down to the nearest multiple of @a alignment. * * @param[in] value is a pointer to be aligned. diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am index 95e6a30563..932e176f05 100644 --- a/cpukit/score/preinstall.am +++ b/cpukit/score/preinstall.am @@ -8,10 +8,20 @@ endif PREINSTALL_DIRS = DISTCLEANFILES += $(PREINSTALL_DIRS) +all-local: $(TMPINSTALL_FILES) + +TMPINSTALL_FILES = +CLEANFILES = $(TMPINSTALL_FILES) + all-am: $(PREINSTALL_FILES) PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) +CLEANFILES += $(PREINSTALL_FILES) + +$(PROJECT_LIB)/$(dirstamp): + @$(MKDIR_P) $(PROJECT_LIB) + @: > $(PROJECT_LIB)/$(dirstamp) +PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) $(PROJECT_INCLUDE)/rtems/$(dirstamp): @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems @@ -75,10 +85,6 @@ $(PROJECT_INCLUDE)/rtems/score/coremutex.h: include/rtems/score/coremutex.h $(PR $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/coremutex.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/coremutex.h -$(PROJECT_INCLUDE)/rtems/score/corerwlock.h: include/rtems/score/corerwlock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corerwlock.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/corerwlock.h - $(PROJECT_INCLUDE)/rtems/score/coresem.h: include/rtems/score/coresem.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/coresem.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/coresem.h @@ -167,10 +173,14 @@ $(PROJECT_INCLUDE)/rtems/score/cpuopts.h: include/rtems/score/cpuopts.h $(PROJEC $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpuopts.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpuopts.h -if LIBPOSIX +if HAS_PTHREADS $(PROJECT_INCLUDE)/rtems/score/corespinlock.h: include/rtems/score/corespinlock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corespinlock.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/corespinlock.h + +$(PROJECT_INCLUDE)/rtems/score/corerwlock.h: include/rtems/score/corerwlock.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corerwlock.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/corerwlock.h endif if HAS_MP $(PROJECT_INCLUDE)/rtems/score/mpci.h: include/rtems/score/mpci.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) @@ -205,10 +215,6 @@ $(PROJECT_INCLUDE)/rtems/score/coremsg.inl: inline/rtems/score/coremsg.inl $(PRO $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/coremsg.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/coremsg.inl -$(PROJECT_INCLUDE)/rtems/score/corerwlock.inl: inline/rtems/score/corerwlock.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corerwlock.inl -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/corerwlock.inl - $(PROJECT_INCLUDE)/rtems/score/coremutex.inl: inline/rtems/score/coremutex.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/coremutex.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/coremutex.inl @@ -269,10 +275,14 @@ $(PROJECT_INCLUDE)/rtems/score/wkspace.inl: inline/rtems/score/wkspace.inl $(PRO $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/wkspace.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/wkspace.inl -if LIBPOSIX +if HAS_PTHREADS $(PROJECT_INCLUDE)/rtems/score/corespinlock.inl: inline/rtems/score/corespinlock.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corespinlock.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/corespinlock.inl + +$(PROJECT_INCLUDE)/rtems/score/corerwlock.inl: inline/rtems/score/corerwlock.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corerwlock.inl +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/corerwlock.inl endif if HAS_MP $(PROJECT_INCLUDE)/rtems/score/mppkt.inl: inline/rtems/score/mppkt.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) @@ -287,3 +297,7 @@ $(PROJECT_INCLUDE)/rtems/score/threadmp.inl: inline/rtems/score/threadmp.inl $(P $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/threadmp.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/threadmp.inl endif +$(PROJECT_LIB)/libscore.a: libscore.a $(PROJECT_LIB)/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_LIB)/libscore.a +TMPINSTALL_FILES += $(PROJECT_LIB)/libscore.a + |