summaryrefslogtreecommitdiff
path: root/db/db_deadlock
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2004-10-16 01:31:54 +0000
committerjbj <devnull@localhost>2004-10-16 01:31:54 +0000
commitd03f220fde879509cab2ac1c73b71b7efb52b737 (patch)
tree1e34bfadac0a6618d0e9a7933bad90063a785acf /db/db_deadlock
parent2dc699bfe049b9319ea3719f604d25940ff52004 (diff)
downloadlibrpm-tizen-d03f220fde879509cab2ac1c73b71b7efb52b737.tar.gz
librpm-tizen-d03f220fde879509cab2ac1c73b71b7efb52b737.tar.bz2
librpm-tizen-d03f220fde879509cab2ac1c73b71b7efb52b737.zip
... and in with the New ...
CVS patchset: 7471 CVS date: 2004/10/16 01:31:54
Diffstat (limited to 'db/db_deadlock')
-rw-r--r--db/db_deadlock/db_deadlock.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/db/db_deadlock/db_deadlock.c b/db/db_deadlock/db_deadlock.c
index 8a6f7b7c2..cc91db25d 100644
--- a/db/db_deadlock/db_deadlock.c
+++ b/db/db_deadlock/db_deadlock.c
@@ -1,17 +1,17 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996-2003
+ * Copyright (c) 1996-2004
* Sleepycat Software. All rights reserved.
+ *
+ * $Id: db_deadlock.c,v 11.45 2004/03/24 15:13:12 bostic Exp $
*/
#include "db_config.h"
#ifndef lint
static const char copyright[] =
- "Copyright (c) 1996-2003\nSleepycat Software Inc. All rights reserved.\n";
-static const char revid[] =
- "$Id: db_deadlock.c,v 11.41 2003/06/17 14:36:44 bostic Exp $";
+ "Copyright (c) 1996-2004\nSleepycat Software Inc. All rights reserved.\n";
#endif
#ifndef NO_SYSTEM_INCLUDES
@@ -80,6 +80,9 @@ main(argc, argv)
case 'o':
atype = DB_LOCK_OLDEST;
break;
+ case 'W':
+ atype = DB_LOCK_MAXWRITE;
+ break;
case 'w':
atype = DB_LOCK_MINWRITE;
break;
@@ -161,8 +164,8 @@ main(argc, argv)
}
/* An environment is required. */
- if ((ret = dbenv->open(dbenv, home,
- DB_JOINENV | DB_USE_ENVIRON, 0)) != 0) {
+ if ((ret =
+ dbenv->open(dbenv, home, DB_INIT_LOCK | DB_USE_ENVIRON, 0)) != 0) {
dbenv->err(dbenv, ret, "open");
goto shutdown;
}
@@ -181,7 +184,7 @@ main(argc, argv)
/* Make a pass every "secs" secs and "usecs" usecs. */
if (secs == 0 && usecs == 0)
break;
- (void)__os_sleep(dbenv, secs, usecs);
+ __os_sleep(dbenv, secs, usecs);
}
if (0) {
@@ -210,7 +213,7 @@ usage()
{
(void)fprintf(stderr, "%s\n\t%s\n",
"usage: db_deadlock [-Vv]",
- "[-a e | m | n | o | w | y] [-h home] [-L file] [-t sec.usec]");
+ "[-a e | m | n | o | W | w | y] [-h home] [-L file] [-t sec.usec]");
return (EXIT_FAILURE);
}