linux-tasklist-lock-export-detection-20020829
authorDerrick Brashear <shadow@dementia.org>
Wed, 28 Aug 2002 05:30:06 +0000 (05:30 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 28 Aug 2002 05:30:06 +0000 (05:30 +0000)
if you don't have a versioned kernel, so sorry.

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

add macro i forgot to commit

acconfig.h
acinclude.m4
src/afs/afs_osi.c

index f33668b..37f9e37 100644 (file)
@@ -35,6 +35,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
 #undef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
 #undef STRUCT_INODE_HAS_I_DEVICES
+#undef EXPORTED_TASKLIST_LOCK
 #undef ssize_t
 
 #undef HAVE_STRUCT_BUF
index 7a3c03c..7b86cd4 100644 (file)
@@ -140,8 +140,12 @@ case $system in
                 LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
                 LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
                 LINUX_INODE_SETATTR_RETURN_TYPE
+                LINUX_EXPORTS_TASKLIST_LOCK
                 LINUX_NEED_RHCONFIG
                 LINUX_WHICH_MODULES
+                if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
+                 AC_DEFINE(EXPORTED_TASKLIST_LOCK)
+                fi
                 if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
                  AC_DEFINE(INODE_SETATTR_NOT_VOID)
                 fi
index 28714f7..468655f 100644 (file)
@@ -793,13 +793,17 @@ void afs_osi_TraverseProcTable()
 {   
     struct task_struct *p;
 
+#ifdef EXPORTED_TASKLIST_LOCK
     read_lock(&tasklist_lock);
+#endif
     for_each_task(p) if (p->pid) {
         if (p->state & TASK_ZOMBIE)
             continue;
        afs_GCPAGs_perproc_func(p);
     }
+#ifdef EXPORTED_TASKLIST_LOCK
     read_unlock(&tasklist_lock);
+#endif
 }   
 #endif