Re: Timers in a task context

2018-04-11 Thread Joel Sherrill
On Tue, Apr 10, 2018 at 7:20 AM, Matthew J Fletcher wrote: > Hi > > It would be good to know if rtems_task_self() is expected to return the > 'TIME' a.k.a rtems_timer_initiate_server() task id, when a timer created > with rtems_timer_server_fire_after() fires. > Yes. The timer

Re: Timers in a task context

2018-04-11 Thread Sebastian Huber
On 10/04/18 14:20, Matthew J Fletcher wrote: Hi It would be good to know if rtems_task_self() is expected to return the 'TIME' a.k.a rtems_timer_initiate_server() task id, when a timer created with rtems_timer_server_fire_after() fires. The use of rtems_task_self() in timer routines is a

Re: Timers in a task context

2018-04-10 Thread Sebastian Huber
On 10/04/18 11:11, Matthew J Fletcher wrote: It looks like a difference in operation to say, for example ThreadX, who's tx_thread_identify() function is documented similarly "If this service is called from an ISR the return value represents the thread running prior to the executing interrupt

Re: Timers in a task context

2018-04-10 Thread Matthew J Fletcher
It looks like a difference in operation to say, for example ThreadX, who's tx_thread_identify() function is documented similarly "If this service is called from an ISR the return value represents the thread running prior to the executing interrupt handler", however in operation in ThreadX there is

Re: Timers in a task context

2018-04-10 Thread Matthew J Fletcher
Hi, I think I've managed to narrow it down,. rtems_task_self() is documented as "If called from an interrupt service routine, this directive will return the Id of the interrupted task.",.. however if you run a timer server and your timer is initiated using rtems_timer_server_fire_after(), then

Re: Timers in a task context

2018-04-09 Thread Joel Sherrill
On Mon, Apr 9, 2018 at 11:54 AM, Matthew J Fletcher wrote: > Hi, > > Some other operating systems allow a timer be created that will fire the > associated routine in that tasks context. In rtems timers are either in the > interrupt or the timer task, either way, not in the

Timers in a task context

2018-04-09 Thread Matthew J Fletcher
Hi, Some other operating systems allow a timer be created that will fire the associated routine in that tasks context. In rtems timers are either in the interrupt or the timer task, either way, not in the context of the task that created the timer. This has caused me some head scratching,. the