Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Queue Question

$
0
0

Question:

When adding elements to a Q, can I declare one Q entry,  put it in the Q, and then rewrite the data of that object, and put it in the Q again?

For example:

void task(void)
{
     Queue_record qEntry;
    //etc declare vars

    while(1) 
    {
          for(i=0;i<8;i++)
         {
              newData = GIO_read();
              qEntry->data = newData;
              Queue_Put(myQ, &(qEntry.Elem));
         }
         Sempahore_post( processingTaskSem);
    }
}

or, do I have to declare a new Q object every time I put new data into the Q?


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>