Using kqueue with 2 threads
Matthias Zitzen
m.zitzen at o-notation.org
Mon Apr 16 07:36:08 UTC 2012
Hello,
Am 10.04.2012 21:52, schrieb Ben Short:
>> EV_SET(&ke, fd, EVFILT_VNODE, EV_ADD, NOTE_DELETE | NOTE_RENAME |
>> NOTE_EXTEND, 0, NULL);
>>
>> if (kevent(kq,&ke, 1, NULL, 0, NULL) == -1) {
>> std::cerr<< "kevent produced error: "<< strerror(errno)<<
>> std::endl;
>> }[/CODE]
>>
Did i understand right, that after registering and firing one event the
kevent() function doesn't block any more?
If so, register the events with EV_ADD | EV_CLEAR. With this flag, the
event state is cleared and kevent() is still blocking(man kqueue).
That flag was solving my problem...
Matthias
More information about the freebsd-questions
mailing list