MTres19 opened a new issue #2663:
URL: https://github.com/apache/incubator-nuttx/issues/2663


   In developing my CAN driver for the Tiva chips, I decided to use a kernel 
thread to load messages from the RX mailboxes. I call kthread_create like this:
   
   ~~~
   ret = kthread_create("Tiva CAN0", CONFIG_TIVA_CAN0_PRIO,
                                   TIVA_CAN_KTHREAD_STACKSIZE, 
tivacan_rxhandler,
                                   kthd_argv);
   ~~~
   
   where kthd_argv is a string vector with a terminating null entry as 
specified in the comments for kthread_create. This is done in 
`tivacan_setup()`, which is called by `can_open()`. However, `kthread_create()` 
hangs in `file_dup2()`; for some reason it copies 3 file descriptors (stdin, 
stdout, stderr, I suppose) then hangs waiting for a semaphore. This should not 
happen—kthreads should not even have memory allocated for open file descriptors.


----------------------------------------------------------------
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.

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


Reply via email to