include/linux/threads.h
changeset 2 d1f6d8b6f81c
parent 0 aa628870c1d3
equal deleted inserted replaced
1:0056487c491e 2:d1f6d8b6f81c
     6  * The default limit for the nr of threads is now in
     6  * The default limit for the nr of threads is now in
     7  * /proc/sys/kernel/threads-max.
     7  * /proc/sys/kernel/threads-max.
     8  */
     8  */
     9 
     9 
    10 /*
    10 /*
    11  * Maximum supported processors that can run under SMP.  This value is
    11  * Maximum supported processors.  Setting this smaller saves quite a
    12  * set via configure setting.  The maximum is equal to the size of the
    12  * bit of memory.  Use nr_cpu_ids instead of this except for static bitmaps.
    13  * bitmasks used on that platform, i.e. 32 or 64.  Setting this smaller
       
    14  * saves quite a bit of memory.
       
    15  */
    13  */
    16 #ifdef CONFIG_SMP
    14 #ifndef CONFIG_NR_CPUS
       
    15 /* FIXME: This should be fixed in the arch's Kconfig */
       
    16 #define CONFIG_NR_CPUS	1
       
    17 #endif
       
    18 
       
    19 /* Places which use this should consider cpumask_var_t. */
    17 #define NR_CPUS		CONFIG_NR_CPUS
    20 #define NR_CPUS		CONFIG_NR_CPUS
    18 #else
       
    19 #define NR_CPUS		1
       
    20 #endif
       
    21 
    21 
    22 #define MIN_THREADS_LEFT_FOR_ROOT 4
    22 #define MIN_THREADS_LEFT_FOR_ROOT 4
    23 
    23 
    24 /*
    24 /*
    25  * This controls the default maximum pid allocated to a process
    25  * This controls the default maximum pid allocated to a process