public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: lhh@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, master, updated. gfs-kernel_0_1_22-85-g8b298b8 Date: Thu, 20 Mar 2008 13:54:00 -0000 [thread overview] Message-ID: <20080320135449.30926.qmail@sourceware.org> (raw) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=8b298b82eb1fcb9b6f3c7100159862dd1fd9c899 The branch, master has been updated via 8b298b82eb1fcb9b6f3c7100159862dd1fd9c899 (commit) from c2b3b2b7be437bc4476326dcfe58e9f2b6c55d48 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8b298b82eb1fcb9b6f3c7100159862dd1fd9c899 Author: Lon Hohberger <lhh@redhat.com> Date: Thu Mar 20 09:54:33 2008 -0400 [rgmanager] Remove unused lockspace.c file ----------------------------------------------------------------------- Summary of changes: rgmanager/src/clulib/lockspace.c | 93 -------------------------------------- 1 files changed, 0 insertions(+), 93 deletions(-) delete mode 100644 rgmanager/src/clulib/lockspace.c diff --git a/rgmanager/src/clulib/lockspace.c b/rgmanager/src/clulib/lockspace.c deleted file mode 100644 index 591c732..0000000 --- a/rgmanager/src/clulib/lockspace.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - Copyright Red Hat, Inc. 2006 - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 675 Mass Ave, Cambridge, - MA 02139, USA. -*/ -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <stdio.h> -#include <assert.h> -#include <sys/ioctl.h> -#include <sys/select.h> -#include <lock.h> -#include <pthread.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <clulog.h> -#include <signal.h> -#include <gettid.h> -#include <libdlm.h> -#include <errno.h> - - -#define RGMGR_LOCKSPACE "rgmanager" - -static pthread_mutex_t _default_lock = PTHREAD_MUTEX_INITIALIZER; -static char _init = 0; -static pid_t _holder_id = 0; -static dlm_lshandle_t _default_ls; - - -static int -_init_lockspace(void) -{ - _default_ls = clu_acquire_lockspace(RGMGR_LOCKSPACE); - if (!_default_ls) { - return -1; - } - _init = 1; - return 0; -} - - -dlm_lshandle_t -ls_hold_default(void) -{ - pthread_mutex_lock(&_default_lock); - if (!_init && (_init_lockspace() < 0)) { - pthread_mutex_unlock(&_default_lock); - errno = ENOLCK; - return NULL; - } - - if (_holder_id != 0) { - pthread_mutex_unlock(&_default_lock); - errno = EAGAIN; - return NULL; - } - - _holder_id = gettid(); - pthread_mutex_unlock(&_default_lock); - return _default_ls; -} - - -void -ls_release_default(void) -{ - pthread_mutex_lock(&_default_lock); - if (_holder_id != gettid()) { - clulog(LOG_ERR, "Attempt to release lockspace when I am not" - "the holder!\n"); - raise(SIGSTOP); - } - - _holder_id = 0; - pthread_mutex_unlock(&_default_lock); -} - - hooks/post-receive -- Cluster Project
reply other threads:[~2008-03-20 13:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080320135449.30926.qmail@sourceware.org \ --to=lhh@sourceware.org \ --cc=cluster-cvs@sources.redhat.com \ --cc=cluster-devel@redhat.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).