Lines Matching refs:ltype

202 	u32 ltype;
256 static int tdb_lock(struct tdb_context *tdb, int list, int ltype);
257 static int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
259 static int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
401 static int _tdb_lock(struct tdb_context *tdb, int list, int ltype, int op)
405 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
407 ltype &= ~TDB_MARK_LOCK;
411 (ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
420 TDB_LOG((tdb, TDB_DEBUG_ERROR,"tdb_lock: invalid list %d for ltype=%d\n",
421 list, ltype));
458 tdb->methods->tdb_brlock(tdb,FREELIST_TOP+4*list, ltype, op,
467 tdb->lockrecs[tdb->num_lockrecs].ltype = ltype;
474 int tdb_lock(struct tdb_context *tdb, int list, int ltype)
477 ret = _tdb_lock(tdb, list, ltype, F_SETLKW);
480 "ltype=%d (%s)\n", list, ltype, strerror(errno)));
486 int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype)
488 return _tdb_lock(tdb, list, ltype, F_SETLK);
495 int tdb_unlock(struct tdb_context *tdb, int list, int ltype)
500 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
502 ltype &= ~TDB_MARK_LOCK;
506 (ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
582 int tdb_transaction_lock(struct tdb_context *tdb, int ltype)
587 if (tdb->methods->tdb_brlock(tdb, TRANSACTION_LOCK, ltype,
617 static int _tdb_lockall(struct tdb_context *tdb, int ltype, int op)
619 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
621 ltype &= ~TDB_MARK_LOCK;
627 if (tdb->global_lock.count && tdb->global_lock.ltype == ltype) {
643 tdb->methods->tdb_brlock(tdb, FREELIST_TOP, ltype, op,
652 tdb->global_lock.ltype = ltype;
660 static int _tdb_unlockall(struct tdb_context *tdb, int ltype)
662 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
664 ltype &= ~TDB_MARK_LOCK;
671 if (tdb->global_lock.ltype != ltype || tdb->global_lock.count == 0) {
688 tdb->global_lock.ltype = 0;