Csound Csound-dev Csound-tekno Search About

[Cs-dev] Threading again

Date2008-05-28 00:07
From"Michael Gogins"
Subject[Cs-dev] Threading again
It turns out that the Csound API defines a thread object as void * (4 
bytes), but the Windows implementation of the pthread API defines a thread 
object as

typedef struct {
    void * p;                   /* Pointer to actual object */
    unsigned int x;             /* Extra information - reuse count etc */
} ptw32_handle_t;

which has a different size (8 bytes).

Consequently, changing all Csound threads to pthreads would involve a 
breaking change (although a minor one) in the Csound API. The threading 
calls would be changed to return some opaque type 8 bytes in size, such as 
"long long."

Please indicate your preference for one of the following options, or suggest 
another if you like:

1. Perform the API change. "long long" works for both MinGW and MSVC, and 
probably works on all Csound platforms, but a union with a dummy name and 
the actual type would be future proof.

2. Remove the Csound threading API altogether, and let users use the pthread 
API in its place.

3. Leave the Windows threads in place, and finish implementing barriers in 
the Windows Csound API using the native Windows barriers calls (they do 
exist).

My personal preference is for the API change.

Regards,
Mike 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-05-28 00:40
FromTim Mortimer
SubjectRe: [Cs-dev] Threading again
I am simply wondering if any of your proposed strategies for change have the
potential to assist in developing the dual processor capability for csound?

otherwise, as usual, watching with interest.

-----
*******************
www.phasetransitions.net
hermetic music * python * csound * possibly mindless ranting
various werk in perpetual delusions of progress....

-- 
View this message in context: http://www.nabble.com/Threading-again-tp17502066p17502473.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-05-28 01:00
FromFelipe Sateler
SubjectRe: [Cs-dev] Threading again
AttachmentsNone  None  None  

Date2008-05-28 21:02
From"Steven Yi"
SubjectRe: [Cs-dev] Threading again
AttachmentsNone