class BDB::Lock

Public Instance Methods

delete() click to toggle source
static VALUE
bdb_lock_put(VALUE obj)
{
    bdb_LOCK *lockst;
    bdb_ENV *envst;

    GetLock(obj, lockst, envst);
#if HAVE_ST_DB_ENV_LK_INFO
    if (!envst->envp->lk_info) {
        rb_raise(bdb_eLock, "lock region not open");
    }
    bdb_test_error(lock_put(envst->envp->lk_info, lockst->lock));
#elif HAVE_ST_DB_ENV_LOCK_PUT
    bdb_test_error(envst->envp->lock_put(envst->envp, lockst->lock));
#else
    bdb_test_error(lock_put(envst->envp, lockst->lock));
#endif
    return Qnil;
}
lock_put() click to toggle source
static VALUE
bdb_lock_put(VALUE obj)
{
    bdb_LOCK *lockst;
    bdb_ENV *envst;

    GetLock(obj, lockst, envst);
#if HAVE_ST_DB_ENV_LK_INFO
    if (!envst->envp->lk_info) {
        rb_raise(bdb_eLock, "lock region not open");
    }
    bdb_test_error(lock_put(envst->envp->lk_info, lockst->lock));
#elif HAVE_ST_DB_ENV_LOCK_PUT
    bdb_test_error(envst->envp->lock_put(envst->envp, lockst->lock));
#else
    bdb_test_error(lock_put(envst->envp, lockst->lock));
#endif
    return Qnil;
}
put() click to toggle source
static VALUE
bdb_lock_put(VALUE obj)
{
    bdb_LOCK *lockst;
    bdb_ENV *envst;

    GetLock(obj, lockst, envst);
#if HAVE_ST_DB_ENV_LK_INFO
    if (!envst->envp->lk_info) {
        rb_raise(bdb_eLock, "lock region not open");
    }
    bdb_test_error(lock_put(envst->envp->lk_info, lockst->lock));
#elif HAVE_ST_DB_ENV_LOCK_PUT
    bdb_test_error(envst->envp->lock_put(envst->envp, lockst->lock));
#else
    bdb_test_error(lock_put(envst->envp, lockst->lock));
#endif
    return Qnil;
}
release() click to toggle source
static VALUE
bdb_lock_put(VALUE obj)
{
    bdb_LOCK *lockst;
    bdb_ENV *envst;

    GetLock(obj, lockst, envst);
#if HAVE_ST_DB_ENV_LK_INFO
    if (!envst->envp->lk_info) {
        rb_raise(bdb_eLock, "lock region not open");
    }
    bdb_test_error(lock_put(envst->envp->lk_info, lockst->lock));
#elif HAVE_ST_DB_ENV_LOCK_PUT
    bdb_test_error(envst->envp->lock_put(envst->envp, lockst->lock));
#else
    bdb_test_error(lock_put(envst->envp, lockst->lock));
#endif
    return Qnil;
}