From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager/src/daemons groups.c
Date: 21 Feb 2007 20:46:50 -0000 [thread overview]
Message-ID: <20070221204650.19951.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: lhh at sourceware.org 2007-02-21 20:46:50
Modified files:
rgmanager/src/daemons: groups.c
Log message:
Resolves: 222445
* Only allow one status check thread to spawn at a time
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/groups.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.25.2.1&r2=1.25.2.2
--- cluster/rgmanager/src/daemons/groups.c 2006/12/18 21:48:48 1.25.2.1
+++ cluster/rgmanager/src/daemons/groups.c 2007/02/21 20:46:49 1.25.2.2
@@ -44,6 +44,7 @@
static fod_t *_domains = NULL;
pthread_mutex_t config_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t status_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_rwlock_t resource_lock = PTHREAD_RWLOCK_INITIALIZER;
void res_build_name(char *, size_t, resource_t *);
@@ -991,6 +992,10 @@
resource_node_t *curr;
rg_state_t svcblk;
char rg[64];
+
+ /* Only one status thread at a time, please! */
+ if (pthread_mutex_trylock(&status_mutex) != 0)
+ return NULL;
pthread_rwlock_rdlock(&resource_lock);
list_do(&_tree, curr) {
@@ -1013,6 +1018,7 @@
} while (!list_done(&_tree, curr));
pthread_rwlock_unlock(&resource_lock);
+ pthread_mutex_unlock(&status_mutex);
return NULL;
}
next reply other threads:[~2007-02-21 20:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 20:46 lhh [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-02-01 15:28 [Cluster-devel] cluster/rgmanager/src/daemons groups.c lhh
2006-11-27 22:21 lhh
2006-06-12 18:40 lhh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070221204650.19951.qmail@sourceware.org \
--to=lhh@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.