-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't read from CAN dev using internal OS interface #111
Comments
lukegluke
added a commit
to lukegluke/incubator-nuttx
that referenced
this issue
Jan 16, 2020
Store internal file pointer in f_priv and use it then to distinct readers issue apache#111
I fix it as I suggested. It works now. But there is still important question about possibility that new reader can be added with file pointer that is already in readers list. |
Move to more simple solution: just storing pointer to specific reader in filep->f_priv |
patacongo
pushed a commit
that referenced
this issue
Jan 17, 2020
…nterface (#118) Author: Gregory Nutt <[email protected]> Run all .c and .h files in last PR through tools/nxstyle and correct all coding standard complaints. Author: Oleg <[email protected]> * Fix CAN driver to work with internal OS interfaces. Store internal file pointer in f_priv and use it then to distinct readers (See issue #111) * Store reader pointer in f_priv instead of filep * Don't need in filep in can_reader_s
I believe that merging PR118 closes this issue. Correct? |
Yes. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In drivers/can/can.c @walmis added support of multiple readers of the same port with 7d112f5, but in current state it breaks ability to work with CAN using internal OS interface.
Issue in current logic:
I'm not really good in all this things with inodes, files and descriptors, but as for me the solution will be to distinct readers in can driver not by filep itself, but by for example f_priv field of it.
Could we store value of filep in f_priv on can opening and use it in can_read? What happens with file structure (from point 2) with detaching, is there a chance this pointer be reused before file will be closed by user-provided reference?
p.s. maybe this issue also related to other devices, for instance serial
The text was updated successfully, but these errors were encountered: