Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] An oddity

Date2008-06-04 13:37
From"Michael Gogins"
SubjectRe: [Cs-dev] An oddity
That is what it is supposed to do.

I had to change the Csound threading API because on Windows, pthread_t is a 
struct but we have defined the API as returning a pointer.

I suppose pthread_t pthread could be static pthread_t pthread, but otherwise 
please do not change this unless you can come up with a solution that will 
work on Windows as well as on the other platforms.

Regards,
Mike

----- Original Message ----- 
From: "jpff" 
To: 
Sent: Wednesday, June 04, 2008 6:44 AM
Subject: [Cs-dev] An oddity


> The function in Top/threads.c
>
> PUBLIC void *csoundGetCurrentThreadId(void)
> {
>  pthread_t pthread = pthread_self();
>  return &pthread;
> }
>
> is clearly wrong as it returns a local address.  What is it supposed
> to do?
>
> ==John ffitch
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-04 14:24
FromFons Adriaensen
SubjectRe: [Cs-dev] An oddity
AttachmentsNone  

Date2008-06-04 14:37
Fromjpff
SubjectRe: [Cs-dev] An oddity
I just want a solution that works on C

It returns the address of a variable that is then overwritten on teh next 
functuion call.  Sometimes called a random variable.
  I penalise the student heavily for doing this.  Why not pass a variable 
into the function?
==JOhn ff



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-04 19:28
FromFelipe Sateler
SubjectRe: [Cs-dev] An oddity
AttachmentsNone  None  None