mariadb/storage/bdb/cxx/cxx_lock.cpp

44 lines
942 B
C++
Raw Normal View History

2001-03-04 19:42:05 -05:00
/*-
* See the file LICENSE for redistribution information.
*
2005-07-20 15:48:22 -07:00
* Copyright (c) 1997-2004
2001-03-04 19:42:05 -05:00
* Sleepycat Software. All rights reserved.
2005-07-20 15:48:22 -07:00
*
* $Id: cxx_lock.cpp,v 11.19 2004/01/28 03:35:56 bostic Exp $
2001-03-04 19:42:05 -05:00
*/
#include "db_config.h"
#include <errno.h>
#include <string.h>
#include "db_cxx.h"
2002-10-30 15:57:05 +04:00
#include "dbinc/cxx_int.h"
2001-03-04 19:42:05 -05:00
////////////////////////////////////////////////////////////////////////
// //
// DbLock //
// //
////////////////////////////////////////////////////////////////////////
DbLock::DbLock(DB_LOCK value)
: lock_(value)
{
}
DbLock::DbLock()
{
memset(&lock_, 0, sizeof(DB_LOCK));
}
DbLock::DbLock(const DbLock &that)
: lock_(that.lock_)
{
}
DbLock &DbLock::operator = (const DbLock &that)
{
lock_ = that.lock_;
return (*this);
}