freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] 0.64 status and coverage
- Date: Fri, 08 Jul 2005 18:43:02 +0200
Il giorno sab, 09/07/2005 alle 02.25 +1000, liam AT inodes.org ha scritto:
> On Thu, Jul 07, 2005 at 01:28:37PM +0200, ZIGLIO, Frediano, VF-IT wrote:
>
> > At http://freetds.sourceforge.net/out/test/out.html you can find tests
>
> Looking at freetds/freetds/src/dblib/unittests/thread.c shouldn't
> dbinit() and dbexit() be called only once at the appropriate spot
> in main() and not in test()?
>
Yes, it should however thinking at complicate dependency in libraries is
a good thing if you can nest dbinit/dbexit.
> Also, do not declare result and thread_count as volatile!
>
> You should wait for the threads to exit with pthread_join() or
> alternatively wrap the thread_count 'for' loop in a mutex. You may
> not see the updates from other threads otherwise!
>
> Also, as a matter of 'style' I don't think TDS_MUTEX_* functions
> should be used in applications. The caller has pthread support by
> virtue of their use and as such, we should not encourage people to
> use our internal opaque functions in client applications.
>
> Should I send a patch for the thread.c dblib unit test?
>
> Cheers.
Feel free to send a patch. I agree to remove volatile and use
syncronization function. unittests are mainly internal unit tests even
if you want to look at them as example applications. Main purpose is to
test our library so I don't care that much if they use dirty ways.
tdsthread.h is a private header (not installed, only used by our
sources) so I don't want to suggest it's use. It do not even work
without our config.h (not installed too).
bye
freddy77
-
[freetds] 0.64 status and coverage,
ZIGLIO, Frediano, VF-IT, 07/07/2005
- Re: [freetds] 0.64 status and coverage, Kall, Bruce A., 07/07/2005
-
Re: [freetds] 0.64 status and coverage,
liam, 07/08/2005
-
Re: [freetds] 0.64 status and coverage,
Frediano Ziglio, 07/08/2005
- Re: [freetds] 0.64 status and coverage, liam, 07/25/2005
-
Re: [freetds] 0.64 status and coverage,
Frediano Ziglio, 07/08/2005
- <Possible follow-up(s)>
- Re: [freetds] 0.64 status and coverage, Lowden, James K, 07/07/2005
- Re: [freetds] 0.64 status and coverage, Lowden, James K, 07/07/2005
- Re: [freetds] 0.64 status and coverage, ZIGLIO, Frediano, VF-IT, 07/07/2005
-
Re: [freetds] 0.64 status and coverage,
Lowden, James K, 07/08/2005
-
Re: [freetds] 0.64 status and coverage,
Frediano Ziglio, 07/14/2005
- Re: [freetds] 0.64 status and coverage, Peter Deacon, 07/14/2005
-
Re: [freetds] 0.64 status and coverage,
Frediano Ziglio, 07/14/2005
- Re: [freetds] 0.64 status and coverage, ZIGLIO, Frediano, VF-IT, 07/15/2005
-
Re: [freetds] 0.64 status and coverage,
ZIGLIO, Frediano, VF-IT, 07/25/2005
- Re: [freetds] 0.64 status and coverage, liam, 07/25/2005
Archive powered by MHonArc 2.6.24.