You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/08 14:26:17 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4035: work_queue: schedule the work queue using the timer mechanism

xiaoxiang781216 commented on pull request #4035:
URL: https://github.com/apache/incubator-nuttx/pull/4035#issuecomment-876485440


   
   > So we use more resources and couple work-queues with watch dogs, but the performances is superior.
   > 
   
   work_s has 6 int before modification, need 7 int, so each work requre additional 4 bytes. but we can use union like this to achieve the same size as before:
   ```
   work_s
   {
     union
     {
        struct sq_entry_s sq;
        struct wdog_s timer;
     };
     worker_t  worker;
     FAR void *arg;    
   };
   ```
   since sq and timer is never used at the same time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org