FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [October 2005 Threads] superfluous instruction in queue.cPosted by Nobody/Anonymous on October 26, 2005 Hello,
The function prvUnlockQueue in queue.c contains:
taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL();
Couldn't these lines be deleted? (Use 1 critical section for the whole function instead of 2. The scheduler is suspended anyway so timing-critical tasks won't benefit from the additional opportunity to allow tick-interrupts)
Paul
RE: superfluous instruction in queue.cPosted by Richard on October 26, 2005 Yes the lines could be deleted - however they are included to minamise the amount of time interrupts are suspended. The scheduler is suspended, but other interrupts will still operate.
The scheduler suspension mechanism is the most complex part of the code. Its only purpose is to enable interrupts to continue to be processed even when kernel data structures are being accessed. Rather nifty I think, but I am bias :-)
It is a trade of between execution speed and responsiveness.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|