Hi,
A few suggestions for your code:
1) Try moving the line, "return pthread_create(&thread, NULL, thread_code, 0); to the end of the init_module function. Since this line signifies the end of the function, the code following it will not be implemented.
2) In point 3 of what you've tried, change "-L/usr/local/natinst/nidaqmxbase/lib/nidaqmxbase" to "-lnidaqmxbase"
Furthermore, are you aware of any restrictions in the programs which RT-Linux can run? If you run the example code provided, is it successful?
Thanks,
Lesley Y.