Licensing Information
Open Source Used In Cisco FXOS 1.1(3) 879
}
/* unlock the database. */
int tdb_writeunlock(TDB_CONTEXT *tdb)
{
if (tdb == NULL) {
#ifdef TDB_DEBUG
printf("tdb_writeunlock() called with null context\n");
#endif
return -1;
}
return tdb_unlock(tdb, -1);
}
/* lock one hash chain. This is meant to be used to reduce locking
contention - it cannot guarantee how many records will be locked */
int tdb_lockchain(TDB_CONTEXT *tdb, TDB_DATA key)
{
if (tdb == NULL) {
#ifdef TDB_DEBUG
printf("tdb_lockchain() called with null context\n");
#endif
return -1;
}
return tdb_lock(tdb, BUCKET(tdb_hash(&key)));
}
/* unlock one hash chain */
int tdb_unlockchain(TDB_CONTEXT *tdb, TDB_DATA key)
{
if (tdb == NULL) {
#ifdef TDB_DEBUG
printf("tdb_unlockchain() called with null context\n");
#endif
return -1;
}
return tdb_unlock(tdb, BUCKET(tdb_hash(&key)));
}
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.0.4, Jul 24th, 1996.
Copyright (C) 1995-1996 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied