Csound Csound-dev Csound-tekno Search About

[Cs-dev] csound api thread functions and scheduling

Date2005-10-15 22:48
FromIain Duncan
Subject[Cs-dev] csound api thread functions and scheduling
Can anyone tell me whether the csound thread creation functions allow us 
to schedule low and high priority threads in a cross platform manner?

If I want to make sure one thread can pre-empt another when both could 
be waiting on a mutex, will I have to use pthreads directly or can that 
be done somehow with only api functions and api mutexes?

It seems to me that if I can make sure that one thread will *always* win 
a race for a mutex, I can solve my scheduling problems by having two api 
csound trapping threads that repeatedly lock->process->unlock only one 
write at a time where the csoundPerformKsmp() thread will always win if 
it needs to do stuff.

Thanks
Iain


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-10-17 21:21
FromIain Duncan
SubjectRe: [Cs-dev] csound api thread functions and scheduling
Just curious as to whether I should assume that no response means either 
folks don't know or csound thread functions do not include scheduling? 
Specifically I am interested in equivalents to the pthread yield 
functions and setting thread scheduling attributes to make sure that one 
thread always wins races to mutexes or condition variables.

Thanks
Iain

Iain Duncan wrote:
> Can anyone tell me whether the csound thread creation functions allow us 
> to schedule low and high priority threads in a cross platform manner?
> 
> If I want to make sure one thread can pre-empt another when both could 
> be waiting on a mutex, will I have to use pthreads directly or can that 
> be done somehow with only api functions and api mutexes?
> 
> It seems to me that if I can make sure that one thread will *always* win 
> a race for a mutex, I can solve my scheduling problems by having two api 
> csound trapping threads that repeatedly lock->process->unlock only one 
> write at a time where the csoundPerformKsmp() thread will always win if 
> it needs to do stuff.
> 
> Thanks
> Iain
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net