Subject: Re: Status report: sysmon_cpufreq(9) + powerctl(8)
To: Iain Hibbert <firstname.lastname@example.org>
From: Jason Thorpe <email@example.com>
Date: 09/28/2006 14:10:36
On Sep 28, 2006, at 2:00 PM, Iain Hibbert wrote:
> On Thu, 28 Sep 2006, Juan RP wrote:
>> Any more suggestions about the code?
> error = prop_dictionary_copyout_ioctl(plist, cmd, DEV_PROP_D);
> I am not sure that this is altogether safe - if the copyout sleeps
> ENOMEM, and another thread tries to get the lock in the meantime
> does that
> not just lock the CPU? (is a spinlock required?)
This code is actually wrong --- you're not allowed to hold a
simple_lock across a sleep.
> If another thread changes the dictionary during the externalize, I
> it will just break the iterators and you will get an error. Jason?