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/score | |
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 '')
-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 |
4 files changed, 59 insertions, 50 deletions
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 + |