LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM
LINUX_WHICH_MODULES
if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then
AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported])
if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then
AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIG, 1, [define if your struct task_struct has sig])
fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_rlim" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_RLIM, 1, [define if your struct task_struct has rlim])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_signal_rlim" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM, 1, [define if your struct task_struct has signal->rlim])
+ fi
:
fi
esac
#define SIG_UNLOCK(X) spin_unlock_irq(&X->sig->siglock)
#endif
+#if defined (STRUCT_TASK_STRUCT_HAS_RLIM)
+#define TASK_STRUCT_RLIM rlim
+#elif defined (STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM)
+#define TASK_STRUCT_RLIM signal->rlim
+#else
+#error Not sure what to do about rlim (should be in the Linux task struct somewhere....)
+#endif
+
#define afs_hz HZ
#include "h/sched.h"
} else
filp->f_pos = offset;
- savelim = current->rlim[RLIMIT_FSIZE].rlim_cur;
- current->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
+ savelim = current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur;
+ current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
/* Read/Write the data. */
TO_USER_SPACE();
code = asize;
TO_KERNEL_SPACE();
- current->rlim[RLIMIT_FSIZE].rlim_cur = savelim;
+ current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur = savelim;
if (code >= 0) {
*resid = asize - code;
int count;
unsigned long savelim;
- savelim = current->rlim[RLIMIT_FSIZE].rlim_cur;
- current->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
+ savelim = current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur;
+ current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
if (uiop->uio_seg == AFS_UIOSYS)
TO_USER_SPACE();
if (uiop->uio_seg == AFS_UIOSYS)
TO_KERNEL_SPACE();
- current->rlim[RLIMIT_FSIZE].rlim_cur = savelim;
+ current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur = savelim;
return code;
}
ac_cv_linux_sched_struct_task_struct_has_sighand=no)])
AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sighand)
CPPFLAGS="$save_CPPFLAGS"])
+
+AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM], [
+AC_MSG_CHECKING(for rlim in struct task_struct)
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_rlim,
+[
+AC_TRY_COMPILE(
+[#include <linux/sched.h>],
+[struct task_struct _tsk;
+printf("%d\n", _tsk.rlim);],
+ac_cv_linux_sched_struct_task_struct_has_rlim=yes,
+ac_cv_linux_sched_struct_task_struct_has_rlim=no)])
+AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_rlim)
+CPPFLAGS="$save_CPPFLAGS"])
+
+AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM], [
+AC_MSG_CHECKING(for signal->rlim in struct task_struct)
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_signal_rlim,
+[
+AC_TRY_COMPILE(
+[#include <linux/sched.h>],
+[struct task_struct _tsk;
+printf("%d\n", _tsk.signal->rlim);],
+ac_cv_linux_sched_struct_task_struct_has_signal_rlim=yes,
+ac_cv_linux_sched_struct_task_struct_has_signal_rlim=no)])
+AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_signal_rlim)
+CPPFLAGS="$save_CPPFLAGS"])