[openib-general] Re: uverbs comp events

Roland Dreier rolandd at cisco.com
Wed Aug 17 20:35:11 PDT 2005


    Arlin> the options to wake up this blocking cq_fd and thread are:
    Arlin> 1. signal the thread with pthread_kill , pthread_cancel
    Arlin> 2. poll cq_fd with timeout, wakeup periodically and check
    Arlin> for termination.  3. ibv_close_device () to force interrupt
    Arlin> on the polling cq_fd (problem I reported above) 4. add new
    Arlin> generate event call from verbs. (IB gen1 direct CQ objects
    Arlin> supported this model)

    Arlin> In my opinion, option 4 is the best option unless someone
    Arlin> can show me a better way to signal the cq_fd from
    Arlin> userspace. Did I miss some options?

I think you can just create a pair of FDs with pipe() and then sleep
on both the cq_fd and your pipe fd using poll().  Then when you want
to wake up the thread just write something into the other pipe fd.

 - R.



More information about the general mailing list