superfluous instruction in queue.c
Posted by Nobody/Anonymous on October 26, 2005
The function prvUnlockQueue in queue.c contains:
/* Do the same for the Rx lock. */
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)
RE: superfluous instruction in queue.c
Posted 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.
Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd..
See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.