Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: ohp(at)pyrenet(dot)fr, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Date: 2003-09-03 23:59:17
Message-ID: 11160000.1062633557@lerlaptop.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Can you pass me what's in CVS (anon hasn't updated afaict).

And, what didn't you like about my version?

LER

--On Wednesday, September 03, 2003 18:35:44 -0400 Bruce Momjian
<pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:

> Larry Rosenman wrote:
>> >> > What does your OS want for the 3rd argument of pthread_create()? I
>> >> > thought a void pointer would be OK for everyone:
>> >> >
>> >> > pthread_create(&thread1, NULL, (void *) func_call_1, NULL);
>> >>
>> >> void *(*start_routine)(void*)
>> >>
>> >> Here is our man page:
>> >> http://lerami.lerctr.org:8458/en/man/html.3pthread/pthread_create.3pt
>> >> hre ad. html
>> >
>> > Yes, that's what I have too. What if you have the functions taking
>> > (void *) rather than void. Does that make the warnings disappear?
>>
>> $ r cc
>> cc -O -Kpthread test_thread.c -o test_thread -lsocket -lnsl
>> $ ./test_thread
>> Your functions are all thread-safe
>> $
>
> I have updated the code to tighten the cast:
>
> pthread_create(&thread1, NULL, (void * (*)(void *)) func_call_1,
> NULL); pthread_create(&thread2, NULL, (void * (*)(void *))
> func_call_2, NULL);
>
> The change is in CVS. Does that fix it?

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message scott.marlowe 2003-09-04 00:09:14 Re: Selecting random rows efficiently
Previous Message Bruce Momjian 2003-09-03 23:32:52 Re: Transaction status in default psql prompt?