Sending notifications/events to user land from kext
Sending notifications/events to user land from kext
- Subject: Sending notifications/events to user land from kext
- From: "Shailesh Parulekar" <email@hidden>
- Date: Thu, 05 Jul 2007 13:39:52 +0000
Hi All,
I have developed a kernel extension which needs to communicate
asynchronously with an application (which is also developed by us).
Basically, the kext needs to notify various custom events to the application
and requires to provide little data along with the event (this data may not
exceed say 20 bytes). These events are very much specific to the kext and
the app like:
1. The kext is running out of resources OR
2. The kext is ready and the application can query data. etc.
One (real bad) way is that the application invokes IoCtl in an infinite loop
to the device file of my kext and every time a notification is to be done
the kext completes the Ioctl and copies data to user buffers, but this may
also result in lots of race conditions. Any AIO methods would result in same
problem. Hence I am looking for some truly asynchronous way to talk to my
application.
Another way I felt was to send signal to the application (psignal) but I
will be restricted to a limited set of signals and also I will not be able
to send data with the signals.
kevents too work for standard events (am I right??)
Is there a way out for this problem. Does Mac provide some interface(may be
in traditional UNIX ways) to communicate asynchronously from kernel to user
apps?
Please let me know.
Thanks,
--shailesh
_________________________________________________________________
http://im.live.com/messenger/im/home/?source=hmtextlinkjuly07
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden