site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Godfrey On 05/23/2005, at 16:32 , Sam Vaughan wrote: Sam On 24/05/2005, at 5:05 AM, oramble@yahoo.com wrote: _sleep() { ... ... s = splhigh(); ... p->p_priority = pri & PRIMASK; ... } looks like splhigh() cannot protect p->p_priority from broken if current_proc() has two threads running in two different funnels, and they try to change priority at same time. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/gvdl%40apple.com This email sent to gvdl@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... Yup, this would be a problem indeed and thanks for pointing it out. It turns out, as Sam, pointed out the p_priority field in the struct proc isn't used at all anymore. We use a similar fields in the thread schedule stuff. The useless splhigh() and friends have been removed from Darwin 8 so I'm assuming you're referring to Darwin 7 xnu's kern_synch.c here. As far as I can tell, the p_priority flag isn't used anywhere else in the kernel, so this is a non-issue. Did you point this out just from code inspection or are you seeing odd behaviour when kernel network and file system threads sleep at the same time as each other? This email sent to site_archiver@lists.apple.com