Re: Decreasing BSS size for STM32F4
On 29/10/14 17:49, Chris Nott wrote: Hi, I have a BSP almost identical to STM32F4 except I want a slight change to the linker settings (I want to offset the start location because there is a bootloader at location 0). Two questions: - Is there any way to do this other than to a) duplicate the BSP and change just the linker files You can use your own linker command file with the "-qnolinkcmds -T yourlinkcmds" option. b) use the STM32F4 BSP as-is but copy the linker files into the application project and modify (this is the solution I am using now) - As a matter of policy, how different should a platform be before we fork a BSP? This is hard to say. In case the number of #ifdefs exceed a certain limit, then it may make sense to use different BSPs. The amount of copy and paste must should be next to zero though. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Decreasing BSS size for STM32F4
On 14/10/14 12:47, Мороз Олег wrote: arm-rtems4.11-readelf -l shell.exe Elf file type is EXEC (Executable file) Entry point 0x8000189 There are 4 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x027aa0 0x080279e8 0x080279e8 0x8 0x8 R 0x4 LOAD 0xb8 0x0800 0x0800 0x27a00 0x27a00 RWE 0x8 LOAD 0x027ab8 0x20001188 0x08027a00 0x0061c 0x0061c RW 0x8 LOAD 0x0280e0 0x2000 0x2000 0x0 0x3 RW 0x20 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 .start .text .init .fini .rodata .ARM.exidx .eh_frame .init_array .fini_array .jcr 02 .data 03 .vector .bss .work On 14.10.2014 14:10, Sebastian Huber wrote: arm-rtems4.11-readelf -l Actually readelf -l was not really the right tool, with objdump -h you get something like this (or readelf -S): objdump -h testsuite/syscalls01/syscalls01.exe testsuite/syscalls01/syscalls01.exe: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .start0684 0010 0010 00c0 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .xbarrier 00100684 00100684 000d5c68 2**0 CONTENTS 2 .text 000c01e4 001006c0 001006c0 0780 2**6 CONTENTS, ALLOC, LOAD, CODE 3 .init 000c 001c08a4 001c08a4 000c0964 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 4 .fini 000c 001c08b0 001c08b0 000c0970 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 5 .robarrier 001c08bc 001c08bc 000d5c68 2**0 CONTENTS 6 .rodata cb10 001c08c0 001c08c0 000c0980 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .ARM.exidx0008 001cd3d0 001cd3d0 000cd490 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .eh_frame 0074 001cd3d8 001cd3d8 000cd498 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 9 .init_array 0004 001cd44c 001cd44c 000cd50c 2**2 CONTENTS, ALLOC, LOAD, DATA 10 .fini_array 0004 001cd450 001cd450 000cd510 2**2 CONTENTS, ALLOC, LOAD, DATA 11 .jcr 0004 001cd454 001cd454 000cd514 2**2 CONTENTS, ALLOC, LOAD, DATA 12 .rtemsroset 0578 001cd458 001cd458 000cd518 2**2 CONTENTS, ALLOC, LOAD, DATA 13 .rwbarrier00032630 001cd9d0 001cd9d0 000cda90 2**0 ALLOC 14 .vector 1700 0020 0020 000cda90 2**0 ALLOC 15 .data 7f2c 00201700 00201700 000cdb00 2**3 CONTENTS, ALLOC, LOAD, DATA 16 .rtemsrwset 023c 0020962c 0020962c 000d5a2c 2**2 CONTENTS, ALLOC, LOAD, DATA 17 .bss 734e 00209880 00209880 000d5c68 2**7 ALLOC 18 .work 0fdeb432 00210bce 00210bce 000d5c68 2**0 ALLOC 19 .stack 0fffc000 0fffc000 000d5c68 2**0 CONTENTS 20 .comment 0072 000d5c68 2**0 CONTENTS, READONLY 21 .debug_aranges 4a50 000d5ce0 2**3 CONTENTS, READONLY, DEBUGGING 22 .debug_info 004b9125 000da730 2**0 CONTENTS, READONLY, DEBUGGING 23 .debug_abbrev 0004c7d9 00593855 2**0 CONTENTS, READONLY, DEBUGGING 24 .debug_line 0008d95a 005e002e 2**0 CONTENTS, READONLY, DEBUGGING 25 .debug_frame 00030748 0066d988 2**2 CONTENTS, READONLY, DEBUGGING 26 .debug_str000377cc 0069e0d0 2**0 CONTENTS, READONLY, DEBUGGING 27 .debug_loc000723ef 006d589c 2**0 CONTENTS, READONLY, DEBUGGING 28 .ARM.attributes 0033 00747c8b 2**0 CONTENTS, READONLY So the major section is .work which contains the RTEMS workspace and the C program heap. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: 4.11 Branching To Do
On 29/10/14 22:49, Joel Sherrill wrote: Very desirable = + x86 context switch SMP handoff logic For someone with good enough x86 assembly skills, this should be fairly simple. You just have to implement the sequence described here: http://git.rtems.org/rtems/tree/cpukit/score/cpu/no_cpu/rtems/score/cpu.h#n578 -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [rtems commit] libmisc: Add top to cpuusage.
On 28/10/14 16:17, Jennifer Averett wrote: +/* Count the number of tasks and sort this load value */ +task_count++; +for (i = 0; i < RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS; i++) { + if (load_tasks[i]) { +if ((l == 0) || (l < load[i])) + continue; +for (j = (RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS - 1); j >= i; j--){ + load_tasks[j + 1] = load_tasks[j]; + load[j + 1] = load[j]; +} + } + load_tasks[i] = the_thread; + load[i] = l; + break; +} This breaks all ports using CPU_TIMESTAMP_USE_STRUCT_TIMESPEC: /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c: In function 'rtems_cpuusage_top_thread': /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:117:24: error: invalid operands to binary == (have 'Thread_CPU_usage_t' and 'int') if ((l == 0) || (l < load[i])) ^ /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:117:36: error: invalid operands to binary < (have 'Thread_CPU_usage_t' and 'long long unsigned int') if ((l == 0) || (l < load[i])) ^ /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:125:24: error: incompatible types when assigning to type 'long long unsigned int' from type 'Thread_CPU_usage_t' load[i] = l; ^ /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:192:13: error: incompatible types when assigning to type 'Timestamp_Control' from type 'long long unsigned int' ran = load[i]; ^ -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: rtems head broken for leon3 smp
On 23/10/14 19:46, Jennifer Averett wrote: Running the leon3 with grsim fails due to the patch bsp/sparc: Ensure that data cache snooping is enabled It looks like cache snooping is disabled when it is ran for all the tests. Where is this supposed to be set at with this change? The simulator should set the right Cache Control Register settings. If this is not the case, then AG should fix this in their simulator. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: rtems head broken for leon3 smp
On 10/30/2014 8:56 AM, Sebastian Huber wrote: On 23/10/14 19:46, Jennifer Averett wrote: Running the leon3 with grsim fails due to the patch bsp/sparc: Ensure that data cache snooping is enabled It looks like cache snooping is disabled when it is ran for all the tests. Where is this supposed to be set at with this change? The simulator should set the right Cache Control Register settings. If this is not the case, then AG should fix this in their simulator. It is disabled at the point Jennifer checks it in the code. Is it not this way on real hardware? I am not doubting the possibility of a simulator bug. This is complex. -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: rtems head broken for leon3 smp
On 30/10/14 15:05, Joel Sherrill wrote: On 10/30/2014 8:56 AM, Sebastian Huber wrote: On 23/10/14 19:46, Jennifer Averett wrote: Running the leon3 with grsim fails due to the patch bsp/sparc: Ensure that data cache snooping is enabled It looks like cache snooping is disabled when it is ran for all the tests. Where is this supposed to be set at with this change? The simulator should set the right Cache Control Register settings. If this is not the case, then AG should fix this in their simulator. It is disabled at the point Jennifer checks it in the code. Is it not this way on real hardware? I am not doubting the possibility of a simulator bug. This is complex. The simulator, boot loader or GRMON must setup the Cache Control Register correctly. The bits in this register depend on the particular LEON implementation, so it is easier to deal with it in the boot loader, etc. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [rtems commit] libmisc: Add top to cpuusage.
On 10/30/2014 8:39 AM, Sebastian Huber wrote: > On 28/10/14 16:17, Jennifer Averett wrote: >> +/* Count the number of tasks and sort this load value */ >> +task_count++; >> +for (i = 0; i < RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS; i++) { >> + if (load_tasks[i]) { >> +if ((l == 0) || (l < load[i])) >> + continue; >> +for (j = (RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS - 1); j >= i; >> j--){ >> + load_tasks[j + 1] = load_tasks[j]; >> + load[j + 1] = load[j]; >> +} >> + } >> + load_tasks[i] = the_thread; >> + load[i] = l; >> + break; >> +} > This breaks all ports using CPU_TIMESTAMP_USE_STRUCT_TIMESPEC: > > /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c: In > function 'rtems_cpuusage_top_thread': > /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:117:24: > error: invalid operands to binary == (have 'Thread_CPU_usage_t' and 'int') > if ((l == 0) || (l < load[i])) > ^ > /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:117:36: > error: invalid operands to binary < (have 'Thread_CPU_usage_t' and 'long long > unsigned int') > if ((l == 0) || (l < load[i])) > ^ > /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:125:24: > error: incompatible types when assigning to type 'long long unsigned int' > from > type 'Thread_CPU_usage_t' > load[i] = l; > ^ > /home/sh/rtems-4.11/c/src/../../cpukit/libmisc/cpuuse/cpuusagetop.c:192:13: > error: incompatible types when assigning to type 'Timestamp_Control' from > type > 'long long unsigned int' > ran = load[i]; > ^ Jennifer and I just looked through my build logs from overnight and didn't see this. Which BSP and configure command? We understand the issue but want to confirm it in the right configuration. -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: rtems head broken for leon3 smp
On 2014-10-30 15:09, Sebastian Huber wrote: On 30/10/14 15:05, Joel Sherrill wrote: On 10/30/2014 8:56 AM, Sebastian Huber wrote: On 23/10/14 19:46, Jennifer Averett wrote: Running the leon3 with grsim fails due to the patch bsp/sparc: Ensure that data cache snooping is enabled It looks like cache snooping is disabled when it is ran for all the tests. Where is this supposed to be set at with this change? The simulator should set the right Cache Control Register settings. If this is not the case, then AG should fix this in their simulator. It is disabled at the point Jennifer checks it in the code. Is it not this way on real hardware? I am not doubting the possibility of a simulator bug. This is complex. The simulator, boot loader or GRMON must setup the Cache Control Register correctly. The bits in this register depend on the particular LEON implementation, so it is easier to deal with it in the boot loader, etc. Currently GRSIM does not turn on snooping on run, so for now it has to be set up by a boot loader. From the next GRSIM release, snooping will be turned on when using "run". Best regards, Andreas Larsson Software Engineer Aeroflex Gaisler AB Aeroflex Microelectronic Solutions – HiRel Kungsgatan 12 SE-411 19 Gothenburg, Sweden andr...@gaisler.com www.Aeroflex.com/Gaisler ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: rtems head broken for leon3 smp
On 10/30/2014 9:32 AM, Andreas Larsson wrote: > On 2014-10-30 15:09, Sebastian Huber wrote: >> On 30/10/14 15:05, Joel Sherrill wrote: >>> On 10/30/2014 8:56 AM, Sebastian Huber wrote: On 23/10/14 19:46, Jennifer Averett wrote: > Running the leon3 with grsim fails due to the patch > > bsp/sparc: Ensure that data cache snooping is enabled > > It looks like cache snooping is disabled when it is ran for all > > the tests. Where is this supposed to be set at with this change? The simulator should set the right Cache Control Register settings. If this is not the case, then AG should fix this in their simulator. >>> It is disabled at the point Jennifer checks it in the code. Is it not >>> this >>> way on real hardware? >>> >>> I am not doubting the possibility of a simulator bug. This is complex. >> The simulator, boot loader or GRMON must setup the Cache Control >> Register correctly. The bits in this register depend on the particular >> LEON implementation, so it is easier to deal with it in the boot loader, >> etc. > Currently GRSIM does not turn on snooping on run, so for now it has to > be set up by a boot loader. From the next GRSIM release, snooping will > be turned on when using "run". Thanks for the information. We will work offlist to get the new version when it is available. > Best regards, > > Andreas Larsson > Software Engineer > Aeroflex Gaisler AB > Aeroflex Microelectronic Solutions – HiRel > Kungsgatan 12 > SE-411 19 Gothenburg, Sweden > andr...@gaisler.com > www.Aeroflex.com/Gaisler -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [rtems commit] libmisc: Add top to cpuusage.
I missed reviewing this patch earlier, but there are some style problems with it, please fix them on the head. On Tue, Oct 28, 2014 at 11:17 AM, Jennifer Averett wrote: > Module:rtems > Branch:master > Commit:6031da438d219c6ec5d9d48f1df2aef91710cce3 > Changeset: > http://git.rtems.org/rtems/commit/?id=6031da438d219c6ec5d9d48f1df2aef91710cce3 > > Author:Jennifer Averett > Date: Mon Sep 29 10:20:27 2014 -0500 > > libmisc: Add top to cpuusage. > > --- > > cpukit/libmisc/Makefile.am |2 +- > cpukit/libmisc/cpuuse/cpuusagetop.c | 337 > +++ > cpukit/libmisc/cpuuse/cpuuse.h | 19 ++ > 3 files changed, 357 insertions(+), 1 deletions(-) > > diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am > index 2f41ffa..d26c484 100644 > --- a/cpukit/libmisc/Makefile.am > +++ b/cpukit/libmisc/Makefile.am > @@ -27,7 +27,7 @@ EXTRA_DIST += cpuuse/README > > noinst_LIBRARIES += libcpuuse.a > libcpuuse_a_SOURCES = cpuuse/cpuusagereport.c cpuuse/cpuusagereset.c \ > -cpuuse/cpuuse.h cpuuse/cpuusagedata.c > + cpuuse/cpuuse.h cpuuse/cpuusagedata.c cpuuse/cpuusagetop.c > > ## devnull > noinst_LIBRARIES += libdevnull.a > diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c > b/cpukit/libmisc/cpuuse/cpuusagetop.c > new file mode 100644 > index 000..7e7348a > --- /dev/null > +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c > @@ -0,0 +1,337 @@ > +/** > + * @file > + * > + * @brief CPU Usage Top > + * @ingroup libmisc_cpuuse CPU Usage > + */ > + > +/* > + * COPYRIGHT (c) 2014. > + * 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 > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > + > + > +/* > + * Common variable to sync the load monitor task. > + */ > +static volatile int rtems_cpuusage_top_thread_active; > + > + remove multiple blank lines > +typedef struct { > + void *context; > + rtems_printk_plugin_t print; > +}rtems_cpu_usage_plugin_t; > + > +#define RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS (20) > + > +/* > + * rtems_cpuusage_top_thread > + * > + * DESCRIPTION: > + * > + * This function displays the load of the tasks on an ANSI terminal. > + * Get rid of "DESCRIPTION", prefer to use minimalist comment style on static functions. > + */ > + > +static void > +rtems_cpuusage_top_thread (rtems_task_argument arg) > +{ > + uint32_t api_index; > + Thread_Control* the_thread; > + int i; > + int j; > + int k; > + Objects_Information* information; > +charname[13]; > + int task_count = 0; > + uint32_t seconds, nanoseconds; > + rtems_cpu_usage_plugin_t* plugin = (rtems_cpu_usage_plugin_t*)arg; > + Thread_Control* load_tasks[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + > 1]; > + unsigned long longload[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; > + > + while (true) > + { Opening brace should go on whille() line. > +#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ > + Timestamp_Control uptime, total, ran, uptime_at_last_reset; > +#else > + uint32_t total_units = 0; > +#endif > + > +rtems_cpuusage_top_thread_active = 1; > + > +memset (load_tasks, 0, sizeof (load_tasks)); > +memset (load, 0, sizeof (load)); > + > + /* > + * Iterate over the tasks and sort the highest load tasks > + * into our local arrays. We only handle a limited number of > + * tasks. > + */ > +for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { > + #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) > +if ( !_Objects_Information_table[ api_index ] ) > + continue; > + #endif > + > + information = _Objects_Information_table[ api_index ][ 1 ]; > + if ( information ) { > +for ( k=1 ; k <= information->maximum ; k++ ) { I prefer that nested iterators should be used in increasing order, e.g. i first. > + the_thread = (Thread_Control *)information->local_table[ k ]; > + if ( the_thread ) { > + No blank space after the opening brace. > +Thread_CPU_usage_t l = the_thread->cpu_time_used; Avoid using l and I as variable names.They're hard to differentiate from each other and from the digit 1. This should be a more useful variable name anyway. A one-letter variable should really only be used for iterators. We ought to have a rule about this if we don't. > + > +/* > + * When not using nanosecond CPU usage resolution, we have to > count > + * the number of "ticks" we gave credit
Re: [rtems commit] libmisc: Add top to cpuusage.
FWIW she is jennifer.aver...@rtems.org not jennifer@. --joel On 10/30/2014 9:53 AM, Gedare Bloom wrote: > I missed reviewing this patch earlier, but there are some style > problems with it, please fix them on the head. > > On Tue, Oct 28, 2014 at 11:17 AM, Jennifer Averett wrote: >> Module:rtems >> Branch:master >> Commit:6031da438d219c6ec5d9d48f1df2aef91710cce3 >> Changeset: >> http://git.rtems.org/rtems/commit/?id=6031da438d219c6ec5d9d48f1df2aef91710cce3 >> >> Author:Jennifer Averett >> Date: Mon Sep 29 10:20:27 2014 -0500 >> >> libmisc: Add top to cpuusage. >> >> --- >> >> cpukit/libmisc/Makefile.am |2 +- >> cpukit/libmisc/cpuuse/cpuusagetop.c | 337 >> +++ >> cpukit/libmisc/cpuuse/cpuuse.h | 19 ++ >> 3 files changed, 357 insertions(+), 1 deletions(-) >> >> diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am >> index 2f41ffa..d26c484 100644 >> --- a/cpukit/libmisc/Makefile.am >> +++ b/cpukit/libmisc/Makefile.am >> @@ -27,7 +27,7 @@ EXTRA_DIST += cpuuse/README >> >> noinst_LIBRARIES += libcpuuse.a >> libcpuuse_a_SOURCES = cpuuse/cpuusagereport.c cpuuse/cpuusagereset.c \ >> -cpuuse/cpuuse.h cpuuse/cpuusagedata.c >> + cpuuse/cpuuse.h cpuuse/cpuusagedata.c cpuuse/cpuusagetop.c >> >> ## devnull >> noinst_LIBRARIES += libdevnull.a >> diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c >> b/cpukit/libmisc/cpuuse/cpuusagetop.c >> new file mode 100644 >> index 000..7e7348a >> --- /dev/null >> +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c >> @@ -0,0 +1,337 @@ >> +/** >> + * @file >> + * >> + * @brief CPU Usage Top >> + * @ingroup libmisc_cpuuse CPU Usage >> + */ >> + >> +/* >> + * COPYRIGHT (c) 2014. >> + * 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 >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> + >> +/* >> + * Common variable to sync the load monitor task. >> + */ >> +static volatile int rtems_cpuusage_top_thread_active; >> + >> + > remove multiple blank lines > >> +typedef struct { >> + void *context; >> + rtems_printk_plugin_t print; >> +}rtems_cpu_usage_plugin_t; >> + >> +#define RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS (20) >> + >> +/* >> + * rtems_cpuusage_top_thread >> + * >> + * DESCRIPTION: >> + * >> + * This function displays the load of the tasks on an ANSI terminal. >> + * > Get rid of "DESCRIPTION", prefer to use minimalist comment style on > static functions. > >> + */ >> + >> +static void >> +rtems_cpuusage_top_thread (rtems_task_argument arg) >> +{ >> + uint32_t api_index; >> + Thread_Control* the_thread; >> + int i; >> + int j; >> + int k; >> + Objects_Information* information; >> +charname[13]; >> + int task_count = 0; >> + uint32_t seconds, nanoseconds; >> + rtems_cpu_usage_plugin_t* plugin = (rtems_cpu_usage_plugin_t*)arg; >> + Thread_Control* load_tasks[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + >> 1]; >> + unsigned long longload[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; >> + >> + while (true) >> + { > Opening brace should go on whille() line. > >> +#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ >> + Timestamp_Control uptime, total, ran, uptime_at_last_reset; >> +#else >> + uint32_t total_units = 0; >> +#endif >> + >> +rtems_cpuusage_top_thread_active = 1; >> + >> +memset (load_tasks, 0, sizeof (load_tasks)); >> +memset (load, 0, sizeof (load)); >> + >> + /* >> + * Iterate over the tasks and sort the highest load tasks >> + * into our local arrays. We only handle a limited number of >> + * tasks. >> + */ >> +for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { >> + #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) >> +if ( !_Objects_Information_table[ api_index ] ) >> + continue; >> + #endif >> + >> + information = _Objects_Information_table[ api_index ][ 1 ]; >> + if ( information ) { >> +for ( k=1 ; k <= information->maximum ; k++ ) { > I prefer that nested iterators should be used in increasing order, e.g. i > first. > >> + the_thread = (Thread_Control *)information->local_table[ k ]; >> + if ( the_thread ) { >> + > No blank space after the opening brace. > >> +Thread_CPU_usage_t l = the_thread->cpu_time_used; > Avoid using l and I as variable names.They're hard to differentiate > from each other and from the digit 1. This should be a more useful > variable name any
Re: [rtems commit] libmisc: Add top to cpuusage.
The email address came from VC, so it is a problem in the commit setup I guess. On Thu, Oct 30, 2014 at 10:55 AM, Joel Sherrill wrote: > FWIW she is jennifer.aver...@rtems.org not jennifer@. > > --joel > > On 10/30/2014 9:53 AM, Gedare Bloom wrote: >> I missed reviewing this patch earlier, but there are some style >> problems with it, please fix them on the head. >> >> On Tue, Oct 28, 2014 at 11:17 AM, Jennifer Averett >> wrote: >>> Module:rtems >>> Branch:master >>> Commit:6031da438d219c6ec5d9d48f1df2aef91710cce3 >>> Changeset: >>> http://git.rtems.org/rtems/commit/?id=6031da438d219c6ec5d9d48f1df2aef91710cce3 >>> >>> Author:Jennifer Averett >>> Date: Mon Sep 29 10:20:27 2014 -0500 >>> >>> libmisc: Add top to cpuusage. >>> >>> --- >>> >>> cpukit/libmisc/Makefile.am |2 +- >>> cpukit/libmisc/cpuuse/cpuusagetop.c | 337 >>> +++ >>> cpukit/libmisc/cpuuse/cpuuse.h | 19 ++ >>> 3 files changed, 357 insertions(+), 1 deletions(-) >>> >>> diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am >>> index 2f41ffa..d26c484 100644 >>> --- a/cpukit/libmisc/Makefile.am >>> +++ b/cpukit/libmisc/Makefile.am >>> @@ -27,7 +27,7 @@ EXTRA_DIST += cpuuse/README >>> >>> noinst_LIBRARIES += libcpuuse.a >>> libcpuuse_a_SOURCES = cpuuse/cpuusagereport.c cpuuse/cpuusagereset.c \ >>> -cpuuse/cpuuse.h cpuuse/cpuusagedata.c >>> + cpuuse/cpuuse.h cpuuse/cpuusagedata.c cpuuse/cpuusagetop.c >>> >>> ## devnull >>> noinst_LIBRARIES += libdevnull.a >>> diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c >>> b/cpukit/libmisc/cpuuse/cpuusagetop.c >>> new file mode 100644 >>> index 000..7e7348a >>> --- /dev/null >>> +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c >>> @@ -0,0 +1,337 @@ >>> +/** >>> + * @file >>> + * >>> + * @brief CPU Usage Top >>> + * @ingroup libmisc_cpuuse CPU Usage >>> + */ >>> + >>> +/* >>> + * COPYRIGHT (c) 2014. >>> + * 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 >>> +#include >>> +#include >>> + >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> + >>> +/* >>> + * Common variable to sync the load monitor task. >>> + */ >>> +static volatile int rtems_cpuusage_top_thread_active; >>> + >>> + >> remove multiple blank lines >> >>> +typedef struct { >>> + void *context; >>> + rtems_printk_plugin_t print; >>> +}rtems_cpu_usage_plugin_t; >>> + >>> +#define RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS (20) >>> + >>> +/* >>> + * rtems_cpuusage_top_thread >>> + * >>> + * DESCRIPTION: >>> + * >>> + * This function displays the load of the tasks on an ANSI terminal. >>> + * >> Get rid of "DESCRIPTION", prefer to use minimalist comment style on >> static functions. >> >>> + */ >>> + >>> +static void >>> +rtems_cpuusage_top_thread (rtems_task_argument arg) >>> +{ >>> + uint32_t api_index; >>> + Thread_Control* the_thread; >>> + int i; >>> + int j; >>> + int k; >>> + Objects_Information* information; >>> +charname[13]; >>> + int task_count = 0; >>> + uint32_t seconds, nanoseconds; >>> + rtems_cpu_usage_plugin_t* plugin = (rtems_cpu_usage_plugin_t*)arg; >>> + Thread_Control* load_tasks[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + >>> 1]; >>> + unsigned long longload[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; >>> + >>> + while (true) >>> + { >> Opening brace should go on whille() line. >> >>> +#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ >>> + Timestamp_Control uptime, total, ran, uptime_at_last_reset; >>> +#else >>> + uint32_t total_units = 0; >>> +#endif >>> + >>> +rtems_cpuusage_top_thread_active = 1; >>> + >>> +memset (load_tasks, 0, sizeof (load_tasks)); >>> +memset (load, 0, sizeof (load)); >>> + >>> + /* >>> + * Iterate over the tasks and sort the highest load tasks >>> + * into our local arrays. We only handle a limited number of >>> + * tasks. >>> + */ >>> +for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { >>> + #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) >>> +if ( !_Objects_Information_table[ api_index ] ) >>> + continue; >>> + #endif >>> + >>> + information = _Objects_Information_table[ api_index ][ 1 ]; >>> + if ( information ) { >>> +for ( k=1 ; k <= information->maximum ; k++ ) { >> I prefer that nested iterators should be used in increasing order, e.g. i >> first. >> >>> + the_thread = (Thread_Control *)information->local_table[ k ]; >>> +
Re: 4.11 Branching To Do
On Thu, Oct 30, 2014 at 6:31 AM, Sebastian Huber wrote: > On 29/10/14 22:49, Joel Sherrill wrote: >> >> Very desirable >> = >> + x86 context switch SMP handoff logic > > > For someone with good enough x86 assembly skills, this should be fairly > simple. You just have to implement the sequence described here: > > http://git.rtems.org/rtems/tree/cpukit/score/cpu/no_cpu/rtems/score/cpu.h#n578 > Do we have memory-barrier and test-and-set primitives for x86? > -- > Sebastian Huber, embedded brains GmbH > > Address : Dornierstr. 4, D-82178 Puchheim, Germany > Phone : +49 89 189 47 41-16 > Fax : +49 89 189 47 41-09 > E-Mail : sebastian.hu...@embedded-brains.de > PGP : Public key available on request. > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. > > ___ > 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
Re: [rtems commit] libmisc: Add top to cpuusage.
On 10/30/2014 9:55 AM, Gedare Bloom wrote: > The email address came from VC, so it is a problem in the commit setup I > guess. OK. I will help her double check. Working on multiple machines, I periodically find one that is wrong for myself. :( --joel > On Thu, Oct 30, 2014 at 10:55 AM, Joel Sherrill > wrote: >> FWIW she is jennifer.aver...@rtems.org not jennifer@. >> >> --joel >> >> On 10/30/2014 9:53 AM, Gedare Bloom wrote: >>> I missed reviewing this patch earlier, but there are some style >>> problems with it, please fix them on the head. >>> >>> On Tue, Oct 28, 2014 at 11:17 AM, Jennifer Averett >>> wrote: Module:rtems Branch:master Commit:6031da438d219c6ec5d9d48f1df2aef91710cce3 Changeset: http://git.rtems.org/rtems/commit/?id=6031da438d219c6ec5d9d48f1df2aef91710cce3 Author:Jennifer Averett Date: Mon Sep 29 10:20:27 2014 -0500 libmisc: Add top to cpuusage. --- cpukit/libmisc/Makefile.am |2 +- cpukit/libmisc/cpuuse/cpuusagetop.c | 337 +++ cpukit/libmisc/cpuuse/cpuuse.h | 19 ++ 3 files changed, 357 insertions(+), 1 deletions(-) diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am index 2f41ffa..d26c484 100644 --- a/cpukit/libmisc/Makefile.am +++ b/cpukit/libmisc/Makefile.am @@ -27,7 +27,7 @@ EXTRA_DIST += cpuuse/README noinst_LIBRARIES += libcpuuse.a libcpuuse_a_SOURCES = cpuuse/cpuusagereport.c cpuuse/cpuusagereset.c \ -cpuuse/cpuuse.h cpuuse/cpuusagedata.c + cpuuse/cpuuse.h cpuuse/cpuusagedata.c cpuuse/cpuusagetop.c ## devnull noinst_LIBRARIES += libdevnull.a diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c b/cpukit/libmisc/cpuuse/cpuusagetop.c new file mode 100644 index 000..7e7348a --- /dev/null +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c @@ -0,0 +1,337 @@ +/** + * @file + * + * @brief CPU Usage Top + * @ingroup libmisc_cpuuse CPU Usage + */ + +/* + * COPYRIGHT (c) 2014. + * 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 +#include +#include + +#include +#include +#include +#include +#include + + +/* + * Common variable to sync the load monitor task. + */ +static volatile int rtems_cpuusage_top_thread_active; + + >>> remove multiple blank lines >>> +typedef struct { + void *context; + rtems_printk_plugin_t print; +}rtems_cpu_usage_plugin_t; + +#define RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS (20) + +/* + * rtems_cpuusage_top_thread + * + * DESCRIPTION: + * + * This function displays the load of the tasks on an ANSI terminal. + * >>> Get rid of "DESCRIPTION", prefer to use minimalist comment style on >>> static functions. >>> + */ + +static void +rtems_cpuusage_top_thread (rtems_task_argument arg) +{ + uint32_t api_index; + Thread_Control* the_thread; + int i; + int j; + int k; + Objects_Information* information; +charname[13]; + int task_count = 0; + uint32_t seconds, nanoseconds; + rtems_cpu_usage_plugin_t* plugin = (rtems_cpu_usage_plugin_t*)arg; + Thread_Control* load_tasks[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; + unsigned long longload[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; + + while (true) + { >>> Opening brace should go on whille() line. >>> +#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ + Timestamp_Control uptime, total, ran, uptime_at_last_reset; +#else + uint32_t total_units = 0; +#endif + +rtems_cpuusage_top_thread_active = 1; + +memset (load_tasks, 0, sizeof (load_tasks)); +memset (load, 0, sizeof (load)); + + /* + * Iterate over the tasks and sort the highest load tasks + * into our local arrays. We only handle a limited number of + * tasks. + */ +for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { + #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) +if ( !_Objects_Information_table[ api_index ] ) + continue; + #endif + +
Re: [rtems commit] libmisc: Add top to cpuusage.
The problem may be a setup issue on git.rtems.org, where it converts from user login to email, I think it might be doing something dumb like just taking login-name @rtems.org On Thu, Oct 30, 2014 at 11:03 AM, Joel Sherrill wrote: > > On 10/30/2014 9:55 AM, Gedare Bloom wrote: >> The email address came from VC, so it is a problem in the commit setup I >> guess. > OK. I will help her double check. Working on multiple machines, > I periodically find one that is wrong for myself. :( > > --joel >> On Thu, Oct 30, 2014 at 10:55 AM, Joel Sherrill >> wrote: >>> FWIW she is jennifer.aver...@rtems.org not jennifer@. >>> >>> --joel >>> >>> On 10/30/2014 9:53 AM, Gedare Bloom wrote: I missed reviewing this patch earlier, but there are some style problems with it, please fix them on the head. On Tue, Oct 28, 2014 at 11:17 AM, Jennifer Averett wrote: > Module:rtems > Branch:master > Commit:6031da438d219c6ec5d9d48f1df2aef91710cce3 > Changeset: > http://git.rtems.org/rtems/commit/?id=6031da438d219c6ec5d9d48f1df2aef91710cce3 > > Author:Jennifer Averett > Date: Mon Sep 29 10:20:27 2014 -0500 > > libmisc: Add top to cpuusage. > > --- > > cpukit/libmisc/Makefile.am |2 +- > cpukit/libmisc/cpuuse/cpuusagetop.c | 337 > +++ > cpukit/libmisc/cpuuse/cpuuse.h | 19 ++ > 3 files changed, 357 insertions(+), 1 deletions(-) > > diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am > index 2f41ffa..d26c484 100644 > --- a/cpukit/libmisc/Makefile.am > +++ b/cpukit/libmisc/Makefile.am > @@ -27,7 +27,7 @@ EXTRA_DIST += cpuuse/README > > noinst_LIBRARIES += libcpuuse.a > libcpuuse_a_SOURCES = cpuuse/cpuusagereport.c cpuuse/cpuusagereset.c \ > -cpuuse/cpuuse.h cpuuse/cpuusagedata.c > + cpuuse/cpuuse.h cpuuse/cpuusagedata.c cpuuse/cpuusagetop.c > > ## devnull > noinst_LIBRARIES += libdevnull.a > diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c > b/cpukit/libmisc/cpuuse/cpuusagetop.c > new file mode 100644 > index 000..7e7348a > --- /dev/null > +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c > @@ -0,0 +1,337 @@ > +/** > + * @file > + * > + * @brief CPU Usage Top > + * @ingroup libmisc_cpuuse CPU Usage > + */ > + > +/* > + * COPYRIGHT (c) 2014. > + * 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 > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > + > + > +/* > + * Common variable to sync the load monitor task. > + */ > +static volatile int rtems_cpuusage_top_thread_active; > + > + remove multiple blank lines > +typedef struct { > + void *context; > + rtems_printk_plugin_t print; > +}rtems_cpu_usage_plugin_t; > + > +#define RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS (20) > + > +/* > + * rtems_cpuusage_top_thread > + * > + * DESCRIPTION: > + * > + * This function displays the load of the tasks on an ANSI terminal. > + * Get rid of "DESCRIPTION", prefer to use minimalist comment style on static functions. > + */ > + > +static void > +rtems_cpuusage_top_thread (rtems_task_argument arg) > +{ > + uint32_t api_index; > + Thread_Control* the_thread; > + int i; > + int j; > + int k; > + Objects_Information* information; > +charname[13]; > + int task_count = 0; > + uint32_t seconds, nanoseconds; > + rtems_cpu_usage_plugin_t* plugin = (rtems_cpu_usage_plugin_t*)arg; > + Thread_Control* load_tasks[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS > + 1]; > + unsigned long longload[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; > + > + while (true) > + { Opening brace should go on whille() line. > +#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ > + Timestamp_Control uptime, total, ran, uptime_at_last_reset; > +#else > + uint32_t total_units = 0; > +#endif > + > +rtems_cpuusage_top_thread_active = 1; > + > +memset (load_tasks, 0, sizeof (load_tasks)); > +memset (load, 0, sizeof (load)); > + > + /* > + * Iterate over the tasks and sort the high
RE: [rtems commit] libmisc: Add top to cpuusage.
My name and email are correct in git config. > -Original Message- > From: devel [mailto:devel-boun...@rtems.org] On Behalf Of Gedare Bloom > Sent: Thursday, October 30, 2014 10:08 AM > To: Joel Sherrill > Cc: Jennifer Averett; rtems-de...@rtems.org > Subject: Re: [rtems commit] libmisc: Add top to cpuusage. > > The problem may be a setup issue on git.rtems.org, where it converts from > user login to email, I think it might be doing something dumb like just taking > login-name @rtems.org > > On Thu, Oct 30, 2014 at 11:03 AM, Joel Sherrill > wrote: > > > > On 10/30/2014 9:55 AM, Gedare Bloom wrote: > >> The email address came from VC, so it is a problem in the commit setup I > guess. > > OK. I will help her double check. Working on multiple machines, I > > periodically find one that is wrong for myself. :( > > > > --joel > >> On Thu, Oct 30, 2014 at 10:55 AM, Joel Sherrill > >> wrote: > >>> FWIW she is jennifer.aver...@rtems.org not jennifer@. > >>> > >>> --joel > >>> > >>> On 10/30/2014 9:53 AM, Gedare Bloom wrote: > I missed reviewing this patch earlier, but there are some style > problems with it, please fix them on the head. > > On Tue, Oct 28, 2014 at 11:17 AM, Jennifer Averett > wrote: > > Module:rtems > > Branch:master > > Commit:6031da438d219c6ec5d9d48f1df2aef91710cce3 > > Changeset: > > > http://git.rtems.org/rtems/commit/?id=6031da438d219c6ec5d9d48f1df2 > > aef91710cce3 > > > > Author:Jennifer Averett > > Date: Mon Sep 29 10:20:27 2014 -0500 > > > > libmisc: Add top to cpuusage. > > > > --- > > > > cpukit/libmisc/Makefile.am |2 +- > > cpukit/libmisc/cpuuse/cpuusagetop.c | 337 > +++ > > cpukit/libmisc/cpuuse/cpuuse.h | 19 ++ > > 3 files changed, 357 insertions(+), 1 deletions(-) > > > > diff --git a/cpukit/libmisc/Makefile.am > > b/cpukit/libmisc/Makefile.am index 2f41ffa..d26c484 100644 > > --- a/cpukit/libmisc/Makefile.am > > +++ b/cpukit/libmisc/Makefile.am > > @@ -27,7 +27,7 @@ EXTRA_DIST += cpuuse/README > > > > noinst_LIBRARIES += libcpuuse.a > > libcpuuse_a_SOURCES = cpuuse/cpuusagereport.c > cpuuse/cpuusagereset.c \ > > -cpuuse/cpuuse.h cpuuse/cpuusagedata.c > > + cpuuse/cpuuse.h cpuuse/cpuusagedata.c cpuuse/cpuusagetop.c > > > > ## devnull > > noinst_LIBRARIES += libdevnull.a > > diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c > > b/cpukit/libmisc/cpuuse/cpuusagetop.c > > new file mode 100644 > > index 000..7e7348a > > --- /dev/null > > +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c > > @@ -0,0 +1,337 @@ > > +/** > > + * @file > > + * > > + * @brief CPU Usage Top > > + * @ingroup libmisc_cpuuse CPU Usage */ > > + > > +/* > > + * COPYRIGHT (c) 2014. > > + * 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 > > +#include > > +#include > > + > > +#include > > +#include #include > > + #include > > +#include > > + > > + > > +/* > > + * Common variable to sync the load monitor task. > > + */ > > +static volatile int rtems_cpuusage_top_thread_active; > > + > > + > remove multiple blank lines > > > +typedef struct { > > + void *context; > > + rtems_printk_plugin_t print; > > +}rtems_cpu_usage_plugin_t; > > + > > +#define RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS (20) > > + > > +/* > > + * rtems_cpuusage_top_thread > > + * > > + * DESCRIPTION: > > + * > > + * This function displays the load of the tasks on an ANSI terminal. > > + * > Get rid of "DESCRIPTION", prefer to use minimalist comment style on > static functions. > > > + */ > > + > > +static void > > +rtems_cpuusage_top_thread (rtems_task_argument arg) { > > + uint32_t api_index; > > + Thread_Control* the_thread; > > + int i; > > + int j; > > + int k; > > + Objects_Information* information; > > +charname[13]; > > + int task_count = 0; > > + uint32_t seconds, nanoseconds; > > + rtems_cpu_usage_plugin_t* plugin = > (rtems_cpu_usage_plugin_t*)arg; > > + Thread_Control* > load_tasks[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; > > + unsigned long long > load[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1
Re: [rtems commit] libmisc: Add top to cpuusage.
On 10/30/2014 10:11 AM, Jennifer Averett wrote: > My name and email are correct in git config. And if it was converting git accounts into email addresses, I would just be joel@ which would likely bounce as well. -joel >> -Original Message- >> From: devel [mailto:devel-boun...@rtems.org] On Behalf Of Gedare Bloom >> Sent: Thursday, October 30, 2014 10:08 AM >> To: Joel Sherrill >> Cc: Jennifer Averett; rtems-de...@rtems.org >> Subject: Re: [rtems commit] libmisc: Add top to cpuusage. >> >> The problem may be a setup issue on git.rtems.org, where it converts from >> user login to email, I think it might be doing something dumb like just >> taking >> login-name @rtems.org >> >> On Thu, Oct 30, 2014 at 11:03 AM, Joel Sherrill >> wrote: >>> On 10/30/2014 9:55 AM, Gedare Bloom wrote: The email address came from VC, so it is a problem in the commit setup I >> guess. >>> OK. I will help her double check. Working on multiple machines, I >>> periodically find one that is wrong for myself. :( >>> >>> --joel On Thu, Oct 30, 2014 at 10:55 AM, Joel Sherrill wrote: > FWIW she is jennifer.aver...@rtems.org not jennifer@. > > --joel > > On 10/30/2014 9:53 AM, Gedare Bloom wrote: >> I missed reviewing this patch earlier, but there are some style >> problems with it, please fix them on the head. >> >> On Tue, Oct 28, 2014 at 11:17 AM, Jennifer Averett >> wrote: >>> Module:rtems >>> Branch:master >>> Commit:6031da438d219c6ec5d9d48f1df2aef91710cce3 >>> Changeset: >>> >> http://git.rtems.org/rtems/commit/?id=6031da438d219c6ec5d9d48f1df2 >>> aef91710cce3 >>> >>> Author:Jennifer Averett >>> Date: Mon Sep 29 10:20:27 2014 -0500 >>> >>> libmisc: Add top to cpuusage. >>> >>> --- >>> >>> cpukit/libmisc/Makefile.am |2 +- >>> cpukit/libmisc/cpuuse/cpuusagetop.c | 337 >> +++ >>> cpukit/libmisc/cpuuse/cpuuse.h | 19 ++ >>> 3 files changed, 357 insertions(+), 1 deletions(-) >>> >>> diff --git a/cpukit/libmisc/Makefile.am >>> b/cpukit/libmisc/Makefile.am index 2f41ffa..d26c484 100644 >>> --- a/cpukit/libmisc/Makefile.am >>> +++ b/cpukit/libmisc/Makefile.am >>> @@ -27,7 +27,7 @@ EXTRA_DIST += cpuuse/README >>> >>> noinst_LIBRARIES += libcpuuse.a >>> libcpuuse_a_SOURCES = cpuuse/cpuusagereport.c >> cpuuse/cpuusagereset.c \ >>> -cpuuse/cpuuse.h cpuuse/cpuusagedata.c >>> + cpuuse/cpuuse.h cpuuse/cpuusagedata.c cpuuse/cpuusagetop.c >>> >>> ## devnull >>> noinst_LIBRARIES += libdevnull.a >>> diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c >>> b/cpukit/libmisc/cpuuse/cpuusagetop.c >>> new file mode 100644 >>> index 000..7e7348a >>> --- /dev/null >>> +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c >>> @@ -0,0 +1,337 @@ >>> +/** >>> + * @file >>> + * >>> + * @brief CPU Usage Top >>> + * @ingroup libmisc_cpuuse CPU Usage */ >>> + >>> +/* >>> + * COPYRIGHT (c) 2014. >>> + * 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 >>> +#include >>> +#include >>> + >>> +#include >>> +#include #include >>> + #include >>> +#include >>> + >>> + >>> +/* >>> + * Common variable to sync the load monitor task. >>> + */ >>> +static volatile int rtems_cpuusage_top_thread_active; >>> + >>> + >> remove multiple blank lines >> >>> +typedef struct { >>> + void *context; >>> + rtems_printk_plugin_t print; >>> +}rtems_cpu_usage_plugin_t; >>> + >>> +#define RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS (20) >>> + >>> +/* >>> + * rtems_cpuusage_top_thread >>> + * >>> + * DESCRIPTION: >>> + * >>> + * This function displays the load of the tasks on an ANSI terminal. >>> + * >> Get rid of "DESCRIPTION", prefer to use minimalist comment style on >> static functions. >> >>> + */ >>> + >>> +static void >>> +rtems_cpuusage_top_thread (rtems_task_argument arg) { >>> + uint32_t api_index; >>> + Thread_Control* the_thread; >>> + int i; >>> + int j; >>> + int k; >>> + Objects_Information* information; >>> +charname[13]; >>> + int task_count = 0; >>> + uint32_t seconds, nanoseconds; >>> + rtems_cpu_usage_plugin_t* plugi
RE: [rtems commit] libmisc: Add top to cpuusage.
Addressing all the comments. About the scoped blocks I used the style that existed in cpuusage already. That section of code is modified code from rtems_cpu_usage_report_with_plugin. Jennifer > -Original Message- > From: devel [mailto:devel-boun...@rtems.org] On Behalf Of Gedare Bloom > Sent: Thursday, October 30, 2014 9:54 AM > To: Jennifer Averett > Cc: rtems-de...@rtems.org > Subject: Re: [rtems commit] libmisc: Add top to cpuusage. > > I missed reviewing this patch earlier, but there are some style problems with > it, please fix them on the head. > > On Tue, Oct 28, 2014 at 11:17 AM, Jennifer Averett > wrote: > > Module:rtems > > Branch:master > > Commit:6031da438d219c6ec5d9d48f1df2aef91710cce3 > > Changeset: > > > http://git.rtems.org/rtems/commit/?id=6031da438d219c6ec5d9d48f1df2aef9 > > 1710cce3 > > > > Author:Jennifer Averett > > Date: Mon Sep 29 10:20:27 2014 -0500 > > > > libmisc: Add top to cpuusage. > > > > --- > > > > cpukit/libmisc/Makefile.am |2 +- > > cpukit/libmisc/cpuuse/cpuusagetop.c | 337 > +++ > > cpukit/libmisc/cpuuse/cpuuse.h | 19 ++ > > 3 files changed, 357 insertions(+), 1 deletions(-) > > > > diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am > > index 2f41ffa..d26c484 100644 > > --- a/cpukit/libmisc/Makefile.am > > +++ b/cpukit/libmisc/Makefile.am > > @@ -27,7 +27,7 @@ EXTRA_DIST += cpuuse/README > > > > noinst_LIBRARIES += libcpuuse.a > > libcpuuse_a_SOURCES = cpuuse/cpuusagereport.c > cpuuse/cpuusagereset.c \ > > -cpuuse/cpuuse.h cpuuse/cpuusagedata.c > > + cpuuse/cpuuse.h cpuuse/cpuusagedata.c cpuuse/cpuusagetop.c > > > > ## devnull > > noinst_LIBRARIES += libdevnull.a > > diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c > > b/cpukit/libmisc/cpuuse/cpuusagetop.c > > new file mode 100644 > > index 000..7e7348a > > --- /dev/null > > +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c > > @@ -0,0 +1,337 @@ > > +/** > > + * @file > > + * > > + * @brief CPU Usage Top > > + * @ingroup libmisc_cpuuse CPU Usage > > + */ > > + > > +/* > > + * COPYRIGHT (c) 2014. > > + * 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 > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > + > > +/* > > + * Common variable to sync the load monitor task. > > + */ > > +static volatile int rtems_cpuusage_top_thread_active; > > + > > + > remove multiple blank lines > > > +typedef struct { > > + void *context; > > + rtems_printk_plugin_t print; > > +}rtems_cpu_usage_plugin_t; > > + > > +#define RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS (20) > > + > > +/* > > + * rtems_cpuusage_top_thread > > + * > > + * DESCRIPTION: > > + * > > + * This function displays the load of the tasks on an ANSI terminal. > > + * > Get rid of "DESCRIPTION", prefer to use minimalist comment style on static > functions. > > > + */ > > + > > +static void > > +rtems_cpuusage_top_thread (rtems_task_argument arg) { > > + uint32_t api_index; > > + Thread_Control* the_thread; > > + int i; > > + int j; > > + int k; > > + Objects_Information* information; > > +charname[13]; > > + int task_count = 0; > > + uint32_t seconds, nanoseconds; > > + rtems_cpu_usage_plugin_t* plugin = (rtems_cpu_usage_plugin_t*)arg; > > + Thread_Control* > load_tasks[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; > > + unsigned long long > load[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; > > + > > + while (true) > > + { > Opening brace should go on whille() line. > > > +#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ > > + Timestamp_Control uptime, total, ran, uptime_at_last_reset; > > +#else > > + uint32_t total_units = 0; > > +#endif > > + > > +rtems_cpuusage_top_thread_active = 1; > > + > > +memset (load_tasks, 0, sizeof (load_tasks)); > > +memset (load, 0, sizeof (load)); > > + > > + /* > > + * Iterate over the tasks and sort the highest load tasks > > + * into our local arrays. We only handle a limited number of > > + * tasks. > > + */ > > +for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { > > + #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) > > +if ( !_Objects_Information_table[ api_index ] ) > > + continue; > > + #endif > > + > > + information = _Objects_Information_table[ api_index ][ 1 ]; > > + if ( information ) { > > +for ( k=1 ; k <= information->maximum ; k++ ) { >
Re: [rtems commit] libmisc: Add top to cpuusage.
On 10/30/2014 12:06 PM, Jennifer Averett wrote: > Addressing all the comments. About the scoped blocks I used the style > that existed in cpuusage already. That section of code is modified code > from rtems_cpu_usage_report_with_plugin. Just reformat it. :) --joel > Jennifer > >> -Original Message- >> From: devel [mailto:devel-boun...@rtems.org] On Behalf Of Gedare Bloom >> Sent: Thursday, October 30, 2014 9:54 AM >> To: Jennifer Averett >> Cc: rtems-de...@rtems.org >> Subject: Re: [rtems commit] libmisc: Add top to cpuusage. >> >> I missed reviewing this patch earlier, but there are some style problems with >> it, please fix them on the head. >> >> On Tue, Oct 28, 2014 at 11:17 AM, Jennifer Averett >> wrote: >>> Module:rtems >>> Branch:master >>> Commit:6031da438d219c6ec5d9d48f1df2aef91710cce3 >>> Changeset: >>> >> http://git.rtems.org/rtems/commit/?id=6031da438d219c6ec5d9d48f1df2aef9 >>> 1710cce3 >>> >>> Author:Jennifer Averett >>> Date: Mon Sep 29 10:20:27 2014 -0500 >>> >>> libmisc: Add top to cpuusage. >>> >>> --- >>> >>> cpukit/libmisc/Makefile.am |2 +- >>> cpukit/libmisc/cpuuse/cpuusagetop.c | 337 >> +++ >>> cpukit/libmisc/cpuuse/cpuuse.h | 19 ++ >>> 3 files changed, 357 insertions(+), 1 deletions(-) >>> >>> diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am >>> index 2f41ffa..d26c484 100644 >>> --- a/cpukit/libmisc/Makefile.am >>> +++ b/cpukit/libmisc/Makefile.am >>> @@ -27,7 +27,7 @@ EXTRA_DIST += cpuuse/README >>> >>> noinst_LIBRARIES += libcpuuse.a >>> libcpuuse_a_SOURCES = cpuuse/cpuusagereport.c >> cpuuse/cpuusagereset.c \ >>> -cpuuse/cpuuse.h cpuuse/cpuusagedata.c >>> + cpuuse/cpuuse.h cpuuse/cpuusagedata.c cpuuse/cpuusagetop.c >>> >>> ## devnull >>> noinst_LIBRARIES += libdevnull.a >>> diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c >>> b/cpukit/libmisc/cpuuse/cpuusagetop.c >>> new file mode 100644 >>> index 000..7e7348a >>> --- /dev/null >>> +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c >>> @@ -0,0 +1,337 @@ >>> +/** >>> + * @file >>> + * >>> + * @brief CPU Usage Top >>> + * @ingroup libmisc_cpuuse CPU Usage >>> + */ >>> + >>> +/* >>> + * COPYRIGHT (c) 2014. >>> + * 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 >>> +#include >>> +#include >>> + >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> + >>> +/* >>> + * Common variable to sync the load monitor task. >>> + */ >>> +static volatile int rtems_cpuusage_top_thread_active; >>> + >>> + >> remove multiple blank lines >> >>> +typedef struct { >>> + void *context; >>> + rtems_printk_plugin_t print; >>> +}rtems_cpu_usage_plugin_t; >>> + >>> +#define RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS (20) >>> + >>> +/* >>> + * rtems_cpuusage_top_thread >>> + * >>> + * DESCRIPTION: >>> + * >>> + * This function displays the load of the tasks on an ANSI terminal. >>> + * >> Get rid of "DESCRIPTION", prefer to use minimalist comment style on static >> functions. >> >>> + */ >>> + >>> +static void >>> +rtems_cpuusage_top_thread (rtems_task_argument arg) { >>> + uint32_t api_index; >>> + Thread_Control* the_thread; >>> + int i; >>> + int j; >>> + int k; >>> + Objects_Information* information; >>> +charname[13]; >>> + int task_count = 0; >>> + uint32_t seconds, nanoseconds; >>> + rtems_cpu_usage_plugin_t* plugin = (rtems_cpu_usage_plugin_t*)arg; >>> + Thread_Control* >> load_tasks[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; >>> + unsigned long long >> load[RTEMS_CPUUSAGE_TOP_MAX_LOAD_TASKS + 1]; >>> + >>> + while (true) >>> + { >> Opening brace should go on whille() line. >> >>> +#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ >>> + Timestamp_Control uptime, total, ran, uptime_at_last_reset; >>> +#else >>> + uint32_t total_units = 0; >>> +#endif >>> + >>> +rtems_cpuusage_top_thread_active = 1; >>> + >>> +memset (load_tasks, 0, sizeof (load_tasks)); >>> +memset (load, 0, sizeof (load)); >>> + >>> + /* >>> + * Iterate over the tasks and sort the highest load tasks >>> + * into our local arrays. We only handle a limited number of >>> + * tasks. >>> + */ >>> +for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { >>> + #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) >>> +if ( !_Objects_Information_table[ api_index ] ) >>> + continue; >>> + #endif >>> + >>> + information = _Objects_Information_table[ api
libdl: rtems.git dependence on rtems-tools.git
Hi, Libdl tests in the testsuite depend on tools in rtems-tools.git/linkers. Should I raise a configure error if the tools are not found or not build the tests ? Raising an error is my preferred option because libdl for the supported archs is tested however it creates a dependency between rtems-tools.git and RTEMS. I can help with this by adding building of rtems-tools.git to the RSB's build of RTEMS tools. Comments ? Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: libdl: rtems.git dependence on rtems-tools.git
On Thu, Oct 30, 2014 at 3:32 PM, Chris Johns wrote: > Hi, > > Libdl tests in the testsuite depend on tools in rtems-tools.git/linkers. > Should I raise a configure error if the tools are not found or not build the > tests ? > > Raising an error is my preferred option because libdl for the supported > archs is tested however it creates a dependency between rtems-tools.git and > RTEMS. I can help with this by adding building of rtems-tools.git to the > RSB's build of RTEMS tools. > > Comments ? > Only make it an error if building the rtems-tools/linker is part of the "standard" toolset builds, thus decreasing the burden on users who don't care to use libdl. > Chris > ___ > 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
Re: libdl: rtems.git dependence on rtems-tools.git
On Thu, Oct 30, 2014 at 3:40 PM, Gedare Bloom wrote: > On Thu, Oct 30, 2014 at 3:32 PM, Chris Johns wrote: >> Hi, >> >> Libdl tests in the testsuite depend on tools in rtems-tools.git/linkers. >> Should I raise a configure error if the tools are not found or not build the >> tests ? >> >> Raising an error is my preferred option because libdl for the supported >> archs is tested however it creates a dependency between rtems-tools.git and >> RTEMS. I can help with this by adding building of rtems-tools.git to the >> RSB's build of RTEMS tools. >> >> Comments ? >> > Only make it an error if building the rtems-tools/linker is part of > the "standard" toolset builds, thus decreasing the burden on users who > don't care to use libdl. > The documentation on self-built tools, and whatever process we have for the "authoritative tools" guide should include notes regarding this. >> Chris >> ___ >> 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
Re: libdl: rtems.git dependence on rtems-tools.git
On 31/10/2014 6:42 am, Gedare Bloom wrote: On Thu, Oct 30, 2014 at 3:40 PM, Gedare Bloom wrote: On Thu, Oct 30, 2014 at 3:32 PM, Chris Johns wrote: Hi, Libdl tests in the testsuite depend on tools in rtems-tools.git/linkers. Should I raise a configure error if the tools are not found or not build the tests ? Raising an error is my preferred option because libdl for the supported archs is tested however it creates a dependency between rtems-tools.git and RTEMS. I can help with this by adding building of rtems-tools.git to the RSB's build of RTEMS tools. Comments ? Only make it an error if building the rtems-tools/linker is part of the "standard" toolset builds, thus decreasing the burden on users who don't care to use libdl. Yes. Libdl only builds for the architectures there is relocation support for. The documentation on self-built tools, and whatever process we have for the "authoritative tools" guide should include notes regarding this. Sure. Do you have guide ? Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
libdl: Push of libdl (RTL) code to master.
Hi all, I have pushed the RTL code to our git master. The code resides under cpukit/libdl and user access is via the dlopen, dlclose and dlinfo family of calls. The test output with the SIS BSP is: $ sparc-rtems4.11-run $(find . -name dl01.exe) *** BEGIN OF TEST libdl (RTL) Loader 1 *** load: /dl-o1.o handle: 0x2044890 loaded Loaded module: argc:2 [../../../../../../../../rtems.master/c/src/../../testsuites/libtests/dl01/dl-o1.c] 0: Line 1 1: Line 2 Loaded module: argc:3 [../../../../../../../../rtems.master/c/src/../../testsuites/libtests/dl01/dl-o1.c] 0: Call 2, line 1 1: Call 2, line 2 2: Call 2, line 3 handle: 0x2044890 closed *** END OF TEST libdl (RTL) Loader 1 *** If you are on a supported architecture and you are building the testsuite you will need to clone the rtems-tools.git repo, build and install it or you will get a configure error. If you are not building the testsuite rtems-tools is not be needed. The procedure is: $ git clone git://git.rtems.org/rtems-tools.git rtems-tools.git $ cd rtems-tools.git $ waf configure --prefix=$HOME/development/rtems/4.11 $ waf build install [ Doing this will also provide you with a RTEMS GDB Python scripts. ] I would like to thank Peng Fan for his work in GSoC to get the code into the shape it is now. Peng, we have a gdb patch to submit. I also would like to thank all the tester who provided feedback and fixes. Finally thanks to Alan and NASA for making this work possible. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Clash in sethostname char const argument
Hello Sebastian, I am starting to test GCC-4.9.2 toolchain with actual RTEMS and I have noticed that when I use actual Newlib GIT there is added #if __BSD_VISIBLE || (defined(_XOPEN_SOURCE) && __XSI_VISIBLE < 500) int _EXFUN(sethostname, (const char *, size_t)); #endif to include/sys/unistd.h but RTEMS declares these without const which results in rtems cpukit build error. Please, commit correction in type to RTEMS. Best wishes, Pavel diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h index 567cc8a..865b644 100644 --- a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h +++ b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h @@ -188,7 +188,7 @@ extern char *rtems_bsdnet_domain_name; /* * Some extra prototypes */ -int sethostname (char *name, size_t namelen); +int sethostname (const char *name, size_t namelen); void domaininit (void *); void ifinit (void *); void ipintr (void); diff --git a/cpukit/libnetworking/rtems/sghostname.c b/cpukit/libnetworking/rtems/sghostname.c index 6935b5c..8ac5c58 100644 --- a/cpukit/libnetworking/rtems/sghostname.c +++ b/cpukit/libnetworking/rtems/sghostname.c @@ -28,7 +28,7 @@ gethostname (char *name, size_t namelen) } int -sethostname (char *name, size_t namelen) +sethostname (const char *name, size_t namelen) { char *old, *new; ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: libdl: rtems.git dependence on rtems-tools.git
On Thu, Oct 30, 2014 at 7:13 PM, Chris Johns wrote: > On 31/10/2014 6:42 am, Gedare Bloom wrote: >> >> On Thu, Oct 30, 2014 at 3:40 PM, Gedare Bloom wrote: >>> >>> On Thu, Oct 30, 2014 at 3:32 PM, Chris Johns wrote: Hi, Libdl tests in the testsuite depend on tools in rtems-tools.git/linkers. Should I raise a configure error if the tools are not found or not build the tests ? Raising an error is my preferred option because libdl for the supported archs is tested however it creates a dependency between rtems-tools.git and RTEMS. I can help with this by adding building of rtems-tools.git to the RSB's build of RTEMS tools. Comments ? >>> Only make it an error if building the rtems-tools/linker is part of >>> the "standard" toolset builds, thus decreasing the burden on users who >>> don't care to use libdl. > > > Yes. Libdl only builds for the architectures there is relocation support > for. > >> The documentation on self-built tools, and whatever process we have >> for the "authoritative tools" guide should include notes regarding >> this. > > > Sure. Do you have guide ? > Nope. There are some instructions under doc/started that come to mind. I don't know that we currently have a defined authoritative guide to building tools, as such. > Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Clash in sethostname char const argument
Hello Pavel, On 31/10/14 02:04, Pavel Pisa wrote: I am starting to test GCC-4.9.2 toolchain with actual RTEMS and I have noticed that when I use actual Newlib GIT there is added #if __BSD_VISIBLE || (defined(_XOPEN_SOURCE) && __XSI_VISIBLE < 500) int _EXFUN(sethostname, (const char *, size_t)); #endif to include/sys/unistd.h but RTEMS declares these without const which results in rtems cpukit build error. Please, commit correction in type to RTEMS. sorry, I didn't anticipate that this Newlib version will be used so fast. Chris submitted a fix for me. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel