Re: coreaudio-api digest, Vol 1 #146 - 10 msgs
Re: coreaudio-api digest, Vol 1 #146 - 10 msgs
- Subject: Re: coreaudio-api digest, Vol 1 #146 - 10 msgs
- From: Jeff Moore <email@hidden>
- Date: Thu, 29 Nov 2001 11:02:07 -0800
on 11/29/01 1:10 AM, Stephane Letz <email@hidden> wrote:
>
> In 10.1, an ordinary process can't make an ordinary thread be higher
>
> priority than the window server (whose priority doesn't degrade either), so
>
> your ordinary thread will get pre-empted (or not scheduled in the first
>
> place) whenever the window server needs to do something.
>
>
Does this behaviour of 10.1 will remain in future versions of the system?
I don't know. Best to focus on what we have now.
>
If yes it means that the standard pthread API (using SCHED_FIFO) can not be
>
used for real-time audio. Is that correct?
The HAL's implementation creates and manages it's threads and locks using
the pthread API.
It is the policy of the kernel only to grant SCHED_FIFO to processes that
have root privileges. Has nothing to do with what API you use to manage your
threads.
>
And it means that one need to use the lower level mach thread API for
>
real-time audio.
To use the time constraint scheduling policy you have to use the Mach APIs
in <mach/thread_policy.h>.
--
Jeff Moore
Core Audio
Apple