| 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 |