Re: Error when using RTEMS_MICROSECONDS_TO_TICKS

2021-05-11 Thread Joel Sherrill
On Tue, May 11, 2021 at 1:11 AM Gedare Bloom wrote: > On Sun, May 9, 2021 at 9:33 AM Richi Dubey wrote: > > > > Hi, > > > > I am using the line: > rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(6000)); in my test > program to emulate a 6 seconds sleep. But when I deubg the program using > qem

Re: timing on qemu

2021-05-11 Thread Richi Dubey
Thank you for the reply. I should have searched for the definition before asking for help. On Tue, May 11, 2021 at 11:39 AM Gedare Bloom wrote: > On Sat, May 8, 2021 at 12:09 PM Richi Dubey wrote: > > > > Hi, > > > > When I use benchmark_timer_initialize() and later read the value with > benchm

Re: Error when using RTEMS_MICROSECONDS_TO_TICKS

2021-05-11 Thread Richi Dubey
> > Yes, 6000 microseconds isn't 6 seconds. :p Ouch. Yes. Thanks. Use (rtems_clock_get_ticks_per_second() * 6) as documented here: > > https://docs.rtems.org/releases/rtems-docs-4.11.2/c-user/clock_manager.html#rtems-clock-get-ticks-per-second > Yes, This works! Thanks. On Tue, May 11, 2021 at

[PATCH v4] sb: Merge mailer changes from rtems-tools

2021-05-11 Thread Alex White
This adds the improved mailer.py script from rtems-tools. Closes #4388 --- source-builder/sb/mailer.py | 194 ++-- source-builder/sb/options.py| 26 - source-builder/sb/setbuilder.py | 2 + 3 files changed, 189 insertions(+), 33 deletions(-) diff --git

[PATCH 2/3] rtems: Use rtems_clock_get_ticks_per_second()

2021-05-11 Thread Sebastian Huber
This avoids an integer division at runtime. --- cpukit/rtems/src/clocktodvalidate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpukit/rtems/src/clocktodvalidate.c b/cpukit/rtems/src/clocktodvalidate.c index d8e9d01382..95c8e77c37 100644 --- a/cpukit/rtems/src/clocktod

[PATCH 3/3] rtems: Constify rtems_task_wake_when()

2021-05-11 Thread Sebastian Huber
Add a parameter to _TOD_Validate() to disable the validation of the ticks member. Close #4406. --- bsps/arm/altera-cyclone-v/rtc/rtc.c| 3 +-- bsps/shared/dev/rtc/rtc-support.c | 2 +- cpukit/include/rtems/rtems/clockimpl.h | 13 - cpukit/include/rtems/rtems/tasks.h |

[PATCH 1/3] _TOD_Validate(): Fix incorrect return code

2021-05-11 Thread Sebastian Huber
From: Frank Kühndel This patch fixes bug #4403. Directives * rtems_timer_fire_when() * rtems_timer_server_fire_when() * rtems_task_wake_when() are documented to return RTEMS_INVALID_ADDRESS when their time-of-day argument is NULL. But actually they return RTEMS_INVALID_CLOCK. To fix the issue t

[PATCH 0/3] Improve time of day validation

2021-05-11 Thread Sebastian Huber
Frank Kühndel (1): _TOD_Validate(): Fix incorrect return code Sebastian Huber (2): rtems: Use rtems_clock_get_ticks_per_second() rtems: Constify rtems_task_wake_when() bsps/arm/altera-cyclone-v/rtc/rtc.c| 11 - bsps/shared/dev/rtc/rtc-support.c | 2 +- cpukit/include/rtem

RE: [PATCH v2 1/5] libcsupport: Added futimens() and utimensat()

2021-05-11 Thread Ryan Long
-Original Message- From: Gedare Bloom Sent: Monday, May 10, 2021 11:50 PM To: Ryan Long Cc: devel@rtems.org Subject: Re: [PATCH v2 1/5] libcsupport: Added futimens() and utimensat() On Mon, May 10, 2021 at 3:16 PM Ryan Long wrote: > > Reply is below. > > -Original Message- >

Re: [PATCH 1/3] _TOD_Validate(): Fix incorrect return code

2021-05-11 Thread Gedare Bloom
On Tue, May 11, 2021 at 9:38 AM Sebastian Huber wrote: > > From: Frank Kühndel > > This patch fixes bug #4403. Directives > > * rtems_timer_fire_when() > * rtems_timer_server_fire_when() > * rtems_task_wake_when() > > are documented to return RTEMS_INVALID_ADDRESS when their time-of-day > argumen

Re: [PATCH 3/3] rtems: Constify rtems_task_wake_when()

2021-05-11 Thread Gedare Bloom
I'm not a big fan of the way this has been implemented. It exposes an internal implementation detail (how you mask the ticks). I don't quite see why it is being done. On Tue, May 11, 2021 at 9:38 AM Sebastian Huber wrote: > > Add a parameter to _TOD_Validate() to disable the validation of the > t

[PATCH v2] user/bld/index.rst: removed references to legacy network config options

2021-05-11 Thread Harrison Edward Gerber
--- user/bld/index.rst | 7 --- 1 file changed, 7 deletions(-) diff --git a/user/bld/index.rst b/user/bld/index.rst index ebedf5a..411b3a2 100644 --- a/user/bld/index.rst +++ b/user/bld/index.rst @@ -309,10 +309,6 @@ in the configuration file. Set ``RTEMS_MULTIPROCESSING`` to ``True`

Re: [PATCH v2] user/bld/index.rst: removed references to legacy network config options

2021-05-11 Thread Vijay Kumar Banerjee
Hi Harrison, This patch looks good. If no one objects by Friday, I'll push this. Thanks. Best regards, Vijay On Tue, May 11, 2021 at 7:16 PM Harrison Edward Gerber wrote: > > --- > user/bld/index.rst | 7 --- > 1 file changed, 7 deletions(-) > > diff --git a/user/bld/index.rst b/user/bld/i

Re: [PATCH 3/3] rtems: Constify rtems_task_wake_when()

2021-05-11 Thread Sebastian Huber
On 11/05/2021 22:07, Gedare Bloom wrote: I'm not a big fan of the way this has been implemented. It exposes an internal implementation detail (how you mask the ticks). I don't quite see why it is being done. [...] diff --git a/cpukit/rtems/src/taskwakewhen.c b/cpukit/rtems/src/taskwakewhen.c i

Re: [PATCH 1/3] _TOD_Validate(): Fix incorrect return code

2021-05-11 Thread Sebastian Huber
On 11/05/2021 22:00, Gedare Bloom wrote: diff --git a/bsps/arm/altera-cyclone-v/rtc/rtc.c b/bsps/arm/altera-cyclone-v/rtc/rtc.c index 3e8c68e789..fb30da8d66 100644 --- a/bsps/arm/altera-cyclone-v/rtc/rtc.c +++ b/bsps/arm/altera-cyclone-v/rtc/rtc.c @@ -353,10 +353,9 @@ static int altera_cyclone_v

[PATCH v2] rtems: Constify rtems_task_wake_when()

2021-05-11 Thread Sebastian Huber
Add a parameter to _TOD_Validate() to disable the validation of the ticks member. There are two reasons for this change. Firstly, in rtems_task_wake_when() was a double check for time_buffer == NULL (one in rtems_task_wake_when() and one in _TOD_Validate()). Secondly, the ticks member is ignored

Spidev different ioctl structure

2021-05-11 Thread Andre.Nahrwold
Hello, I discovered that the Spidev include (linux/spi/spidev.h) contains different implementations of the ioctl structure when comparing rtems and linux. I used the mode value of the structure and wanted to compile the application for rtems and linux, that is where I got some errors. A few furt