-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/12/2010 03:23 PM, Pavel Ivanov wrote: > pthreadMutexNotheld() checks that mutex is not held by current thread > - if mutex is held by another thread it will return true.
Ooops, I got this completely wrong! > Although I see that it can return false in this case if another thread > is inside pthreadMutexEnter and optimizer has switched order of > assignment of the values to owner and nRef inside pthreadMutexEnter > (it is allowed to do so because variables are not volatile). Is it > possible to see exact disassembly of the executable in question? This is a report from another user, who does frequent this mailing list as well so hopefully he can provide that. I believe the code was compiled on a standard 32 bit i386 Ubuntu Lucid system. The compilation line would be like below (from a 64 bit Lucid system). From a 64 bit disassembly I see the setting of owner and nRef happening concurrently (nRef is fetched, owner updated, nRef updated and saved). gcc -pthread -fno-strict-aliasing -g -fwrapv -O2 -Wall -Wstrict-prototypes - -fPIC -g -DSQLITE_DEBUG=1 This user reported this being hard to repeat and that there is lots of threading involved. The owner and nRef fields are only used when SQLITE_DEBUG is true. http://www.sqlite.org/src/info/51914f6acd Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvrPN4ACgkQmOOfHg372QScxQCfcbit3kH4c+TeIxTwrZnBp27n aiQAnRDcwkgce/piMMIDAT28Hrhl/3kc =CBGk -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users