]> Pileus Git - ~andy/linux/blobdiff - include/linux/init_task.h
Merge branch 'linus' into perfcounters/core
[~andy/linux] / include / linux / init_task.h
index d87247d2641f5cbf4eb69a90fea392b95684e588..503afaa0afa7b4927d035ed62ca8f30b9bb8b337 100644 (file)
@@ -108,6 +108,18 @@ extern struct group_info init_groups;
 
 extern struct cred init_cred;
 
+#ifdef CONFIG_PERF_COUNTERS
+# define INIT_PERF_COUNTERS(tsk)                                       \
+       .perf_counter_ctx.counter_list =                                \
+               LIST_HEAD_INIT(tsk.perf_counter_ctx.counter_list),      \
+       .perf_counter_ctx.event_list =                                  \
+               LIST_HEAD_INIT(tsk.perf_counter_ctx.event_list),        \
+       .perf_counter_ctx.lock =                                        \
+               __SPIN_LOCK_UNLOCKED(tsk.perf_counter_ctx.lock),
+#else
+# define INIT_PERF_COUNTERS(tsk)
+#endif
+
 /*
  *  INIT_TASK is used to set up the first task table, touch at
  * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -171,6 +183,7 @@ extern struct cred init_cred;
        },                                                              \
        .dirties = INIT_PROP_LOCAL_SINGLE(dirties),                     \
        INIT_IDS                                                        \
+       INIT_PERF_COUNTERS(tsk)                                         \
        INIT_TRACE_IRQFLAGS                                             \
        INIT_LOCKDEP                                                    \
        INIT_FTRACE_GRAPH                                               \