From: drh Date: Tue, 1 Dec 2009 14:31:18 +0000 (+0000) Subject: Reorder function declarations in mutex_os2.c. This is a blind change - we X-Git-Tag: version-3.7.2~775 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfa35664a57019ba559fc4448aa1a6cf6fe511f9;p=thirdparty%2Fsqlite.git Reorder function declarations in mutex_os2.c. This is a blind change - we have no capability of testing on OS/2. Ticket [97214a34d814] FossilOrigin-Name: c40e4ef094bb9d58f14354602785ccc228f8bc2a --- diff --git a/manifest b/manifest index da4d16e088..504a936d22 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -C Changes\sto\sthe\sTCL\sinterface\sheader\sto\sallow\sit\sto\sbe\scompiled\sindependently\nfrom\sthe\samalgamation. -D 2009-12-01T13:57:49 +C Reorder\sfunction\sdeclarations\sin\smutex_os2.c.\s\sThis\sis\sa\sblind\schange\s-\swe\nhave\sno\scapability\sof\stesting\son\sOS/2.\s\s\nTicket\s[97214a34d814] +D 2009-12-01T14:31:18 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in c5827ead754ab32b9585487177c93bb00b9497b3 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -143,7 +143,7 @@ F src/memjournal.c 5bfc2f33c914946e2f77ed3f882aff14dfc9355d F src/mutex.c 581a272e09098040ca3ef543cb5f3d643eff7d50 F src/mutex.h 6fde601e55fa6c3fae768783c439797ab84c87c6 F src/mutex_noop.c 5f58eaa31f2d742cb8957a747f7887ae98f16053 -F src/mutex_os2.c 63b3ea41209297c2fb8950ba465e66a5922e2926 +F src/mutex_os2.c 20477db50cf3817c2f1cd3eb61e5c177e50231db F src/mutex_unix.c 04a25238abce7e3d06b358dcf706e26624270809 F src/mutex_w32.c 9ec75bcef0ca722821be7968c320fd725abfb984 F src/notify.c f799bbda67ab6619b36b0a24153b49518874a203 @@ -778,14 +778,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 4924fbb244bd1b7103e29e045812cb1c4d2d81c8 -R 42f8b015db748b4bafad9aa12897ca9c +P 58113932d93926b4aa037a7487105a55f883cd0a +R 58cd33bd0bb94a22fdbc237eacf229c6 U drh -Z d0f2f45728e358cd980fa1a3c65f892f +Z ac2766d6a74824f241c62a9d81b5f1a1 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFLFSDhoxKgR168RlERAi8IAJ0UgMelzc/hXfHu2CiGtY3Mjg/bZgCbBthD -PKncL0iuiXbbriX6qEmRkxQ= -=6DZZ +iD8DBQFLFSi6oxKgR168RlERAgiFAJ9wkFV7p4Q3F1E0PwZ7Jj6UDZugsACeOWwQ +XFTghNztA5qx3UCLz2oGre0= +=RI1L -----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index b2bf036c37..27ed61b829 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -58113932d93926b4aa037a7487105a55f883cd0a \ No newline at end of file +c40e4ef094bb9d58f14354602785ccc228f8bc2a \ No newline at end of file diff --git a/src/mutex_os2.c b/src/mutex_os2.c index 9faf4e1909..f16dc218d9 100644 --- a/src/mutex_os2.c +++ b/src/mutex_os2.c @@ -158,6 +158,39 @@ static void os2MutexFree(sqlite3_mutex *p){ sqlite3_free( p ); } +#ifdef SQLITE_DEBUG +/* +** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are +** intended for use inside assert() statements. +*/ +static int os2MutexHeld(sqlite3_mutex *p){ + TID tid; + PID pid; + ULONG ulCount; + PTIB ptib; + if( p!=0 ) { + DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount); + } else { + DosGetInfoBlocks(&ptib, NULL); + tid = ptib->tib_ptib2->tib2_ultid; + } + return p==0 || (p->nRef!=0 && p->owner==tid); +} +static int os2MutexNotheld(sqlite3_mutex *p){ + TID tid; + PID pid; + ULONG ulCount; + PTIB ptib; + if( p!= 0 ) { + DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount); + } else { + DosGetInfoBlocks(&ptib, NULL); + tid = ptib->tib_ptib2->tib2_ultid; + } + return p==0 || p->nRef==0 || p->owner!=tid; +} +#endif + /* ** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt ** to enter a mutex. If another thread is already within the mutex, @@ -218,39 +251,6 @@ static void os2MutexLeave(sqlite3_mutex *p){ DosReleaseMutexSem(p->mutex); } -#ifdef SQLITE_DEBUG -/* -** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are -** intended for use inside assert() statements. -*/ -static int os2MutexHeld(sqlite3_mutex *p){ - TID tid; - PID pid; - ULONG ulCount; - PTIB ptib; - if( p!=0 ) { - DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount); - } else { - DosGetInfoBlocks(&ptib, NULL); - tid = ptib->tib_ptib2->tib2_ultid; - } - return p==0 || (p->nRef!=0 && p->owner==tid); -} -static int os2MutexNotheld(sqlite3_mutex *p){ - TID tid; - PID pid; - ULONG ulCount; - PTIB ptib; - if( p!= 0 ) { - DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount); - } else { - DosGetInfoBlocks(&ptib, NULL); - tid = ptib->tib_ptib2->tib2_ultid; - } - return p==0 || p->nRef==0 || p->owner!=tid; -} -#endif - sqlite3_mutex_methods *sqlite3DefaultMutex(void){ static sqlite3_mutex_methods sMutex = { os2MutexInit,