SQLite

Check-in [3144a16f91]
Login

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

Overview
Comment:Update return value checking to conform to the beginthreadex() specs.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | threads
Files: files | file ages | folders
SHA1: 3144a16f91364b455e54e6030714e1c12ab0bdb7
User & Date: mistachkin 2014-07-29 19:00:43.216
Context
2014-07-29
21:44
Disable an assert that is sometimes generated spuriously. (check-in: bd9ee0ea69 user: mistachkin tags: threads)
19:00
Update return value checking to conform to the beginthreadex() specs. (check-in: 3144a16f91 user: mistachkin tags: threads)
18:53
Add a couple more assert statements. (check-in: 4e816db235 user: mistachkin tags: threads)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/threads.c.
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
  if( p==0 ) return SQLITE_NOMEM;
  if( sqlite3GlobalConfig.bCoreMutex==0 ){
    memset(p, 0, sizeof(*p));
  }else{
    p->xTask = xTask;
    p->pIn = pIn;
    p->tid = _beginthreadex(0, 0, sqlite3ThreadProc, p, 0, &p->id);
    if( p->tid==(uintptr_t)-1 ){
      memset(p, 0, sizeof(*p));
    }
  }
  if( p->xTask==0 ){
    p->id = GetCurrentThreadId();
    p->pResult = xTask(pIn);
  }







|







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
  if( p==0 ) return SQLITE_NOMEM;
  if( sqlite3GlobalConfig.bCoreMutex==0 ){
    memset(p, 0, sizeof(*p));
  }else{
    p->xTask = xTask;
    p->pIn = pIn;
    p->tid = _beginthreadex(0, 0, sqlite3ThreadProc, p, 0, &p->id);
    if( p->tid==0 ){
      memset(p, 0, sizeof(*p));
    }
  }
  if( p->xTask==0 ){
    p->id = GetCurrentThreadId();
    p->pResult = xTask(pIn);
  }