Electronic Music mailing list archives

Previous Message: Re: number precision
Next Message: Re: pthreads (was Re: Updates to csound4)

From: gogins@pipeline.com ()
Date: Dec 2, 2004
Subject: Re: pthreads (was Re: Updates to csound4)
I have no objection to moving to pthreads on Windows, but for my purposes
the existing code works well enough, so I'm not motivated to do the work=2E=

If somebody else does it, fine, I'll help maintain it=2E

Original Message:
----------------- [EMAIL REMOVED] Date: Thu, 02 Dec 2004 10:36:17 +0000 [EMAIL REMOVED] Subject: [Csnd] pthreads (was Re: [Csnd] Updates to csound4)



This raises a question: since pthreads are present on all our target
systems,
shouldn't we move towards a more platform-independent code?
I know that, for windows we would require (if you're not on cygwin) the
pthread library=2E But that's OK, since we are already depending on other
external libraries=2E

That's probably simplify the code, less #ifdefs=2E
Perhaps also provide a more uniform behaviour (well, in theory, at least)=2E=


I have been using the pthread lib with msvc apps, and it seems to behave
very
well, the same way as in unix, so I'd say it's stable enough=2E

Victor

At 22:53 01/12/2004, you wrote: [EMAIL REMOVED]  writes:
>
> > One could use, or not use, pthreads with either MinGW or Cygwin=2E In
> > my projects (e=2Eg=2E Csound 5) I don't use Cygwin, I use MinGW, and
> > with MinGW, I do not use pthreads=2E
>
>I found out why you don't use pthreads on MinGW--the library is not
>present in the current distribution!
>
>I changed csound/widget=2Ecpp as follows, built Csound GBS on MinGW, and
>verified that Art's FL opcode example works=2E
>
>--- csound/widgets=2Ecpp  1 Dec 2004 13:52:14 -0000       1=2E14
>+++ csound/widgets=2Ecpp  1 Dec 2004 22:44:53 -0000 [EMAIL REMOVED] -1751,7 [EMAIL REMOVED] >
>  extern "C" void FL_run(FLRUN *p)
>  {
>-#ifdef _WINDOWS
>+#if defined(_WINDOWS) || defined(WIN32)
>      threadHandle =3D _beginthread(fltkRun, 0, NULL);
>      if (isActivatedKeyb)
>        threadHandle =3D _beginthread(fltkKeybRun, 0, NULL);
>
>Please tell if the reference to WIN32 is correct=2E  Michael and others,
>it's so nice having people who have been there giving advice, thus
>making resolving this bug quick=2E  Thanks=2E
>
>John
>-- [EMAIL REMOVED] >               (or to http://www=2Ecs=2Ebath=2Eac=2Euk/cgi-bin/csound ) [EMAIL REMOVED] 
Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth=20

--=20 [EMAIL REMOVED]               (or to http://www=2Ecs=2Ebath=2Eac=2Euk/cgi-bin/csound ) [EMAIL REMOVED] 
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web=2Ecom/ =2E


--  [EMAIL REMOVED]               (or to http://www.cs.bath.ac.uk/cgi-bin/csound ) [EMAIL REMOVED] 

+Re: pthreads (was Re: Updates to csound4) gogins@pipeline.com (12/02/04)

Previous Message: Re: number precision
Next Message: Re: pthreads (was Re: Updates to csound4)