Lines Matching refs:pLock
32242 static int unixFileLock(unixFile *pFile, struct flock *pLock){
32263 rc = osFcntl(pFile->h, F_SETLK, pLock);
59858 BtLock *pLock; /* List of locks held on this shared-btree struct */
60595 BtLock *pLock;
60641 for(pLock=pBtree->pBt->pLock; pLock; pLock=pLock->pNext){
60642 if( pLock->pBtree==pBtree
60643 && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))
60644 && pLock->eLock>=eLockType
60723 for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
60768 BtLock *pLock = 0;
60787 for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
60789 pLock = pIter;
60797 if( !pLock ){
60798 pLock = (BtLock *)sqlite3MallocZero(sizeof(BtLock));
60799 if( !pLock ){
60802 pLock->iTable = iTable;
60803 pLock->pBtree = p;
60804 pLock->pNext = pBt->pLock;
60805 pBt->pLock = pLock;
60813 if( eLock>pLock->eLock ){
60814 pLock->eLock = eLock;
60832 BtLock **ppIter = &pBt->pLock;
60839 BtLock *pLock = *ppIter;
60840 assert( (pBt->btsFlags & BTS_EXCLUSIVE)==0 || pBt->pWriter==pLock->pBtree );
60841 assert( pLock->pBtree->inTrans>=pLock->eLock );
60842 if( pLock->pBtree==p ){
60843 *ppIter = pLock->pNext;
60844 assert( pLock->iTable!=1 || pLock==&p->lock );
60845 if( pLock->iTable!=1 ){
60846 sqlite3_free(pLock);
60849 ppIter = &pLock->pNext;
60877 BtLock *pLock;
60880 for(pLock=pBt->pLock; pLock; pLock=pLock->pNext){
60881 assert( pLock->eLock==READ_LOCK || pLock->pBtree==p );
60882 pLock->eLock = READ_LOCK;
63745 for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
63802 p->lock.pNext = pBt->pLock;
63803 pBt->pLock = &p->lock;