• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/include/linux/
1#ifndef _LINUX_THREADS_H
2#define _LINUX_THREADS_H
3
4
5/*
6 * The default limit for the nr of threads is now in
7 * /proc/sys/kernel/threads-max.
8 */
9
10/*
11 * Maximum supported processors.  Setting this smaller saves quite a
12 * bit of memory.  Use nr_cpu_ids instead of this except for static bitmaps.
13 */
14#ifndef CONFIG_NR_CPUS
15#define CONFIG_NR_CPUS	1
16#endif
17
18/* Places which use this should consider cpumask_var_t. */
19#define NR_CPUS		CONFIG_NR_CPUS
20
21#define MIN_THREADS_LEFT_FOR_ROOT 4
22
23/*
24 * This controls the default maximum pid allocated to a process
25 */
26#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)
27
28/*
29 * A maximum of 4 million PIDs should be enough for a while.
30 * [NOTE: PID/TIDs are limited to 2^29 ~= 500+ million, see futex.h.]
31 */
32#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \
33	(sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
34
35/*
36 * Define a minimum number of pids per cpu.  Heuristically based
37 * on original pid max of 32k for 32 cpus.  Also, increase the
38 * minimum settable value for pid_max on the running system based
39 * on similar defaults.  See kernel/pid.c:pidmap_init() for details.
40 */
41#define PIDS_PER_CPU_DEFAULT	1024
42#define PIDS_PER_CPU_MIN	8
43
44#endif
45