hurdextras-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

jfs ChangeLog Makefile.am configure.in dir.c jfs.c


From: Samuel Thibault
Subject: jfs ChangeLog Makefile.am configure.in dir.c jfs.c
Date: Sun, 10 Feb 2013 10:19:59 +0000

CVSROOT:        /cvsroot/hurdextras
Module name:    jfs
Changes by:     Samuel Thibault <sthibaul>      13/02/10 10:19:59

Modified files:
        .              : ChangeLog Makefile.am configure.in dir.c jfs.c 

Log message:
        2013-02-10  Samuel Thibault  <address@hidden>
        
                Fix build against libpthread.
        
                * configure.in: Look for pthread_exit in libpthread instead of
                cthread_init in libthreads.
                * Makefile.am: Link against libpthread instead of libthreads.
                * dir.c: Use pthread_mutex_lock/unlock instead of 
mutex_lock/unlock.
                (read_node) Use posix-compliant st_atime struct members.
                * jfs.c: Include pthread.h instead of cthreads.h.
                (main): Use pthread_exit instead of cthread_exit.
                (jfs_info, jfs_panic): Use pthread_mutex_lock/unlock instead of
                mutex_lock/unlock.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/jfs/ChangeLog?cvsroot=hurdextras&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/jfs/Makefile.am?cvsroot=hurdextras&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/jfs/configure.in?cvsroot=hurdextras&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/jfs/dir.c?cvsroot=hurdextras&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/jfs/jfs.c?cvsroot=hurdextras&r1=1.1&r2=1.2

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/hurdextras/jfs/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ChangeLog   12 Apr 2006 15:29:42 -0000      1.1
+++ ChangeLog   10 Feb 2013 10:19:59 -0000      1.2
@@ -1,3 +1,18 @@
+2013-02-10  Samuel Thibault  <address@hidden>
+
+       Fix build against libpthread.
+
+       * configure.in: Look for pthread_exit in libpthread instead of
+       cthread_init in libthreads.
+       * Makefile.am: Link against libpthread instead of libthreads.
+       * dir.c: Use pthread_mutex_lock/unlock instead of mutex_lock/unlock.
+       (read_node) Use posix-compliant st_atime struct members.
+       * jfs.c: Include pthread.h instead of cthreads.h.
+       (main): Use pthread_exit instead of cthread_exit.
+       (jfs_info, jfs_panic): Use pthread_mutex_lock/unlock instead of
+       mutex_lock/unlock.
+
+
 2006-04-12  Manuel Menal  <address@hidden>
 
        * Makefile.am: Add -D_FILE_OFFSET_BITS=64.

Index: Makefile.am
===================================================================
RCS file: /cvsroot/hurdextras/jfs/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Makefile.am 12 Apr 2006 15:29:42 -0000      1.1
+++ Makefile.am 10 Feb 2013 10:19:59 -0000      1.2
@@ -1,7 +1,7 @@
 
 bin_PROGRAMS = jfs
 
-jfs_LDADD = -lthreads -ldiskfs -lpager -lstore -liohelp -lfshelp \
+jfs_LDADD = -lpthread -ldiskfs -lpager -lstore -liohelp -lfshelp \
 -lports -lihash -lshouldbeinlibc
 
 CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64

Index: configure.in
===================================================================
RCS file: /cvsroot/hurdextras/jfs/configure.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- configure.in        12 Apr 2006 15:29:42 -0000      1.1
+++ configure.in        10 Feb 2013 10:19:59 -0000      1.2
@@ -18,7 +18,7 @@
 dnl AC_CHECK_LIB(ports, ports_create_bucket)
 dnl AC_CHECK_LIB(shouldbeinlibc, device_map)
 dnl AC_CHECK_LIB(store, store_free)
-dnl AC_CHECK_LIB(threads, cthread_init)
+dnl AC_CHECK_LIB(pthread, pthread_exit)
 
 dnl Checks for header files.
 AC_HEADER_STDC

Index: dir.c
===================================================================
RCS file: /cvsroot/hurdextras/jfs/dir.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- dir.c       12 Apr 2006 15:29:42 -0000      1.1
+++ dir.c       10 Feb 2013 10:19:59 -0000      1.2
@@ -182,9 +182,9 @@
          /* We don't have to do the normal rigamarole, because
             we are permanently read-only, so things are necessarily
             quiescent.  Just be careful to honor the locking order. */
-         mutex_unlock (&dp->lock);
+         pthread_mutex_unlock (&dp->lock);
          diskfs_cached_lookup (gotinum,npp);
-         mutex_lock (&dp->lock);
+         pthread_mutex_lock (&dp->lock);
        }
     }
   else if (namelen == 1 && name[0] == '.')
@@ -254,13 +254,13 @@
   else
     jfs_info("not link \n");
  
-  st->st_atime = di.di_atime.tv_sec;
-  st->st_mtime = di.di_mtime.tv_sec;
-  st->st_ctime = di.di_ctime.tv_sec;
-
-  st->st_atime_usec = di.di_atime.tv_nsec / 1000;
-  st->st_mtime_usec = di.di_mtime.tv_nsec / 1000;
-  st->st_ctime_usec = di.di_ctime.tv_nsec / 1000;
+  st->st_atim.tv_sec = di.di_atime.tv_sec;
+  st->st_mtim.tv_sec = di.di_mtime.tv_sec;
+  st->st_ctim.tv_sec = di.di_ctime.tv_sec;
+
+  st->st_atim.tv_nsec = di.di_atime.tv_nsec;
+  st->st_mtim.tv_nsec = di.di_mtime.tv_nsec;
+  st->st_ctim.tv_nsec = di.di_ctime.tv_nsec;
 
   st->st_blksize = vm_page_size * 2;
   st->st_blocks = di.di_size / 512 +1;
@@ -312,7 +312,7 @@
        *npp = np;
         np->references++;
        spin_unlock (&diskfs_node_refcnt_lock);
-       mutex_lock (&np->lock); 
+       pthread_mutex_lock (&np->lock); 
        jfs_info("%s found in cache \n",__FUNCTION__);
        return 0;   
       }
@@ -339,7 +339,7 @@
     }
 
   /* if(inum!=2)  */
-  /*   mutex_lock (&np->lock); */
+  /*   pthread_mutex_lock (&np->lock); */
 
   np->cache_id = inum;
 
@@ -353,7 +353,7 @@
   spin_unlock (&diskfs_node_refcnt_lock);
 
   /* Get the contents of NP off disk.  */
-  /* mutex_lock (&np->lock); */
+  /* pthread_mutex_lock (&np->lock); */
   err = read_node (np);
   np->references++;
   *npp = np;

Index: jfs.c
===================================================================
RCS file: /cvsroot/hurdextras/jfs/jfs.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- jfs.c       12 Apr 2006 15:29:42 -0000      1.1
+++ jfs.c       10 Feb 2013 10:19:59 -0000      1.2
@@ -35,7 +35,7 @@
 
 #include <argp.h>
 #include <argz.h>
-#include <cthreads.h>
+#include <pthread.h>
 #include <hurd/diskfs.h>
 #include <hurd/store.h>
 
@@ -137,7 +137,7 @@
   diskfs_cached_lookup (2, &diskfs_root_node);
 
   diskfs_startup_diskfs (bootstrap, 0);
-  cthread_exit (0);
+  pthread_exit (0);
   return 0;
 }
 
@@ -153,9 +153,9 @@
   FILE *fp = fopen (LOGFILE, "a+");
 
   va_start (arg, fmt);
-  mutex_lock (&printf_lock);
+  pthread_mutex_lock (&printf_lock);
   done = vfprintf (fp, fmt, arg);
-  mutex_unlock (&printf_lock);
+  pthread_mutex_unlock (&printf_lock);
   va_end (arg);
 
   fclose (fp);
@@ -172,7 +172,7 @@
 {
   va_list args;
 
-  mutex_lock(&printf_lock);
+  pthread_mutex_lock(&printf_lock);
 
   va_start (args, fmt);
   vsprintf (error_buf, fmt, args);
@@ -181,7 +181,7 @@
   fprintf(stderr, "jfs: %s: panic:  %s\n",
          diskfs_disk_name, error_buf);
 
-  mutex_unlock(&printf_lock);
+  pthread_mutex_unlock(&printf_lock);
 
   exit (1);
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]