]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/init_task.h
Merge commit 'v2.6.30-rc1' into perfcounters/core
[mv-sheeva.git] / include / linux / init_task.h
index dcfb93337e9a2e902938c561575c9b337320985d..c98866102817ed8e163ea128d8a25332e9656401 100644 (file)
@@ -121,6 +121,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)
@@ -184,6 +196,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                                               \