]>
Commit | Line | Data |
---|---|---|
8fc54d1e AM |
1 | ; http://rpm5.org/cvs/chngview?cn=6633 |
2 | Index: db/mutex/mut_pthread.c | |
3 | RCS File: /v/rpm/cvs/db/mutex/mut_pthread.c,v | |
4 | rcsdiff -q -kk '-r1.3.2.3' '-r1.3.2.4' -u '/v/rpm/cvs/db/mutex/mut_pthread.c,v' 2>/dev/null | |
5 | --- db/mutex/mut_pthread.c 2006/10/01 22:31:46 1.3.2.3 | |
6 | +++ db/mutex/mut_pthread.c 2006/12/02 16:57:37 1.3.2.4 | |
7 | @@ -71,7 +71,13 @@ | |
8 | pthread_mutexattr_t mutexattr, *mutexattrp = NULL; | |
9 | ||
10 | if (!LF_ISSET(DB_MUTEX_PROCESS_ONLY)) { | |
11 | +#if defined(EOWNERDEAD) | |
12 | RET_SET((pthread_mutexattr_init(&mutexattr)), ret); | |
13 | + if (ret == 0) { | |
14 | + RET_SET((pthread_mutexattr_setrobust_np( | |
15 | + &mutexattr, PTHREAD_MUTEX_ROBUST_NP)), ret); | |
16 | + } | |
17 | +#endif | |
18 | #ifndef HAVE_MUTEX_THREAD_ONLY | |
19 | if (ret == 0) | |
20 | RET_SET((pthread_mutexattr_setpshared( | |
21 | @@ -196,6 +202,12 @@ | |
22 | #endif | |
23 | ||
24 | RET_SET((pthread_mutex_lock(&mutexp->mutex)), ret); | |
25 | +#if defined(EOWNERDEAD) | |
26 | + if (ret == EOWNERDEAD) { | |
27 | + RET_SET((pthread_mutex_consistent_np(&mutexp->mutex)), ret); | |
28 | + ret = 0; | |
29 | + } | |
30 | +#endif | |
31 | if (ret != 0) | |
32 | goto err; | |
33 | ||
34 | @@ -306,6 +318,12 @@ | |
35 | #endif | |
36 | if (F_ISSET(mutexp, DB_MUTEX_SELF_BLOCK)) { | |
37 | RET_SET((pthread_mutex_lock(&mutexp->mutex)), ret); | |
38 | +#if defined(EOWNERDEAD) | |
39 | + if (ret == EOWNERDEAD) { | |
40 | + RET_SET((pthread_mutex_consistent_np(&mutexp->mutex)), ret); | |
41 | + ret = 0; | |
42 | + } | |
43 | +#endif | |
44 | if (ret != 0) | |
45 | goto err; | |
46 | ||
47 |