[Pvfs2-cvs] commit by nlmills in pvfs2/test/common/gen-locks: module.mk.in test-null-lock.c test-pthread-lock.c

CVS commit program cvs at parl.clemson.edu
Fri Jun 18 20:02:39 EDT 2010


Update of /projects/cvsroot/pvfs2/test/common/gen-locks
In directory parlweb1:/tmp/cvs-serv17259/test/common/gen-locks

Modified Files:
      Tag: cu-security-branch
	module.mk.in 
Removed Files:
      Tag: cu-security-branch
	test-null-lock.c test-pthread-lock.c 
Log Message:
initial merge with Orange-Branch. much will be broken


Index: module.mk.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/common/gen-locks/module.mk.in,v
diff -p -u -r1.6.20.2 -r1.6.20.3
--- module.mk.in	21 May 2010 17:34:27 -0000	1.6.20.2
+++ module.mk.in	19 Jun 2010 00:02:39 -0000	1.6.20.3
@@ -1,19 +1,2 @@
 DIR := common/gen-locks
 
-TESTSRC += \
-	$(DIR)/test-pthread-lock.c \
-	$(DIR)/test-null-lock.c
-
-# for the null locking example, we want to set the right defines at
-# compile time
-$(DIR)/test-null-lock.o: $(DIR)/test-null-lock.c
-	$(Q) "  CC		$@"
-	$(E)$(CC) $< $(CFLAGS) -D__GEN_NULL_LOCKING__ -c -o $@
-
-# for the pthread locking example, we use default defines (and thus
-# stick with the implicit compile rule), but we need to add an extra lib
-# when linking
-$(DIR)/test-pthread-lock: $(DIR)/test-pthread-lock.o
-	$(Q) "  LD		$@"
-	$(E)$(LD) $< $(LDFLAGS) $(LIBS) -lpthread -o $@
-

--- test-null-lock.c	2010-06-18 20:02:39.000000000 -0400
+++ /dev/null	2004-06-24 14:04:38.000000000 -0400
@@ -1,61 +0,0 @@
-/*
- * copyright (c) 2001 Clemson University, all rights reserved.
- *
- * Written by Phil Carns.
- *
- * 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 of the License,
- * or 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; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Contact:  Phil Carns  pcarns at parl.clemson.edu
- */
-
-#include<gen-locks.h>
-#include<stdio.h>
-
-/* gen_locks can be declared and initialized at the same time */
-static gen_mutex_t test_mutex = GEN_MUTEX_INITIALIZER;
-static int foo_function(void);
-
-
-int main(int argc, char **argv)	{
-
-	gen_mutex_lock(&test_mutex);
-		/* Access critical region here */
-		printf("Critical region 1.\n");
-	gen_mutex_unlock(&test_mutex);
-
-	foo_function();
-
-	return(0);
-}
-
-
-/* this function shows how mutex's can be dynamically allocated and
- * destroyed */
-static int foo_function(void){
-
-	gen_mutex_t foo_mutex;
-
-	gen_mutex_init(&foo_mutex);
-
-	gen_mutex_lock(&foo_mutex);
-		/* Access critical region */
-		printf("Critical region 2.\n");
-	gen_mutex_unlock(&foo_mutex);
-
-	gen_mutex_destroy(&foo_mutex);
-
-	return(0);
-}

--- test-pthread-lock.c	2010-06-18 20:02:39.000000000 -0400
+++ /dev/null	2004-06-24 14:04:38.000000000 -0400
@@ -1,61 +0,0 @@
-/*
- * copyright (c) 2001 Clemson University, all rights reserved.
- *
- * Written by Phil Carns.
- *
- * 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 of the License,
- * or 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; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Contact:  Phil Carns  pcarns at parl.clemson.edu
- */
-
-#include<gen-locks.h>
-#include<stdio.h>
-
-/* gen_locks can be declared and initialized at the same time */
-static gen_mutex_t test_mutex = GEN_MUTEX_INITIALIZER;
-static int foo_function(void);
-
-
-int main(int argc, char **argv)	{
-
-	gen_mutex_lock(&test_mutex);
-		/* Access critical region here */
-		printf("Critical region 1.\n");
-	gen_mutex_unlock(&test_mutex);
-
-	foo_function();
-
-	return(0);
-}
-
-
-/* this function shows how mutex's can be dynamically allocated and
- * destroyed */
-static int foo_function(void){
-
-	gen_mutex_t foo_mutex;
-
-	gen_mutex_init(&foo_mutex);
-
-	gen_mutex_lock(&foo_mutex);
-		/* Access critical region */
-		printf("Critical region 2.\n");
-	gen_mutex_unlock(&foo_mutex);
-
-	gen_mutex_destroy(&foo_mutex);
-
-	return(0);
-}



More information about the Pvfs2-cvs mailing list