SOURCES: db-rpm-robustness.patch (NEW) - patch from rpm

arekm arekm at pld-linux.org
Thu Jun 28 19:16:34 CEST 2007


Author: arekm                        Date: Thu Jun 28 17:16:34 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- patch from rpm

---- Files affected:
SOURCES:
   db-rpm-robustness.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/db-rpm-robustness.patch
diff -u /dev/null SOURCES/db-rpm-robustness.patch:1.1
--- /dev/null	Thu Jun 28 19:16:34 2007
+++ SOURCES/db-rpm-robustness.patch	Thu Jun 28 19:16:29 2007
@@ -0,0 +1,47 @@
+; http://rpm5.org/cvs/chngview?cn=6633
+Index: db/mutex/mut_pthread.c
+RCS File: /v/rpm/cvs/db/mutex/mut_pthread.c,v
+rcsdiff -q -kk '-r1.3.2.3' '-r1.3.2.4' -u '/v/rpm/cvs/db/mutex/mut_pthread.c,v' 2>/dev/null
+--- db/mutex/mut_pthread.c	2006/10/01 22:31:46	1.3.2.3
++++ db/mutex/mut_pthread.c	2006/12/02 16:57:37	1.3.2.4
+@@ -71,7 +71,13 @@
+ 	pthread_mutexattr_t mutexattr, *mutexattrp = NULL;
+ 
+ 	if (!LF_ISSET(DB_MUTEX_PROCESS_ONLY)) {
++#if defined(EOWNERDEAD)
+ 		RET_SET((pthread_mutexattr_init(&mutexattr)), ret);
++		if (ret == 0) {
++			RET_SET((pthread_mutexattr_setrobust_np(
++			    &mutexattr, PTHREAD_MUTEX_ROBUST_NP)), ret);
++		}
++#endif
+ #ifndef HAVE_MUTEX_THREAD_ONLY
+ 		if (ret == 0)
+ 			RET_SET((pthread_mutexattr_setpshared(
+@@ -196,6 +202,12 @@
+ #endif
+ 
+ 	RET_SET((pthread_mutex_lock(&mutexp->mutex)), ret);
++#if defined(EOWNERDEAD)
++	if (ret == EOWNERDEAD) {
++		RET_SET((pthread_mutex_consistent_np(&mutexp->mutex)), ret);
++		ret = 0;
++	}
++#endif
+ 	if (ret != 0)
+ 		goto err;
+ 
+@@ -306,6 +318,12 @@
+ #endif
+ 	if (F_ISSET(mutexp, DB_MUTEX_SELF_BLOCK)) {
+ 		RET_SET((pthread_mutex_lock(&mutexp->mutex)), ret);
++#if defined(EOWNERDEAD)
++		if (ret == EOWNERDEAD) {
++			RET_SET((pthread_mutex_consistent_np(&mutexp->mutex)), ret);
++			ret = 0;
++		}
++#endif
+ 		if (ret != 0)
+ 			goto err;
+ 
+
================================================================


More information about the pld-cvs-commit mailing list