cxx_lock.cpp
Upload User: romrleung
Upload Date: 2022-05-23
Package Size: 18897k
Code Size: 1k
Category:

MySQL

Development Platform:

Visual C++

  1. /*-
  2.  * See the file LICENSE for redistribution information.
  3.  *
  4.  * Copyright (c) 1997-2002
  5.  * Sleepycat Software.  All rights reserved.
  6.  */
  7. #include "db_config.h"
  8. #ifndef lint
  9. static const char revid[] = "$Id: cxx_lock.cpp,v 11.17 2002/03/27 04:31:16 bostic Exp $";
  10. #endif /* not lint */
  11. #include <errno.h>
  12. #include <string.h>
  13. #include "db_cxx.h"
  14. #include "dbinc/cxx_int.h"
  15. ////////////////////////////////////////////////////////////////////////
  16. //                                                                    //
  17. //                            DbLock                                  //
  18. //                                                                    //
  19. ////////////////////////////////////////////////////////////////////////
  20. DbLock::DbLock(DB_LOCK value)
  21. : lock_(value)
  22. {
  23. }
  24. DbLock::DbLock()
  25. {
  26. memset(&lock_, 0, sizeof(DB_LOCK));
  27. }
  28. DbLock::DbLock(const DbLock &that)
  29. : lock_(that.lock_)
  30. {
  31. }
  32. DbLock &DbLock::operator = (const DbLock &that)
  33. {
  34. lock_ = that.lock_;
  35. return (*this);
  36. }