[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
procfs ChangeLog src/Makefile.am src/procfs.c s...
From: |
Samuel Thibault |
Subject: |
procfs ChangeLog src/Makefile.am src/procfs.c s... |
Date: |
Sun, 10 Feb 2013 11:10:50 +0000 |
CVSROOT: /cvsroot/hurdextras
Module name: procfs
Changes by: Samuel Thibault <sthibaul> 13/02/10 11:10:50
Modified files:
. : ChangeLog
src : Makefile.am procfs.c procfs_dir_lookup.c
procfs_dir_readdir.c procfs_generic.c
procfs_getroot.c procfs_io_read.c
procfs_io_seek.c procfs_linux24.c
procfs_linux24_pid.c procfs_node.c
procfs_node.h procfs_openmodes.c
procfs_printf.c procfs_select.c procfs_stat.c
Log message:
2013-02-10 Samuel Thibault <address@hidden>
Fix build against libpthread.
* src/Makefile.am (procfs_LDADD): Add -liohelp.
* src/procfs.c: Include pthread.h instead of cthreads.h and
rwlock.h.
Use pthread functions instead of cthreads functions.
* src/procfs_dir_lookup.c: Likewise.
* src/procfs_dir_readdir.c: Likewise.
* src/procfs_generic.c: Likewise.
* src/procfs_getroot.c: Likewise.
* src/procfs_io_read.c: Likewise.
* src/procfs_io_seek.c: Likewise.
* src/procfs_linux24.c: Likewise.
* src/procfs_linux24_pid.c: Likewise.
* src/procfs_node.c: Likewise.
* src/procfs_node.h: Likewise.
* src/procfs_openmodes.c: Likewise.
* src/procfs_printf.c: Likewise.
* src/procfs_select.c: Likewise.
* src/procfs_stat.c: Likewise.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/procfs/ChangeLog?cvsroot=hurdextras&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/procfs/src/Makefile.am?cvsroot=hurdextras&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs.c?cvsroot=hurdextras&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_dir_lookup.c?cvsroot=hurdextras&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_dir_readdir.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_generic.c?cvsroot=hurdextras&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_getroot.c?cvsroot=hurdextras&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_io_read.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_io_seek.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_linux24.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_linux24_pid.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_node.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_node.h?cvsroot=hurdextras&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_openmodes.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_printf.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_select.c?cvsroot=hurdextras&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/procfs/src/procfs_stat.c?cvsroot=hurdextras&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/hurdextras/procfs/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ChangeLog 6 Apr 2007 13:38:35 -0000 1.3
+++ ChangeLog 10 Feb 2013 11:10:49 -0000 1.4
@@ -1,3 +1,25 @@
+2013-02-10 Samuel Thibault <address@hidden>
+
+ Fix build against libpthread.
+
+ * src/Makefile.am (procfs_LDADD): Add -liohelp.
+ * src/procfs.c: Include pthread.h instead of cthreads.h and rwlock.h.
+ Use pthread functions instead of cthreads functions.
+ * src/procfs_dir_lookup.c: Likewise.
+ * src/procfs_dir_readdir.c: Likewise.
+ * src/procfs_generic.c: Likewise.
+ * src/procfs_getroot.c: Likewise.
+ * src/procfs_io_read.c: Likewise.
+ * src/procfs_io_seek.c: Likewise.
+ * src/procfs_linux24.c: Likewise.
+ * src/procfs_linux24_pid.c: Likewise.
+ * src/procfs_node.c: Likewise.
+ * src/procfs_node.h: Likewise.
+ * src/procfs_openmodes.c: Likewise.
+ * src/procfs_printf.c: Likewise.
+ * src/procfs_select.c: Likewise.
+ * src/procfs_stat.c: Likewise.
+
2007-04-06 Thomas Schwinge <address@hidden>
* src/procfs_linux24.c (procfs_loadavg_read): Add a line separator to
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/Makefile.am 6 Apr 2007 13:38:35 -0000 1.3
+++ src/Makefile.am 10 Feb 2013 11:10:49 -0000 1.4
@@ -4,7 +4,7 @@
AM_CFLAGS = -D_FILE_OFFSET_BITS=64
-procfs_LDADD=-lhurdbugaddr -ltrivfs -lfshelp -lps -lthreads -lports -lihash
-lshouldbeinlibc
+procfs_LDADD=-lhurdbugaddr -ltrivfs -lfshelp -lps -lpthread -lports -lihash
-lshouldbeinlibc -liohelp
procfs_SOURCES=procfs.c \
procfs_dir_lookup.c \
procfs_dir_readdir.c \
Index: src/procfs.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- src/procfs.c 19 Apr 2002 01:31:10 -0000 1.1.1.1
+++ src/procfs.c 10 Feb 2013 11:10:49 -0000 1.2
@@ -27,8 +27,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
@@ -39,7 +38,7 @@
procfs_node_t *root;
/* This lock protects access to contents and contents_len. */
-static struct rwlock contents_lock;
+static pthread_rwlock_t contents_lock;
/* Trivfs hooks. */
int trivfs_fstype = FSTYPE_MISC;
@@ -104,12 +103,12 @@
char *new = strdup (arg);
if (new == NULL)
return ENOMEM;
- rwlock_writer_lock (&contents_lock);
+ pthread_rwlock_wrlock (&contents_lock);
if (contents != hello)
free (contents);
contents = new;
contents_len = strlen (new);
- rwlock_writer_unlock (&contents_lock);
+ pthread_rwlock_unlock (&contents_lock);
break;
}
*/
@@ -129,9 +128,9 @@
/* char *opt;
- rwlock_reader_lock (&contents_lock);
+ pthread_rwlock_rdlock (&contents_lock);
err = asprintf (&opt, "--contents=%s", contents) < 0 ? ENOMEM : 0;
- rwlock_reader_unlock (&contents_lock);
+ pthread_rwlock_unlock (&contents_lock);
if (!err)
{
@@ -161,7 +160,7 @@
/* Initialize the lock that will protect CONTENTS and CONTENTS_LEN.
We must do this before argp_parse, because parse_opt (above) will
use the lock. */
- rwlock_init (&contents_lock);
+ pthread_rwlock_init (&contents_lock, NULL);
/* We use the same argp for options available at startup
as for options we'll accept in an fsys_set_options RPC. */
Index: src/procfs_dir_lookup.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_dir_lookup.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- src/procfs_dir_lookup.c 19 Apr 2002 01:31:12 -0000 1.1.1.1
+++ src/procfs_dir_lookup.c 10 Feb 2013 11:10:49 -0000 1.2
@@ -28,8 +28,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
@@ -70,7 +69,7 @@
child_node_peropen->offs = 0;
child_node_peropen->pid = 0;
child_node_peropen->node = root;
- mutex_init (&child_node_peropen->lock);
+ pthread_mutex_init (&child_node_peropen->lock, NULL);
peropen->hook = child_node_peropen;
return 0;
}
@@ -112,7 +111,7 @@
procfs_close_hook (struct trivfs_peropen *peropen)
{
procfs_node_peropen_t *op = peropen->hook;
- mutex_clear (&op->lock);
+ pthread_mutex_destroy (&op->lock);
free (op);
}
Index: src/procfs_dir_readdir.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_dir_readdir.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_dir_readdir.c 1 Dec 2002 16:15:40 -0000 1.2
+++ src/procfs_dir_readdir.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -27,8 +27,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
Index: src/procfs_generic.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_generic.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/procfs_generic.c 6 Apr 2007 13:38:35 -0000 1.3
+++ src/procfs_generic.c 10 Feb 2013 11:10:50 -0000 1.4
@@ -12,8 +12,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
@@ -92,7 +91,7 @@
(*child_node_peropen)->offs = 0;
(*child_node_peropen)->pid = 0;
(*child_node_peropen)->node = tmp_node;
- mutex_init (&(*child_node_peropen)->lock);
+ pthread_mutex_init (&(*child_node_peropen)->lock, NULL);
return 0;
}
Index: src/procfs_getroot.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_getroot.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- src/procfs_getroot.c 19 Apr 2002 01:31:10 -0000 1.1.1.1
+++ src/procfs_getroot.c 10 Feb 2013 11:10:50 -0000 1.2
@@ -27,8 +27,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
Index: src/procfs_io_read.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_io_read.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_io_read.c 1 Dec 2002 16:15:40 -0000 1.2
+++ src/procfs_io_read.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -27,8 +27,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
@@ -74,7 +73,7 @@
return EISDIR;
}
- mutex_lock (&op->lock);
+ pthread_mutex_lock (&op->lock);
read_data.cred = cred;
read_data.reply = reply;
@@ -92,7 +91,7 @@
op->offs = read_data.offs;
*data_len = read_data.so_far;
- mutex_unlock (&op->lock);
+ pthread_mutex_unlock (&op->lock);
return err;
}
Index: src/procfs_io_seek.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_io_seek.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_io_seek.c 1 Dec 2002 16:15:40 -0000 1.2
+++ src/procfs_io_seek.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -27,8 +27,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
@@ -50,7 +49,7 @@
op = cred->po->hook;
- mutex_lock (&op->lock);
+ pthread_mutex_lock (&op->lock);
switch (whence)
{
@@ -66,7 +65,7 @@
if (! err)
*new_offs = op->offs;
- mutex_unlock (&op->lock);
+ pthread_mutex_unlock (&op->lock);
return err;
}
Index: src/procfs_linux24.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_linux24.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_linux24.c 6 Apr 2007 13:38:35 -0000 1.2
+++ src/procfs_linux24.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -20,8 +20,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include <sys/time.h>
@@ -526,7 +525,7 @@
if (err)
return err;
- mutex_init (&(*child_node_peropen)->lock);
+ pthread_mutex_init (&(*child_node_peropen)->lock, NULL);
return 0;
}
if (rc == 1)
Index: src/procfs_linux24_pid.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_linux24_pid.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_linux24_pid.c 6 Apr 2007 13:38:35 -0000 1.2
+++ src/procfs_linux24_pid.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -12,8 +12,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include <ps.h>
Index: src/procfs_node.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_node.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_node.c 6 Apr 2007 13:38:35 -0000 1.2
+++ src/procfs_node.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -12,8 +12,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
Index: src/procfs_node.h
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_node.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/procfs_node.h 6 Apr 2007 13:38:35 -0000 1.3
+++ src/procfs_node.h 10 Feb 2013 11:10:50 -0000 1.4
@@ -83,7 +83,7 @@
/* A hook for us to keep track of the file descriptor state. */
struct procfs_node_peropen_st {
- struct mutex lock;
+ pthread_mutex_t lock;
loff_t offs;
pid_t pid; /* Valid if this is a pid node */
struct proc_stat *ps;
Index: src/procfs_openmodes.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_openmodes.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_openmodes.c 1 Dec 2002 16:15:40 -0000 1.2
+++ src/procfs_openmodes.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -27,8 +27,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
Index: src/procfs_printf.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_printf.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_printf.c 6 Apr 2007 13:38:35 -0000 1.2
+++ src/procfs_printf.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -12,8 +12,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
Index: src/procfs_select.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_select.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_select.c 1 Dec 2002 16:15:40 -0000 1.2
+++ src/procfs_select.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -27,8 +27,8 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
+#include <assert.h>
#include <dirent.h>
#include "list.h"
Index: src/procfs_stat.c
===================================================================
RCS file: /cvsroot/hurdextras/procfs/src/procfs_stat.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/procfs_stat.c 1 Dec 2002 16:15:40 -0000 1.2
+++ src/procfs_stat.c 10 Feb 2013 11:10:50 -0000 1.3
@@ -27,8 +27,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <cthreads.h>
-#include <rwlock.h>
+#include <pthread.h>
#include <dirent.h>
#include "list.h"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- procfs ChangeLog src/Makefile.am src/procfs.c s...,
Samuel Thibault <=