Module Name: src
Committed By: pooka
Date: Mon Dec 6 14:50:34 UTC 2010
Modified Files:
src/lib/libpuffs: Makefile dispatcher.c puffs.c puffs_priv.h
Log Message:
Remove PUFFS_WITH_THREADS ifdef garbage, just use libc weak symbols.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libpuffs/Makefile
cvs rdiff -u -r1.34 -r1.35 src/lib/libpuffs/dispatcher.c
cvs rdiff -u -r1.114 -r1.115 src/lib/libpuffs/puffs.c
cvs rdiff -u -r1.42 -r1.43 src/lib/libpuffs/puffs_priv.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libpuffs/Makefile
diff -u src/lib/libpuffs/Makefile:1.23 src/lib/libpuffs/Makefile:1.24
--- src/lib/libpuffs/Makefile:1.23 Sat Dec 5 12:13:08 2009
+++ src/lib/libpuffs/Makefile Mon Dec 6 14:50:34 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2009/12/05 12:13:08 pooka Exp $
+# $NetBSD: Makefile,v 1.24 2010/12/06 14:50:34 pooka Exp $
#
.include <bsd.own.mk>
@@ -9,11 +9,6 @@
LIB= puffs
-# don't enable this unless you know what you're doing (or if you don't
-# know what you're doing, it's still ok to enable this if you're me)
-#LIBDPLIBS+= pthread ${.CURDIR}/../libpthread
-#CPPFLAGS+= -DPUFFS_WITH_THREADS
-
SRCS= puffs.c callcontext.c creds.c dispatcher.c flush.c \
framebuf.c null.c opdump.c paths.c pnode.c requests.c \
subr.c suspend.c
Index: src/lib/libpuffs/dispatcher.c
diff -u src/lib/libpuffs/dispatcher.c:1.34 src/lib/libpuffs/dispatcher.c:1.35
--- src/lib/libpuffs/dispatcher.c:1.34 Fri May 21 10:50:52 2010
+++ src/lib/libpuffs/dispatcher.c Mon Dec 6 14:50:34 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: dispatcher.c,v 1.34 2010/05/21 10:50:52 pooka Exp $ */
+/* $NetBSD: dispatcher.c,v 1.35 2010/12/06 14:50:34 pooka Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Antti Kantee. All Rights Reserved.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: dispatcher.c,v 1.34 2010/05/21 10:50:52 pooka Exp $");
+__RCSID("$NetBSD: dispatcher.c,v 1.35 2010/12/06 14:50:34 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -39,9 +39,7 @@
#include <assert.h>
#include <errno.h>
-#ifdef PUFFS_WITH_THREADS
#include <pthread.h>
-#endif
#include <puffs.h>
#include <puffsdump.h>
#include <stdio.h>
@@ -50,16 +48,6 @@
#include "puffs_priv.h"
-#if 0 /* me not worka now */
-/*
- * Set the following to 1 to handle each request in a separate pthread.
- * This is not exported as it should not be used yet unless having a
- * very good knowledge of what you're signing up for (libpuffs is not
- * threadsafe).
- */
-int puffs_usethreads;
-#endif
-
static void dispatch(struct puffs_cc *);
/* for our eyes only */
Index: src/lib/libpuffs/puffs.c
diff -u src/lib/libpuffs/puffs.c:1.114 src/lib/libpuffs/puffs.c:1.115
--- src/lib/libpuffs/puffs.c:1.114 Tue Jul 6 21:58:18 2010
+++ src/lib/libpuffs/puffs.c Mon Dec 6 14:50:34 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs.c,v 1.114 2010/07/06 21:58:18 pooka Exp $ */
+/* $NetBSD: puffs.c,v 1.115 2010/12/06 14:50:34 pooka Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: puffs.c,v 1.114 2010/07/06 21:58:18 pooka Exp $");
+__RCSID("$NetBSD: puffs.c,v 1.115 2010/12/06 14:50:34 pooka Exp $");
#endif /* !lint */
#include <sys/param.h>
@@ -43,6 +43,7 @@
#include <fcntl.h>
#include <mntopts.h>
#include <paths.h>
+#include <pthread.h>
#include <puffs.h>
#include <stdio.h>
#include <stdlib.h>
@@ -59,10 +60,7 @@
MOPT_NULL,
};
-#ifdef PUFFS_WITH_THREADS
-#include <pthread.h>
pthread_mutex_t pu_lock = PTHREAD_MUTEX_INITIALIZER;
-#endif
#define FILLOP(lower, upper) \
do { \
Index: src/lib/libpuffs/puffs_priv.h
diff -u src/lib/libpuffs/puffs_priv.h:1.42 src/lib/libpuffs/puffs_priv.h:1.43
--- src/lib/libpuffs/puffs_priv.h:1.42 Tue Jan 12 18:42:39 2010
+++ src/lib/libpuffs/puffs_priv.h Mon Dec 6 14:50:34 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_priv.h,v 1.42 2010/01/12 18:42:39 pooka Exp $ */
+/* $NetBSD: puffs_priv.h,v 1.43 2010/12/06 14:50:34 pooka Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Antti Kantee. All Rights Reserved.
@@ -31,19 +31,13 @@
#include <sys/types.h>
#include <fs/puffs/puffs_msgif.h>
+#include <pthread.h>
#include <puffs.h>
#include <ucontext.h>
-#ifdef PUFFS_WITH_THREADS
-#include <pthread.h>
-
extern pthread_mutex_t pu_lock;
#define PU_LOCK() pthread_mutex_lock(&pu_lock)
#define PU_UNLOCK() pthread_mutex_unlock(&pu_lock)
-#else
-#define PU_LOCK()
-#define PU_UNLOCK()
-#endif
#define PU_CMAP(pu, c) (pu->pu_cmap ? pu->pu_cmap(pu,c) : (struct puffs_node*)c)