Michael Tasche
|
io-pkt thread context nightmare
|
Michael Tasche
04/16/2019 4:43 AM
post119660
|
io-pkt thread context nightmare
Hi,
we are just porting out lsm-Modul, we developed based on the lsm.nraw sample years ago in the good old QNX 6.x times.
The Resource-Manager thread for our lsm-interface is created with nw_pthread_create().
This thread is calling ifp->if_ioctl() from time to time, to get the interface statistics.
Under QNX 7 this results in an io-.pkt panic, which is fired by nic_mutex_trylock(), called from the e1000 driver.
nic_mutex_trylock() tries to validate the run context by checking the curlwp against proc0. If they are equal, we
panic().
As I learnd until now, io-pkt seems to emulate half of the netbsd-kernel to run the BSD TCPIP stack.
My thread, generated by nw_pthread_create() seems to be the wrong one for calling the e1000 driver ioctl.
How do I get the correct thread context, to allow it.
pcreat(), kthread_create() , ...?
Do I loose performance, if my thread is part of this emulated NETBSD-scheduler ?
I am a bit confused. Please advice.
Kind Regards
Michael
|
|
|