Re: Kext function SMP locking
Re: Kext function SMP locking
- Subject: Re: Kext function SMP locking
- From: "Sven Mutke" <email@hidden>
- Date: Sat, 24 Feb 2007 11:43:42 +0100
I want to ensure that the subfunction is not re-entered. Can you point
me to some further documentation or even better example code?
Is there also a (un)recommended way for generic kernel extensions
(without IOKit)?
Thanks,
Sven
Are you looking for this guarantee because you have static data, or
do you mean that for a given instance of your driver you want to
ensure it is not re-entered?
For the latter, the most common approach is to call the function with
your driver's workloop held. The most common way of doing this is to
ensure that you call the function from an event action; interrupt,
timer or commandgate.
For the former, well, locked static data is mostly a bad idea, but
occasionally when you need it, the easiest way to protect it is with
an IOLock. Be careful not to deadlock yourself, etc.
_______________________________________________
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