Re: threads question

2005-03-16 Thread Michael C. Shultz
On Wednesday 16 March 2005 01:40 pm, you wrote: > >this works perfectly because I moved MGPMrUpgrade into > >the same .c file so it would be a static function: > > > >structProperty* property; > >pthread_t threads[NTHREADS]; > >pthread_create( &threads[0], NULL, zzMGPMrUpgrade, proper

Re: threads question

2005-03-16 Thread Peter Schuller
>this works perfectly because I moved MGPMrUpgrade into >the same .c file so it would be a static function: > > >

Re: threads question

2005-03-15 Thread Michael C. Shultz
On Tuesday 15 March 2005 12:02 pm, you wrote: > On Tue, 15 Mar 2005, Michael C. Shultz wrote: > [cut] > > > The answer is probably something like what you just said, scope > > being lost when making the call to a shared library. Why is it ok > > going to a static library but not a shared though? >

Re: threads question

2005-03-15 Thread Zera William Holladay
On Tue, 15 Mar 2005, Michael C. Shultz wrote: [cut] > The answer is probably something like what you just said, scope being > lost when making the call to a shared library. Why is it ok going to a > static library but not a shared though? There is probably a race condition, so your code will work

Re: threads question

2005-03-15 Thread Michael C. Shultz
On Tuesday 15 March 2005 10:19 am, Daniel Eischen wrote: > On Tue, 15 Mar 2005, Michael C. Shultz wrote: > > Daniel, sorry to bother you again but I ran into something that is > > either a bug or I am missing a vital piece of information > > somewhere. Here is the situation: > > > > this works perf

Re: threads question

2005-03-15 Thread Daniel Eischen
On Tue, 15 Mar 2005, Michael C. Shultz wrote: > > Daniel, sorry to bother you again but I ran into something that is > either a bug or I am missing a vital piece of information somewhere. > Here is the situation: > > this works perfectly because I moved MGPMrUpgrade into > the same .c file so it wo

Re: threads question

2005-03-15 Thread Michael C. Shultz
On Monday 14 March 2005 08:57 pm, Daniel Eischen wrote: > On Mon, 14 Mar 2005, Michael C. Shultz wrote: > > Hi, I've just reached a point in a program I'm writing where I'd > > like to do threading. > > > > When I try to start a thread like this: > > > > pthread_create(&thread, &attr, MGPMrUpgrade,

Re: threads question

2005-03-14 Thread Michael C. Shultz
On Monday 14 March 2005 08:57 pm, Daniel Eischen wrote: > On Mon, 14 Mar 2005, Michael C. Shultz wrote: > > Hi, I've just reached a point in a program I'm writing where I'd > > like to do threading. > > > > When I try to start a thread like this: > > > > pthread_create(&thread, &attr, MGPMrUpgrade,

Re: threads question

2005-03-14 Thread Daniel Eischen
On Mon, 14 Mar 2005, Michael C. Shultz wrote: > Hi, I've just reached a point in a program I'm writing where I'd like to > do threading. > > When I try to start a thread like this: > > pthread_create(&thread, &attr, MGPMrUpgrade, property );

threads question

2005-03-14 Thread Michael C. Shultz
Hi, I've just reached a point in a program I'm writing where I'd like to do threading. When I try to start a thread like this: pthread_create(&thread, &attr, MGPMrUpgrade, property ); where property is a structure of many variables it doesn't get passed to the function. If I do this: pthread_

POSIX threads question

1999-07-28 Thread Andrei Iltchenko
HI everybody. I'm having a problem writing a multi-threaded application. As I understand from the mans, calls to read and write are synchronized through file-locks. Having looked through the source for libc_r I noticed that calls to printf and fprintf are also synchronized. The question is - w

POSIX threads question

1999-07-28 Thread Andrei Iltchenko
HI everybody. I'm having a problem writing a multi-threaded application. As I understand from the mans, calls to read and write are synchronized through file-locks. Having looked through the source for libc_r I noticed that calls to printf and fprintf are also synchronized. The question is -

Re: POSIX threads question

1999-07-20 Thread Andy Doran
man 3 setvbuf - ad > Hi there, > > I have written a multithreaded application. > In which, I have redirected stdin, stdout and stderr to some files. > > Does anybody know why if I make a call to fprintf family of functions, I get > nothing in the output files, until I call fflush? To Unsubscri

Re: POSIX threads question

1999-07-20 Thread Nick Hibma
Files are block buffered not line buffered. Switch on hot piping (sorry, don't know how to), or wait until you have written 64kb, of flush more often. Nick On Tue, 20 Jul 1999, Andrei Iltchenko wrote: > Hi there, > > I have written a multithreaded application. > In which, I have redirecte

POSIX threads question

1999-07-20 Thread Andrei Iltchenko
Hi there, I have written a multithreaded application. In which, I have redirected stdin, stdout and stderr to some files. Does anybody know why if I make a call to fprintf family of functions, I get nothing in the output files, until I call fflush? Thank you in advance. ---

Re: POSIX threads question

1999-07-20 Thread Andy Doran
man 3 setvbuf - ad > Hi there, > > I have written a multithreaded application. > In which, I have redirected stdin, stdout and stderr to some files. > > Does anybody know why if I make a call to fprintf family of functions, I get nothing >in the output files, until I call fflush? To Unsubscri

Re: POSIX threads question

1999-07-20 Thread Nick Hibma
Files are block buffered not line buffered. Switch on hot piping (sorry, don't know how to), or wait until you have written 64kb, of flush more often. Nick On Tue, 20 Jul 1999, Andrei Iltchenko wrote: > Hi there, > > I have written a multithreaded application. > In which, I have redirect

POSIX threads question

1999-07-20 Thread Andrei Iltchenko
Hi there, I have written a multithreaded application. In which, I have redirected stdin, stdout and stderr to some files. Does anybody know why if I make a call to fprintf family of functions, I get nothing in the output files, until I call fflush? Thank you in advance. --