site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Hi Régis, You are welcome! Great, looking forward to them. (-: Best regards, Anton -- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer, http://www.linux-ntfs.org/ _______________________________________________ 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... On 7 Sep 2007, at 23:36, Régis Duchesne wrote: (void)thread_block(THREAD_CONTINUE_NULL); And best of all thread_block() is exported in Mach.exports so it is a stable kernel API. Definitely worth a try I would think! If it hangs (I don't think it will but I may have misunderstood!) or if it always schedules the same process back (I don't think it will do that either!) then you haven't lost anything but if my reading of the scheduling code is correct this will indeed perform a context switch to the next in line task on the run queue and will keep doing this until your task gets to be the next in line and the context switch then brings your task back and thread_block() returns. Note as I read the code when your task is the only task on the run queue thread_block() will simply return immediately. PS. If you try this I would be very grateful if you tell me how it worked out as I have already spent too long looking at the code when I have lots of other work to do! Looks promising. Thanks for your investigation. I'll definitely give this a try and report my findings. This email sent to site_archiver@lists.apple.com