[PATCH] rtems/malloc.h: Add API level Doxygen group
The interfaces in the MallocSupport group belong to the implementation. They are used by confdefs.h for example. --- cpukit/include/rtems/malloc.h | 60 --- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/cpukit/include/rtems/malloc.h b/cpukit/include/rtems/malloc.h index 7d7f8fa677..c26b262881 100644 --- a/cpukit/include/rtems/malloc.h +++ b/cpukit/include/rtems/malloc.h @@ -3,7 +3,12 @@ /** * @file * - * This file defines the interface to RTEMS extensions to the Malloc Family. + * @ingroup MallocSupport + * + * @ingroup RTEMSAPIMalloc + * + * @brief This header file defines interfaces to support and use dynamic memory + * allocation. */ /* @@ -46,11 +51,13 @@ extern "C" { #endif /** - * @defgroup MallocSupport Malloc Support + * @defgroup MallocSupport Malloc Support + * + * @ingroup libcsupport * - * @ingroup libcsupport + * @brief This group contains interfaces to support dynamic memory allocation. * - * @brief RTEMS extensions to the Malloc Family + * @{ */ /** @@ -63,8 +70,6 @@ extern Heap_Control *RTEMS_Malloc_Heap; void _Malloc_Initialize( void ); -void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount ); - typedef void *(*rtems_heap_extend_handler)( Heap_Control *heap, size_t alloc_size @@ -78,19 +83,6 @@ void *rtems_heap_extend_via_sbrk( size_t alloc_size ); -/** - * @brief Greedy allocate that empties the sbrk memory - * - * Afterwards all the sbrk avialable memory will have been allocated - * to the provided heap. - * - * @see rtems_heap_extend_via_sbrk(). - */ -void rtems_heap_sbrk_greedy_allocate( - Heap_Control *heap, - size_t alloc_size -); - void *rtems_heap_null_extend( Heap_Control *heap, size_t alloc_size @@ -104,6 +96,34 @@ extern const rtems_heap_extend_handler rtems_malloc_extend_handler; typedef void (*rtems_malloc_dirtier_t)(void *, size_t); extern rtems_malloc_dirtier_t rtems_malloc_dirty_helper; +/** @} */ + +/** + * @defgroup RTEMSAPIMalloc Dynamic Memory Allocation + * + * @ingroup RTEMSAPI + * + * @brief This group contains non-standard interfaces to use dynamic memory + * allocation. + * + * @{ + */ + +void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount ); + +/** + * @brief Greedy allocate that empties the sbrk memory + * + * Afterwards all the sbrk avialable memory will have been allocated + * to the provided heap. + * + * @see rtems_heap_extend_via_sbrk(). + */ +void rtems_heap_sbrk_greedy_allocate( + Heap_Control *heap, + size_t alloc_size +); + /** * @brief Dirty Memory Function * @@ -251,6 +271,8 @@ void *rtems_heap_greedy_allocate_all_except_largest( */ void rtems_heap_greedy_free( void *opaque ); +/** @} */ + #ifdef __cplusplus } #endif -- 2.35.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] rtems/malloc.h: Add API level Doxygen group
This looks good. On Wed, Aug 10, 2022 at 8:24 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > The interfaces in the MallocSupport group belong to the implementation. > They > are used by confdefs.h for example. > --- > cpukit/include/rtems/malloc.h | 60 --- > 1 file changed, 41 insertions(+), 19 deletions(-) > > diff --git a/cpukit/include/rtems/malloc.h b/cpukit/include/rtems/malloc.h > index 7d7f8fa677..c26b262881 100644 > --- a/cpukit/include/rtems/malloc.h > +++ b/cpukit/include/rtems/malloc.h > @@ -3,7 +3,12 @@ > /** > * @file > * > - * This file defines the interface to RTEMS extensions to the Malloc > Family. > + * @ingroup MallocSupport > + * > + * @ingroup RTEMSAPIMalloc > + * > + * @brief This header file defines interfaces to support and use dynamic > memory > + * allocation. > */ > > /* > @@ -46,11 +51,13 @@ extern "C" { > #endif > > /** > - * @defgroup MallocSupport Malloc Support > + * @defgroup MallocSupport Malloc Support > + * > + * @ingroup libcsupport > * > - * @ingroup libcsupport > + * @brief This group contains interfaces to support dynamic memory > allocation. > * > - * @brief RTEMS extensions to the Malloc Family > + * @{ > */ > > /** > @@ -63,8 +70,6 @@ extern Heap_Control *RTEMS_Malloc_Heap; > > void _Malloc_Initialize( void ); > > -void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount ); > - > typedef void *(*rtems_heap_extend_handler)( >Heap_Control *heap, >size_t alloc_size > @@ -78,19 +83,6 @@ void *rtems_heap_extend_via_sbrk( >size_t alloc_size > ); > > -/** > - * @brief Greedy allocate that empties the sbrk memory > - * > - * Afterwards all the sbrk avialable memory will have been allocated > - * to the provided heap. > - * > - * @see rtems_heap_extend_via_sbrk(). > - */ > -void rtems_heap_sbrk_greedy_allocate( > - Heap_Control *heap, > - size_t alloc_size > -); > - > void *rtems_heap_null_extend( >Heap_Control *heap, >size_t alloc_size > @@ -104,6 +96,34 @@ extern const rtems_heap_extend_handler > rtems_malloc_extend_handler; > typedef void (*rtems_malloc_dirtier_t)(void *, size_t); > extern rtems_malloc_dirtier_t rtems_malloc_dirty_helper; > > +/** @} */ > + > +/** > + * @defgroup RTEMSAPIMalloc Dynamic Memory Allocation > + * > + * @ingroup RTEMSAPI > + * > + * @brief This group contains non-standard interfaces to use dynamic > memory > + * allocation. > + * > + * @{ > + */ > + > +void rtems_heap_set_sbrk_amount( ptrdiff_t sbrk_amount ); > + > +/** > + * @brief Greedy allocate that empties the sbrk memory > + * > + * Afterwards all the sbrk avialable memory will have been allocated > + * to the provided heap. > + * > + * @see rtems_heap_extend_via_sbrk(). > + */ > +void rtems_heap_sbrk_greedy_allocate( > + Heap_Control *heap, > + size_t alloc_size > +); > + > /** > * @brief Dirty Memory Function > * > @@ -251,6 +271,8 @@ void *rtems_heap_greedy_allocate_all_except_largest( > */ > void rtems_heap_greedy_free( void *opaque ); > > +/** @} */ > + > #ifdef __cplusplus > } > #endif > -- > 2.35.3 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
How to automate finding comments in copyright/license block
Hi I've spotted a few cases like this over the past couple of weeks and wonder how we can automate finding them: /* * 6.7.7 Wait for Asynchronous I/O Request, P1003.1b-1993, p. 164 * * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * The reference to a page in the very old POSIX standard shouldn't be in this block. This is ignoring that we probably need to figure out what to do with references to the paper copy of the 1993 POSIX standard. That's another task. And ignoring that there are still many files to relicense. --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [rtems-docs PATCH] loader.rst: Add documentation for AArch64 support
I'm ok with this but would like an ack from someone else. --joel On Tue, Aug 9, 2022 at 11:03 AM Ryan Long wrote: > --- > user/exe/loader.rst | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/user/exe/loader.rst b/user/exe/loader.rst > index de77343..2a248b1 100644 > --- a/user/exe/loader.rst > +++ b/user/exe/loader.rst > @@ -837,6 +837,7 @@ Architectures > > The following architectures are supported: > > + - AArch64 > - ARM > - Blackfin > - H8300 > @@ -849,6 +850,15 @@ The following architectures are supported: > - SPARC > - V850 > > +AArch64 > +^^^ > + > +The AArch64 relocation backend supports veneers. > + > +The veneer implementation is two instructions and a 64bit target address > +making the overhead 16 bytes for each veneer. The performance overhead is > two > +instructions. > + > ARM > ^^^ > > -- > 2.30.2 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Binary CPU / Thread information.
I saw that there was a console command to see cpu usage information. https://docs.rtems.org/branches/master/c-user/cpu_usage_statistics.html Is there a binary api to get this, and stack usage? I want to get this info out and send it in binary packets. Is this something that I need to just copy whats going on in this file? cpukit/libmisc/cpuuse/cpuusagereport.c https://github.com/RTEMS/rtems/blob/fab1a86221e057a93bb9c1423dac81ed2b29ecde/cpukit/libmisc/cpuuse/cpuusagereport.c#L60 or is there a c api out there that i am missing that fills usage information into c structs? -- Thank you, Sam Price ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH rtems-docs] eng/req/howto.rst: Fix ./spec2dmodules.py to ./spec2modules.py typo
--- eng/req/howto.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/req/howto.rst b/eng/req/howto.rst index bd94b77..42c35ac 100644 --- a/eng/req/howto.rst +++ b/eng/req/howto.rst @@ -238,7 +238,7 @@ make sure the Git submodules are up-to-date. .. code-block:: none -$ ./spec2dmodules.py +$ ./spec2modules.py The script modifies or creates source files in :file:`modules/rtems` and :file:`modules/rtems-docs`. Create patch sets for these changes just as if -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
rtems-central: spec2modules crash
Hi I think I followed the instructions but spec2modules.py died with this: (env) [joel@localhost rtems-central]$ ./spec2modules.py Traceback (most recent call last): File "./spec2modules.py", line 84, in main() File "./spec2modules.py", line 70, in main item_cache = rtemsspec.items.ItemCache(config["spec"]) File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/items.py", line 655, in __init__ self._load_items(config) File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/items.py", line 758, in _load_items self._load_items_recursive(str(index), path, path, cache_dir) File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/items.py", line 746, in _load_items_recursive for name in os.listdir(path): FileNotFoundError: [Errno 2] No such file or directory: 'modules/rtems/spec' (env) [joel@localhost rtems-central]$ vi spec2modules.py (env) [joel@localhost rtems-central]$ /usr/bin/env python Python 3.6.12 (default, Oct 23 2020, 13:36:31) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> A bit of investigation showed that the various rtems module directories were empty. Can the tool do a sanity check and report something more useful than a stack trace? I feel like an old man yelling at clouds but a stack trace is a horrible way to report what is a reasonable to expect setup error. A simple check and message to hint what's going on really and how to resolve it would be better. --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
rtems-central: spec2module fails with no changes to repos
Hi It looks like the rtems-central repo fails when spec2modules is run on it currently with no local changes. env) [joel@localhost rtems-central]$ ./spec2modules.py Traceback (most recent call last): File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/validation.py", line 202, in add_test_case_description test_suites = test_case_to_suites[self.uid] KeyError: '/score/thread/val/idle-body-no-return' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "./spec2modules.py", line 84, in main() File "./spec2modules.py", line 72, in main args.targets) File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/validation.py", line 1193, in generate src.generate(config["base-directory"], test_case_to_suites) File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/validation.py", line 1076, in generate item.generate(content, base_directory, test_case_to_suites) File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/validation.py", line 449, in generate self.add_test_case_description(content, test_case_to_suites) File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/validation.py", line 207, in add_test_case_description raise ValueError(msg) from err ValueError: the target file 'testsuites/validation/tc-thread-idle-body-no-return.c' of spec:/score/thread/val/idle-body-no-return is not a source file of an item of type 'build/test-program' Thanks. --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [rtems-docs PATCH] loader.rst: Add documentation for AArch64 support
On 10/8/2022 11:39 pm, Joel Sherrill wrote: > I'm ok with this but would like an ack from someone else. Sorry, I missed this. OK to push :) Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: rtems-central: spec2modules crash
On 11/8/2022 6:50 am, Joel Sherrill wrote: > I feel like an old man yelling at clouds TikTok? Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 0/1] Add confdefs/face.h to install rule
Duc Doan (1): build/cpukit: Add confdefs/face.h to install rule spec/build/cpukit/librtemscpu.yml | 1 + 1 file changed, 1 insertion(+) -- 2.37.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 1/1] build/cpukit: Add confdefs/face.h to install rule
Updates #4691 --- spec/build/cpukit/librtemscpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/build/cpukit/librtemscpu.yml b/spec/build/cpukit/librtemscpu.yml index 2b12507bff..1270ca131b 100644 --- a/spec/build/cpukit/librtemscpu.yml +++ b/spec/build/cpukit/librtemscpu.yml @@ -191,6 +191,7 @@ install: - cpukit/include/rtems/confdefs/clock.h - cpukit/include/rtems/confdefs/console.h - cpukit/include/rtems/confdefs/extensions.h + - cpukit/include/rtems/confdefs/face.h - cpukit/include/rtems/confdefs/inittask.h - cpukit/include/rtems/confdefs/initthread.h - cpukit/include/rtems/confdefs/iodrivers.h -- 2.37.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 1/1] build/cpukit: Add confdefs/face.h to install rule
Looks good and thanks for fixing this. I will push it. Chris On 11/8/2022 3:37 pm, Duc Doan wrote: > Updates #4691 > --- > spec/build/cpukit/librtemscpu.yml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/spec/build/cpukit/librtemscpu.yml > b/spec/build/cpukit/librtemscpu.yml > index 2b12507bff..1270ca131b 100644 > --- a/spec/build/cpukit/librtemscpu.yml > +++ b/spec/build/cpukit/librtemscpu.yml > @@ -191,6 +191,7 @@ install: >- cpukit/include/rtems/confdefs/clock.h >- cpukit/include/rtems/confdefs/console.h >- cpukit/include/rtems/confdefs/extensions.h > + - cpukit/include/rtems/confdefs/face.h >- cpukit/include/rtems/confdefs/inittask.h >- cpukit/include/rtems/confdefs/initthread.h >- cpukit/include/rtems/confdefs/iodrivers.h ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel