[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mboxfs ChangeLog Makefile debug.c netfs.c
From: |
Samuel Thibault |
Subject: |
mboxfs ChangeLog Makefile debug.c netfs.c |
Date: |
Sun, 10 Feb 2013 10:26:56 +0000 |
CVSROOT: /cvsroot/hurdextras
Module name: mboxfs
Changes by: Samuel Thibault <sthibaul> 13/02/10 10:26:56
Modified files:
. : ChangeLog Makefile debug.c netfs.c
Log message:
2012-02-10 Samuel Thibault <address@hidden>
Fix build against libpthread.
* Makefile: Link against libpthread instead of libthreads
* debug.c: Include pthread.h instead of cthreads.h. Turn
debug_lock
into a pthread_mutex_t instead of struct mutex.
(__debug_start): Use pthread_mutex_lock instead of mutex_lock.
(__debug_end): Use pthread_mutex_unlock instead of mutex_unlock.
* netfs.c (netfs_attempt_lookup, netfs_attempt_create_file): Use
pthread_mutex_unlock instead of mutex_unlock.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mboxfs/ChangeLog?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/mboxfs/Makefile?cvsroot=hurdextras&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/mboxfs/debug.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/mboxfs/netfs.c?cvsroot=hurdextras&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/hurdextras/mboxfs/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ChangeLog 12 Apr 2006 11:31:42 -0000 1.2
+++ ChangeLog 10 Feb 2013 10:26:55 -0000 1.3
@@ -1,3 +1,15 @@
+2012-02-10 Samuel Thibault <address@hidden>
+
+ Fix build against libpthread.
+
+ * Makefile: Link against libpthread instead of libthreads
+ * debug.c: Include pthread.h instead of cthreads.h. Turn debug_lock
+ into a pthread_mutex_t instead of struct mutex.
+ (__debug_start): Use pthread_mutex_lock instead of mutex_lock.
+ (__debug_end): Use pthread_mutex_unlock instead of mutex_unlock.
+ * netfs.c (netfs_attempt_lookup, netfs_attempt_create_file): Use
+ pthread_mutex_unlock instead of mutex_unlock.
+
Ludovic Courtès <address@hidden> made these changes:
2003-01-21
Index: Makefile
===================================================================
RCS file: /cvsroot/hurdextras/mboxfs/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Makefile 11 Apr 2006 13:12:45 -0000 1.1
+++ Makefile 10 Feb 2013 10:26:55 -0000 1.2
@@ -18,13 +18,13 @@
CC = gcc
CFLAGS = -D_GNU_SOURCE -Wall -DDEBUG -g -D_FILE_OFFSET_BITS=64
-#LDFLAGS = -ldiskfs -liohelp -lfshelp -lstore -lthreads -lports
-LDFLAGS = -lnetfs -lfshelp -liohelp -lthreads -lports \
+#LDFLAGS = -ldiskfs -liohelp -lfshelp -lstore -lpthread -lports
+LDFLAGS = -lnetfs -lfshelp -liohelp -lpthread -lports \
-lihash -lshouldbeinlibc
INSTALL = install
CTAGS = ctags
-#HURDLIBS = -lthreads -lports -ltrivfs -lfshelp -lpipe -lihash -lshouldbeinlibc
+#HURDLIBS = -lpthread -lports -ltrivfs -lfshelp -lpipe -lihash -lshouldbeinlibc
SRC = main.c netfs.c mboxfs.c fs.c samplefs.c samplefs.c debug.c
OBJ = $(SRC:%.c=%.o)
TRANS = mboxfs
Index: debug.c
===================================================================
RCS file: /cvsroot/hurdextras/mboxfs/debug.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- debug.c 12 Apr 2006 11:31:42 -0000 1.2
+++ debug.c 10 Feb 2013 10:26:55 -0000 1.3
@@ -26,10 +26,10 @@
#include <errno.h>
#include <error.h>
#include <string.h>
-#include <cthreads.h>
+#include <pthread.h>
-static struct mutex debug_lock;
+static pthread_mutex_t debug_lock = PTHREAD_MUTEX_INITIALIZER;
static char *debug_function = NULL;
static FILE *debug_file = NULL;
@@ -54,7 +54,7 @@
if (!debug_file)
return;
- mutex_lock (&debug_lock);
+ pthread_mutex_lock (&debug_lock);
debug_function = strdup (function);
}
@@ -84,5 +84,5 @@
free (debug_function);
debug_function = NULL;
fflush (debug_file);
- mutex_unlock (&debug_lock);
+ pthread_mutex_unlock (&debug_lock);
}
Index: netfs.c
===================================================================
RCS file: /cvsroot/hurdextras/mboxfs/netfs.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- netfs.c 12 Apr 2006 11:31:42 -0000 1.2
+++ netfs.c 10 Feb 2013 10:26:55 -0000 1.3
@@ -92,7 +92,7 @@
/* Create a reference to the node (and lock it); unlock DIR. */
if ((!err) && (*np != NULL))
netfs_nref (*np);
- mutex_unlock (&dir->lock);
+ pthread_mutex_unlock (&dir->lock);
return err;
}
@@ -513,7 +513,7 @@
char *name, mode_t mode, struct node **np)
{
*np = NULL;
- mutex_unlock (&dir->lock);
+ pthread_mutex_unlock (&dir->lock);
return EROFS;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- mboxfs ChangeLog Makefile debug.c netfs.c,
Samuel Thibault <=