• E
    nodedev: udev: Convert udev private data to a lockable object · 36555364
    Erik Skultety 提交于
    Since there's going to be a worker thread which needs to have some data
    protected by a lock, the whole code would just simply get unnecessary
    complex, since two sets of locks would be necessary, driver lock (for
    udev monitor and event handle) and a mutex protecting thread-local data.
    Given the future thread will need to access the udev monitor socket as
    well, why not protect everything with a single lock, even better, by
    converting the driver's private data to a lockable object, we get the
    automatic object disposal feature for free.
    Signed-off-by: NErik Skultety <eskultet@redhat.com>
    36555364
node_device_udev.c 54.5 KB