mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
linux-lock-tracking-20070208
FIXES 31818 avoid a potential leaked lock when closing firefox.
This commit is contained in:
parent
403b5086dd
commit
b0425c4e7f
@ -622,6 +622,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
|||||||
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM
|
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM
|
||||||
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM
|
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM
|
||||||
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE
|
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE
|
||||||
|
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TGID
|
||||||
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TODO
|
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TODO
|
||||||
LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
|
LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
|
||||||
LINUX_STATFS_TAKES_DENTRY
|
LINUX_STATFS_TAKES_DENTRY
|
||||||
@ -801,6 +802,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
|||||||
if test "x$ac_cv_linux_sched_struct_task_struct_has_exit_state" = "xyes"; then
|
if test "x$ac_cv_linux_sched_struct_task_struct_has_exit_state" = "xyes"; then
|
||||||
AC_DEFINE(STRUCT_TASK_STRUCT_HAS_EXIT_STATE, 1, [define if your struct task_struct has exit_state])
|
AC_DEFINE(STRUCT_TASK_STRUCT_HAS_EXIT_STATE, 1, [define if your struct task_struct has exit_state])
|
||||||
fi
|
fi
|
||||||
|
if test "x$ac_cv_linux_sched_struct_task_struct_has_tgid" = "xyes"; then
|
||||||
|
AC_DEFINE(STRUCT_TASK_STRUCT_HAS_TGID, 1, [define if your struct task_struct has tgid])
|
||||||
|
fi
|
||||||
if test "x$ac_cv_linux_sched_struct_task_struct_has_todo" = "xyes"; then
|
if test "x$ac_cv_linux_sched_struct_task_struct_has_todo" = "xyes"; then
|
||||||
AC_DEFINE(STRUCT_TASK_STRUCT_HAS_TODO, 1, [define if your struct task_struct has todo])
|
AC_DEFINE(STRUCT_TASK_STRUCT_HAS_TODO, 1, [define if your struct task_struct has todo])
|
||||||
fi
|
fi
|
||||||
|
@ -28,6 +28,16 @@
|
|||||||
|
|
||||||
#undef getuerror
|
#undef getuerror
|
||||||
|
|
||||||
|
#ifdef STRUCT_TASK_STRUCT_HAS_TGID
|
||||||
|
#define getpid() current->tgid
|
||||||
|
#ifdef STRUCT_TASK_STRUCT_HAS_REAL_PARENT
|
||||||
|
#define getppid() current->real_parent->tgid
|
||||||
|
#elif defined(STRUCT_TASK_STRUCT_HAS_PARENT)
|
||||||
|
#define getppid() current->parent->tgid
|
||||||
|
#else
|
||||||
|
#define getppid() current->p_opptr->tgid
|
||||||
|
#endif
|
||||||
|
#else /* !STRUCT_TASK_STRUCT_HAS_TGID */
|
||||||
#define getpid() current->pid
|
#define getpid() current->pid
|
||||||
#ifdef STRUCT_TASK_STRUCT_HAS_REAL_PARENT
|
#ifdef STRUCT_TASK_STRUCT_HAS_REAL_PARENT
|
||||||
#define getppid() current->real_parent->pid
|
#define getppid() current->real_parent->pid
|
||||||
@ -36,6 +46,7 @@
|
|||||||
#else
|
#else
|
||||||
#define getppid() current->p_opptr->pid
|
#define getppid() current->p_opptr->pid
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* STRUCT_TASK_STRUCT_HAS_TGID */
|
||||||
|
|
||||||
#ifdef RECALC_SIGPENDING_TAKES_VOID
|
#ifdef RECALC_SIGPENDING_TAKES_VOID
|
||||||
#define RECALC_SIGPENDING(X) recalc_sigpending()
|
#define RECALC_SIGPENDING(X) recalc_sigpending()
|
||||||
|
@ -212,8 +212,12 @@ typedef struct timeval osi_timeval_t;
|
|||||||
/* should use curthread, but 'ps' can't display it */
|
/* should use curthread, but 'ps' can't display it */
|
||||||
#define osi_ThreadUnique() curproc
|
#define osi_ThreadUnique() curproc
|
||||||
#else
|
#else
|
||||||
|
#ifdef AFS_LINUX_ENV
|
||||||
|
#define osi_ThreadUnique() (current->pid)
|
||||||
|
#else
|
||||||
#define osi_ThreadUnique() getpid()
|
#define osi_ThreadUnique() getpid()
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -333,6 +333,18 @@ printk("%d\n", _tsk.parent);],
|
|||||||
AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_parent)])
|
AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_parent)])
|
||||||
|
|
||||||
|
|
||||||
|
AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TGID], [
|
||||||
|
AC_MSG_CHECKING([for tgid in struct task_struct])
|
||||||
|
AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_tgid], [
|
||||||
|
AC_TRY_KBUILD(
|
||||||
|
[#include <linux/sched.h>],
|
||||||
|
[struct task_struct _tsk;
|
||||||
|
printk("%d\n", _tsk.tgid);],
|
||||||
|
ac_cv_linux_sched_struct_task_struct_has_tgid=yes,
|
||||||
|
ac_cv_linux_sched_struct_task_struct_has_tgid=no)])
|
||||||
|
AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_tgid)])
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT], [
|
AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT], [
|
||||||
AC_MSG_CHECKING([for real_parent in struct task_struct])
|
AC_MSG_CHECKING([for real_parent in struct task_struct])
|
||||||
AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_real_parent], [
|
AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_real_parent], [
|
||||||
|
Loading…
Reference in New Issue
Block a user