On Fri, Jul 24, 2020 at 8:20 AM Richi Dubey <richidu...@gmail.com> wrote: > > Hi, > > With Dr. Butterfield's help, I've made the changes to implement the FIFO > Queue using chain. I am not accustomed to coding for embedded systems, so I > am not completely sure if I should be using malloc or not. > > Someone, please review the following changes: > > FIFO Implementaion and Queue traversal: > https://richidubey.github.io/Strong-APA-Documentation/html/schedulerstrongapa_8c_source.html#l00159 > > The structure I have defined to be used with Chain_Control: > https://richidubey.github.io/Strong-APA-Documentation/html/structCPU.html > I can't fully review yet. You should not be using malloc.
I can review for you on github if you like, if you make a pull request against the base commit of your rtems fork. > Thank you, > Richi. > > On Fri, Jul 24, 2020 at 11:28 AM Richi Dubey <richidu...@gmail.com> wrote: >> >> Hi Andrew, >> >> Your suggestion helps and I am going to work on it today. Thank you. >> >> On Thu, Jul 23, 2020 at 8:14 PM Andrew Butterfield >> <andrew.butterfi...@cs.tcd.ie> wrote: >>> >>> Hi Richi, >>> >>> a quick answer to 1 below >>> >>> On 23 Jul 2020, at 15:20, Richi Dubey <richidu...@gmail.com> wrote: >>> 1)Both the algorithms require the use of a FIFO Queue to support the insert >>> and dequeue operations. >>> >>> I believe we can use chains and use the chain_append() and combination of >>> _Chain_Extract and _Chain_First or just _Chain_First and node->next to >>> achieve the FIFO requirements. >>> >>> >>> >>> You might want to look at chain_get() - it removes the first element, so >>> does a FIFO protocol in tandem with chain_append() >>> >>> Regards, >>> Andrew >>> >>> _______________________________________________ >>> devel mailing list >>> devel@rtems.org >>> http://lists.rtems.org/mailman/listinfo/devel >>> >>> >>> -------------------------------------------------------------------- >>> Andrew Butterfield Tel: +353-1-896-2517 Fax: +353-1-677-2204 >>> Lero@TCD, Head of Software Foundations & Verification Research Group >>> School of Computer Science and Statistics, >>> Room G.39, O'Reilly Institute, Trinity College, University of Dublin >>> http://www.scss.tcd.ie/Andrew.Butterfield/ >>> -------------------------------------------------------------------- >>> > _______________________________________________ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel