• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/mutex/

Lines Matching refs:env

21 __mutex_alloc(env, alloc_id, flags, indxp)
22 ENV *env;
39 (F_ISSET(env->dbenv, DB_ENV_NOLOCKING) ||
40 (!F_ISSET(env, ENV_THREAD) &&
42 F_ISSET(env, ENV_PRIVATE)))))
46 if (F_ISSET(env, ENV_PRIVATE))
53 if (MUTEX_ON(env))
54 return (__mutex_alloc_int(env, 1, alloc_id, flags, indxp));
64 if (env->mutex_iq == NULL) {
65 env->mutex_iq_max = 50;
66 if ((ret = __os_calloc(env, env->mutex_iq_max,
67 sizeof(env->mutex_iq[0]), &env->mutex_iq)) != 0)
69 } else if (env->mutex_iq_next == env->mutex_iq_max - 1) {
70 env->mutex_iq_max *= 2;
71 if ((ret = __os_realloc(env,
72 env->mutex_iq_max * sizeof(env->mutex_iq[0]),
73 &env->mutex_iq)) != 0)
76 *indxp = env->mutex_iq_next + 1; /* Correct for MUTEX_INVALID. */
77 env->mutex_iq[env->mutex_iq_next].alloc_id = alloc_id;
78 env->mutex_iq[env->mutex_iq_next].flags = flags;
79 ++env->mutex_iq_next;
92 __mutex_alloc_int(env, locksys, alloc_id, flags, indxp)
93 ENV *env;
104 dbenv = env->dbenv;
105 mtxmgr = env->mutex_handle;
115 MUTEX_SYSTEM_LOCK(env);
118 __db_errx(env,
121 MUTEX_SYSTEM_UNLOCK(env);
127 DB_ASSERT(env,
137 MUTEX_SYSTEM_UNLOCK(env);
158 if ((ret = __mutex_init(env, *indxp, flags)) != 0)
159 (void)__mutex_free_int(env, locksys, indxp);
171 __mutex_free(env, indxp)
172 ENV *env;
188 if (!MUTEX_ON(env) || *indxp == MUTEX_INVALID)
191 return (__mutex_free_int(env, 1, indxp));
201 __mutex_free_int(env, locksys, indxp)
202 ENV *env;
215 mtxmgr = env->mutex_handle;
219 DB_ASSERT(env, F_ISSET(mutexp, DB_MUTEX_ALLOCATED));
222 ret = __mutex_destroy(env, mutex);
225 MUTEX_SYSTEM_LOCK(env);
234 MUTEX_SYSTEM_UNLOCK(env);