I am looking forward to implement a driver for CAN bus communicationin Linux.
Need some design suggestion.
Linux there are user space & kernel space. Drivers run at kernel space application at user space.
1> Now suppose if packets are received at very high speed then how drivers can manage this situation ?
2> If packets have to transmit at high rate then what to do ?
3> how data should be moved between user & kernel space. Should we use system call or some fast mechanism apart from this ?
4> Can it be done in threads at kernel level ? But if there are two threads running at kernel level to TX from CAN bus & RX from CAN bus then do we have to use mutex to save critical section (i.e our internal registers)
5> If suppose shared libraries are used to access the driver from application. Can shared libraries access driver functionality using system call ?
Totally confused what should be the right approach.
Please suggest. Any reply will be appreciable.