Skip to Content.
Sympa Menu

freetds - Re: [freetds] 0.64 status and coverage

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: liam AT inodes.org
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] 0.64 status and coverage
  • Date: Sat, 9 Jul 2005 02:25:51 +1000

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()?

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.




Archive powered by MHonArc 2.6.24.

Top of Page