rtems_event_receive and timeslicing
Joel Sherrill
joel.sherrill at OARcorp.com
Tue Oct 23 15:57:57 UTC 2001
Brett Swimley wrote:
>
> I have a situation where I have two tasks running at the same priority (=
> 128). Both tasks were created with RTEMS_PREEMPT and
> RTEMS_TIMESLICE.
>
> One task is blocked, waiting on an event that is sent by an ISR. The other
> task is in an infinite loop as follows:
>
> for ( ;; )
> {
> ;
> }
>
> The task that is blocked on the rtems_event_receive() never appears to
> receive the event. However, if I place an
>
> rtems_task_suspend( RTEMS_SELF );
>
> call prior to the infinite loop in the 2nd task - the first task does
> receive the event.
>
> I won't have this task construct in the near future as I implement more
> functionality, but I would like to understand if the blocked task should run
> under this situation with timeslicing enabled. If I am missing some
> configuration options as well, I would like to know.
>
> I have
> #define CONFIGURE_TICKS_PER_TIMESLICE 50
> in my Initialization function file.
>
> I'm currently using the rtems-ss-20010816 snapshot.
My guess is that you don't have a clock driver. Or that you do
and the time quantum is larger than you think based upon
CONFIGURE_MICROSECONDS_PER_TICK and (CONFIGURE_TICKS_PER_TIMESLICE == 50).
A 10 millisecond tick (the default I think) and 50 ticks per
timeslice is 1/2 second per timeslice.
> Thanks for any insight.
>
> Regards,
>
> Brett Swimley
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list