Re: [rtems-libbsd commit] sys/kern: Add VFS support
On 09/02/2022 22:58, Chris Johns wrote: On 9/2/22 7:43 pm, Sebastian Huber wrote: On 09/02/2022 09:41, Sebastian Huber wrote: On 08/02/2022 11:07, Chris Johns wrote: It seems that the commit is not present in the master branch. This means all the work will be lost when we update to a newer FreeBSD baseline. Yes. It is an out standing task that I need to get funding for. What are your plans and if you are looking to update, timeline? The last update was in 2019, so we ship a pretty outdated FreeBSD in libbsd. I currently estimate the work to do an update, but I don't have a timeline. Actually the last update was "Update to FreeBSD stable/12 2020-02-10". Which branch or branches are you referring too? The 6-freebsd-12 and master branches. Updating the 6-freebsd-12 branch is not an issue. If we update the master branch to the latest FreeBSD main branch, then some work done for the 6-freebsd-12 branch is lost. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] added malloc usable size and test
--- cpukit/include/rtems/libcsupport.h| 8 ++- cpukit/libcsupport/src/mallocusablesize.c | 28 +++ spec/build/cpukit/librtemscpu.yml | 1 + testsuites/libtests/malloctest/init.c | 15 +++- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 cpukit/libcsupport/src/mallocusablesize.c diff --git a/cpukit/include/rtems/libcsupport.h b/cpukit/include/rtems/libcsupport.h index f4be4cfc9a..1fe0f6735f 100644 --- a/cpukit/include/rtems/libcsupport.h +++ b/cpukit/include/rtems/libcsupport.h @@ -73,7 +73,12 @@ extern size_t malloc_free_space(void); * Find amount of free heap remaining. */ extern int malloc_info(Heap_Information_block *the_info); - +/** + * @brief Get malloc status information. + * + * Find the usable size of the block of memory . + */ +extern size_t malloc_usable_size(void *ptr); /* * Prototypes required to install newlib reentrancy user extension */ @@ -185,6 +190,7 @@ bool rtems_resource_snapshot_equal( */ bool rtems_resource_snapshot_check(const rtems_resource_snapshot *snapshot); + /** @} */ #ifdef __cplusplus diff --git a/cpukit/libcsupport/src/mallocusablesize.c b/cpukit/libcsupport/src/mallocusablesize.c new file mode 100644 index 00..10114182a6 --- /dev/null +++ b/cpukit/libcsupport/src/mallocusablesize.c @@ -0,0 +1,28 @@ +/* + * COPYRIGHT (c) 1989-2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +Heap_Control *heap_ptr; +size_t malloc_usable_size(void *ptr) { + uintptr_t size; + if (ptr == NULL) { +return 0; + } + + heap_ptr = malloc_get_heap_pointer(); + _Heap_Size_of_alloc_area(heap_ptr, ptr, &size); + + return size; +} diff --git a/spec/build/cpukit/librtemscpu.yml b/spec/build/cpukit/librtemscpu.yml index 7d6dbae0db..5902008c94 100644 --- a/spec/build/cpukit/librtemscpu.yml +++ b/spec/build/cpukit/librtemscpu.yml @@ -670,6 +670,7 @@ source: - cpukit/libcsupport/src/lseek.c - cpukit/libcsupport/src/lstat.c - cpukit/libcsupport/src/malloc.c +- cpukit/libcsupport/src/mallocusablesize.c - cpukit/libcsupport/src/malloc_deferred.c - cpukit/libcsupport/src/malloc_dirtier.c - cpukit/libcsupport/src/malloc_walk.c diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index a33764177d..2202546719 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -1362,6 +1362,18 @@ static void test_alloc_zero_size(void) rtems_test_assert( p == NULL ); rtems_test_assert( errno == -1 ); } +static void test_usablesize(void) +{ + int * a = malloc(sizeof( int )*100); + int alloc_size=sizeof( int ) *100 ; + rtems_test_assert( malloc_usable_size(a) <= alloc_size + CPU_HEAP_ALIGNMENT); + free(a); + + char * b = malloc(sizeof(char)*100); + int alloc_size2=sizeof(char) *100 ; + rtems_test_assert( malloc_usable_size ( b ) <= alloc_size2 + CPU_HEAP_ALIGNMENT); + free(b); +} rtems_task Init( rtems_task_argument argument @@ -1405,6 +1417,7 @@ rtems_task Init( test_protected_heap_info(); test_rtems_heap_allocate_aligned_with_boundary(); test_rtems_malloc(); + test_usablesize(); test_rtems_calloc(); test_greedy_allocate(); test_alloc_zero_size(); @@ -1524,4 +1537,4 @@ RTEMS_SYSINIT_ITEM( test_early_malloc, RTEMS_SYSINIT_INITIAL_EXTENSIONS, RTEMS_SYSINIT_ORDER_FIRST -); +); \ No newline at end of file -- 2.35.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH rtems-docs] Add option --build-manuals to build multiple specific manuals.
On 12/2/22 3:37 am, Shashvat wrote: > Hi Gedare!! > > Is there a ticket associated with this, or any feature request? Or >> just something you thought of doing? >> > > I am sorry I should have mentioned the motive behind the option. > I was planning to work on ticket # which works on a specific > posix-users manual afaik. I wanted waf to build only this particular manual > so asked Chris on discord if it is possible and he told me how it was > broken, and that it would be good to add an option that enables this. I think this is nice feature to have if you are concentrating on a specific manual. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] bsp/atsam: Improve UART / USART tx performance
ok for 5 and master On Fri, Feb 11, 2022 at 1:07 AM Christian Mauderer wrote: > > Put the next character into the send buffer if the buffer is empty and > not when the last character has been sent out to the line. This improves > the performance slightly. > > Before that patch, the receive path was faster than the transmit path. > Therefore a simple echo could drop characters on a busy connection. > With this patch sending and receiving has about the same performance so > that no characters are lost. > > Fixes #4610 > --- > > > Note: The problem exists on 5 and master. The ticket for 5 is #4611. I would > like to push this patch to both branches. > > > > bsps/arm/atsam/console/console.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/bsps/arm/atsam/console/console.c > b/bsps/arm/atsam/console/console.c > index 5ef4327e11..0802ca2155 100644 > --- a/bsps/arm/atsam/console/console.c > +++ b/bsps/arm/atsam/console/console.c > @@ -145,8 +145,9 @@ static void atsam_uart_interrupt(void *arg) > } >} > > - if (ctx->transmitting && (sr & UART_SR_TXEMPTY) != 0) { > + while (ctx->transmitting && (sr & UART_SR_TXRDY) != 0) { > rtems_termios_dequeue_characters(tty, 1); > +sr = regs->UART_SR; >} > } > #endif > @@ -408,16 +409,16 @@ static void atsam_uart_write( >if (len > 0) { > ctx->transmitting = true; > regs->UART_THR = buf[0]; > -regs->UART_IER = UART_IDR_TXEMPTY; > +regs->UART_IER = UART_IDR_TXRDY; >} else { > ctx->transmitting = false; > -regs->UART_IDR = UART_IDR_TXEMPTY; > +regs->UART_IDR = UART_IDR_TXRDY; >} > #else >size_t i; > >for (i = 0; i < len; ++i) { > -while ((regs->UART_SR & UART_SR_TXEMPTY) == 0) { > +while ((regs->UART_SR & UART_SR_TXRDY) == 0) { >/* Wait */ > } > > -- > 2.31.1 > > ___ > 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