/ Check-in [6767b62a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove the noop-mutex implementations of mutex_held() and mutex_notheld() since they are both unreachable.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6767b62a9a063582889f5ceb42f95eab24c697da
User & Date: drh 2010-05-06 11:56:52
Context
2010-05-06
12:15
Add tests for some lock-contention cases. check-in: f0fcb9c9 user: dan tags: trunk
11:56
Remove the noop-mutex implementations of mutex_held() and mutex_notheld() since they are both unreachable. check-in: 6767b62a user: drh tags: trunk
11:55
Add two text files containing pager design notes to the doc/ subfolder. check-in: ed817fc8 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/mutex_noop.c.

    30     30   
    31     31   #ifndef SQLITE_DEBUG
    32     32   /*
    33     33   ** Stub routines for all mutex methods.
    34     34   **
    35     35   ** This routines provide no mutual exclusion or error checking.
    36     36   */
    37         -static int noopMutexHeld(sqlite3_mutex *p){ return 1; }
    38         -static int noopMutexNotheld(sqlite3_mutex *p){ return 1; }
    39     37   static int noopMutexInit(void){ return SQLITE_OK; }
    40     38   static int noopMutexEnd(void){ return SQLITE_OK; }
    41     39   static sqlite3_mutex *noopMutexAlloc(int id){ return (sqlite3_mutex*)8; }
    42     40   static void noopMutexFree(sqlite3_mutex *p){ return; }
    43     41   static void noopMutexEnter(sqlite3_mutex *p){ return; }
    44     42   static int noopMutexTry(sqlite3_mutex *p){ return SQLITE_OK; }
    45     43   static void noopMutexLeave(sqlite3_mutex *p){ return; }
................................................................................
    50     48       noopMutexEnd,
    51     49       noopMutexAlloc,
    52     50       noopMutexFree,
    53     51       noopMutexEnter,
    54     52       noopMutexTry,
    55     53       noopMutexLeave,
    56     54   
    57         -    noopMutexHeld,
    58         -    noopMutexNotheld
           55  +    0,
           56  +    0,
    59     57     };
    60     58   
    61     59     return &sMutex;
    62     60   }
    63     61   #endif /* !SQLITE_DEBUG */
    64     62   
    65     63   #ifdef SQLITE_DEBUG