views:

49

answers:

1

I'd like to know if there are dangers with spawning multiple threads that each create their own udev context and start monitoring hardware changes. It would think that if each thread has its own udev context everything is fine. However, if calls like udev_new or udev_monitor_new_from_netlink would access global/static variables then issues may arise.

Since neither the README or the documentation mentions anything about multithreading I'm asking it here. Does anyknow know something more?

+2  A: 

A quick inspection of the udev source suggests that no static/global storage is used, everything appears to be tied to context.

Hasturkun
A few greps did not turn up any sign of common (e.g. strtok()) non-reentrant functions either. Disclaimer - I spent exactly 2 minutes poking around the code.
Tim Post
@Tim, thanks for spending 2 minutes of your life helping me :)
StackedCrooked