Lines Matching refs:global_lock
153 #define GLOBAL_LOCK 0
231 struct tdb_lock_type global_lock;
412 if (tdb->global_lock.count &&
413 (ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
417 if (tdb->global_lock.count) {
507 if (tdb->global_lock.count &&
508 (ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
512 if (tdb->global_lock.count) {
586 if (tdb->have_transaction_lock || tdb->global_lock.count) {
629 if (tdb->global_lock.count && tdb->global_lock.ltype == ltype) {
630 tdb->global_lock.count++;
634 if (tdb->global_lock.count) {
653 tdb->global_lock.count = 1;
654 tdb->global_lock.ltype = ltype;
673 if (tdb->global_lock.ltype != ltype || tdb->global_lock.count == 0) {
677 if (tdb->global_lock.count > 1) {
678 tdb->global_lock.count--;
689 tdb->global_lock.count = 0;
690 tdb->global_lock.ltype = 0;
1600 if (tdb->num_locks != 0 || tdb->global_lock.count) {
1714 if (tdb->global_lock.count != 0) {
1716 tdb->global_lock.count = 0;
2014 if (tdb->num_locks || tdb->global_lock.count) {
2031 if (tdb_brlock(tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW, 0, 1) == -1) {
2042 tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
2055 tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
2077 tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
2105 tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);
3880 if (tdb->methods->tdb_brlock(tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW, 0, 1) == -1) {
3975 if (tdb->methods->tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1) == -1)
4073 if (tdb->num_locks != 0 || tdb->global_lock.count) {