diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 22:05:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 22:05:45 -0500 |
commit | df32e43a54d04eda35d2859beaf90e3864d53288 (patch) | |
tree | 7a61cf658b2949bd426285eb9902be7758ced1ba /include/linux/sched.h | |
parent | fbd918a2026d0464ce9c23f57b7de4bcfccdc2e6 (diff) | |
parent | 78d5506e82b21a1a1de68c24182db2c2fe521422 (diff) |
Merge branch 'akpm' (incoming from Andrew)
Merge first patch-bomb from Andrew Morton:
- a couple of misc things
- inotify/fsnotify work from Jan
- ocfs2 updates (partial)
- about half of MM
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (117 commits)
mm/migrate: remove unused function, fail_migrate_page()
mm/migrate: remove putback_lru_pages, fix comment on putback_movable_pages
mm/migrate: correct failure handling if !hugepage_migration_support()
mm/migrate: add comment about permanent failure path
mm, page_alloc: warn for non-blockable __GFP_NOFAIL allocation failure
mm: compaction: reset scanner positions immediately when they meet
mm: compaction: do not mark unmovable pageblocks as skipped in async compaction
mm: compaction: detect when scanners meet in isolate_freepages
mm: compaction: reset cached scanner pfn's before reading them
mm: compaction: encapsulate defer reset logic
mm: compaction: trace compaction begin and end
memcg, oom: lock mem_cgroup_print_oom_info
sched: add tracepoints related to NUMA task migration
mm: numa: do not automatically migrate KSM pages
mm: numa: trace tasks that fail migration due to rate limiting
mm: numa: limit scope of lock for NUMA migrate rate limiting
mm: numa: make NUMA-migrate related functions static
lib/show_mem.c: show num_poisoned_pages when oom
mm/hwpoison: add '#' to hwpoison_inject
mm/memblock: use WARN_ONCE when MAX_NUMNODES passed as input parameter
...
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index ffccdad050b5..485234d2fd42 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -549,6 +549,7 @@ struct signal_struct { | |||
549 | atomic_t sigcnt; | 549 | atomic_t sigcnt; |
550 | atomic_t live; | 550 | atomic_t live; |
551 | int nr_threads; | 551 | int nr_threads; |
552 | struct list_head thread_head; | ||
552 | 553 | ||
553 | wait_queue_head_t wait_chldexit; /* for wait4() */ | 554 | wait_queue_head_t wait_chldexit; /* for wait4() */ |
554 | 555 | ||
@@ -1271,6 +1272,7 @@ struct task_struct { | |||
1271 | /* PID/PID hash table linkage. */ | 1272 | /* PID/PID hash table linkage. */ |
1272 | struct pid_link pids[PIDTYPE_MAX]; | 1273 | struct pid_link pids[PIDTYPE_MAX]; |
1273 | struct list_head thread_group; | 1274 | struct list_head thread_group; |
1275 | struct list_head thread_node; | ||
1274 | 1276 | ||
1275 | struct completion *vfork_done; /* for vfork() */ | 1277 | struct completion *vfork_done; /* for vfork() */ |
1276 | int __user *set_child_tid; /* CLONE_CHILD_SETTID */ | 1278 | int __user *set_child_tid; /* CLONE_CHILD_SETTID */ |
@@ -2341,6 +2343,16 @@ extern bool current_is_single_threaded(void); | |||
2341 | #define while_each_thread(g, t) \ | 2343 | #define while_each_thread(g, t) \ |
2342 | while ((t = next_thread(t)) != g) | 2344 | while ((t = next_thread(t)) != g) |
2343 | 2345 | ||
2346 | #define __for_each_thread(signal, t) \ | ||
2347 | list_for_each_entry_rcu(t, &(signal)->thread_head, thread_node) | ||
2348 | |||
2349 | #define for_each_thread(p, t) \ | ||
2350 | __for_each_thread((p)->signal, t) | ||
2351 | |||
2352 | /* Careful: this is a double loop, 'break' won't work as expected. */ | ||
2353 | #define for_each_process_thread(p, t) \ | ||
2354 | for_each_process(p) for_each_thread(p, t) | ||
2355 | |||
2344 | static inline int get_nr_threads(struct task_struct *tsk) | 2356 | static inline int get_nr_threads(struct task_struct *tsk) |
2345 | { | 2357 | { |
2346 | return tsk->signal->nr_threads; | 2358 | return tsk->signal->nr_threads; |