X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Flinux%2Facct.h;h=882dc7248766367bb451e283e6cbb6b2936cbc3c;hb=9a1607071c293e48b08bd703733480b1d55c7b93;hp=e86bae7324d2f7eac86826f6686c69f66b532977;hpb=f6ec29a42d7ac3b309a9cef179b686d23986ab98;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/linux/acct.h b/include/linux/acct.h index e86bae7..882dc72 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h @@ -119,21 +119,21 @@ struct acct_v3 #ifdef CONFIG_BSD_PROCESS_ACCT struct vfsmount; struct super_block; +struct pacct_struct; +struct pid_namespace; extern void acct_auto_close_mnt(struct vfsmount *m); extern void acct_auto_close(struct super_block *sb); extern void acct_init_pacct(struct pacct_struct *pacct); extern void acct_collect(long exitcode, int group_dead); extern void acct_process(void); -extern void acct_update_integrals(struct task_struct *tsk); -extern void acct_clear_integrals(struct task_struct *tsk); +extern void acct_exit_ns(struct pid_namespace *); #else #define acct_auto_close_mnt(x) do { } while (0) #define acct_auto_close(x) do { } while (0) #define acct_init_pacct(x) do { } while (0) #define acct_collect(x,y) do { } while (0) #define acct_process() do { } while (0) -#define acct_update_integrals(x) do { } while (0) -#define acct_clear_integrals(task) do { } while (0) +#define acct_exit_ns(ns) do { } while (0) #endif /* @@ -176,7 +176,11 @@ typedef struct acct acct_t; static inline u32 jiffies_to_AHZ(unsigned long x) { #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 +# if HZ < AHZ + return x * (AHZ / HZ); +# else return x / (HZ / AHZ); +# endif #else u64 tmp = (u64)x * TICK_NSEC; do_div(tmp, (NSEC_PER_SEC / AHZ));