user2026599
user2026599

Reputation: 23

bsd kernel user space events kqueue

At the start, I wanna tell that I am not well versed with BSD internals. Now coming to the question.

There is a mechanism to have communication between user space and kernel space in bsd using kqueues. However, what I have understood is, we can have pre-defined events using kqueue and kevents. Can the same mechanism be used to define a custom event? For eg. In Linux I may be able to use netlink sockets. Please, correct me if I am mistaken in my understanding.

If Kqueue is not the correct solution then is there any other mechanism that allows me to notify user space from kernel. I am looking for something other than custom defined signals.

Thanks

Upvotes: 2

Views: 427

Answers (1)

Roland Smith
Roland Smith

Reputation: 43533

You can send user-defined events using the EVFILT_USER filter. See kqueue(2).

Upvotes: 2

Related Questions