Re: + oom-move-prototypes-to-appropriate-header-file.patch added to -mm tree

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

 



On Fri, Sep 21, 2007 at 02:10:55AM -0700, [email protected] wrote:
> Move the OOM killer's extern function prototypes to include/linux/oom.h and
> include it where necessary.
> 
> Cc: Andrea Arcangeli <[email protected]>
> Acked-by: Christoph Lameter <[email protected]>

NAK. Target in corresponding Kbuild is wrong. sched.h is overkill.
Could we please also drop extern's while in protos?

> --- a/drivers/char/sysrq.c~oom-move-prototypes-to-appropriate-header-file
> +++ a/drivers/char/sysrq.c
> @@ -36,6 +36,7 @@
>  #include <linux/kexec.h>
>  #include <linux/irq.h>
>  #include <linux/hrtimer.h>
> +#include <linux/oom.h>
>  
>  #include <asm/ptrace.h>
>  #include <asm/irq_regs.h>
> diff -puN include/linux/oom.h~oom-move-prototypes-to-appropriate-header-file include/linux/oom.h
> --- a/include/linux/oom.h~oom-move-prototypes-to-appropriate-header-file
> +++ a/include/linux/oom.h
> @@ -1,10 +1,19 @@
>  #ifndef __INCLUDE_LINUX_OOM_H
>  #define __INCLUDE_LINUX_OOM_H
>  
> +#include <linux/sched.h>
> +
>  /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */
>  #define OOM_DISABLE (-17)
>  /* inclusive */
>  #define OOM_ADJUST_MIN (-16)
>  #define OOM_ADJUST_MAX 15
>  
> -#endif
> +#ifdef __KERNEL__
> +
> +extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
> +extern int register_oom_notifier(struct notifier_block *nb);
> +extern int unregister_oom_notifier(struct notifier_block *nb);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux