/ Check-in [11a37a74]
Login

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

Overview
Comment:Fully release exclusive locks in the Unlock primitive of Unix. Ticket #913. (CVS 1993)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:11a37a74b101b9e37dcf1c3e57e45fbcd39a1c21
User & Date: drh 2004-10-01 03:02:48
Context
2004-10-01
14:38
Additional code to test the SQLITE_FULL return when the disk is full. (CVS 1994) check-in: 44e56f0b user: drh tags: trunk
03:02
Fully release exclusive locks in the Unlock primitive of Unix. Ticket #913. (CVS 1993) check-in: 11a37a74 user: drh tags: trunk
02:00
Use type i64 instead of off_t for file offsets since off_t is giving portability problems. Ticket #924. (CVS 1992) check-in: 8972c004 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

1035
1036
1037
1038
1039
1040
1041





1042
1043
1044
1045
1046
1047
1048
    return SQLITE_OK;
  }
  sqlite3OsEnterMutex();
  pLock = id->pLock;
  assert( pLock->cnt!=0 );
  if( id->locktype>SHARED_LOCK ){
    assert( pLock->locktype==id->locktype );





    lock.l_type = F_UNLCK;
    lock.l_whence = SEEK_SET;
    lock.l_start = PENDING_BYTE;
    lock.l_len = 2L;  assert( PENDING_BYTE+1==RESERVED_BYTE );
    fcntl(id->h, F_SETLK, &lock);
    pLock->locktype = SHARED_LOCK;
  }







>
>
>
>
>







1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
    return SQLITE_OK;
  }
  sqlite3OsEnterMutex();
  pLock = id->pLock;
  assert( pLock->cnt!=0 );
  if( id->locktype>SHARED_LOCK ){
    assert( pLock->locktype==id->locktype );
    lock.l_type = F_RDLCK;
    lock.l_whence = SEEK_SET;
    lock.l_start = SHARED_FIRST;
    lock.l_len = SHARED_SIZE;
    fcntl(id->h, F_SETLK, &lock);
    lock.l_type = F_UNLCK;
    lock.l_whence = SEEK_SET;
    lock.l_start = PENDING_BYTE;
    lock.l_len = 2L;  assert( PENDING_BYTE+1==RESERVED_BYTE );
    fcntl(id->h, F_SETLK, &lock);
    pLock->locktype = SHARED_LOCK;
  }