pkarashchenko commented on pull request #5826:
URL: https://github.com/apache/incubator-nuttx/pull/5826#issuecomment-1076095260


   Maybe we can introduce a flag that may be passed to host build system and 
select the size of `pid_t` on a target system? By default it will be 32-bit. 
Something like
   ```
   #ifdef NUTTX_INT_16BIT
   typedef uint16_t nuttx_pid_t;
   #else
   typedef uint32_t nuttx_pid_t;
   #endif
   
   ...
   if (sizeof(nuttx_pid_t) == sizeof(uint16_t))
     {
       ret = READU16(priv->pidhash[idx] + priv->tcbinfo->pid_off, pid);
     }
   else
     {
       ret = READU32(priv->pidhash[idx] + priv->tcbinfo->pid_off, pid);
     }
   ```
   What do you think.
   In general I agree that now my suggestion targets only `EFM8` architecture 
that is supported by J-Link, but not supported by NuttX. So we can leave it for 
future. 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to