2 * 'struct utrace' data structure for kernel/utrace.c private use.
4 * Copyright (C) 2006-2009 Red Hat, Inc. All rights reserved.
6 * This copyrighted material is made available to anyone wishing to use,
7 * modify, copy, or redistribute it subject to the terms and conditions
8 * of the GNU General Public License v.2.
11 #ifndef _LINUX_UTRACE_STRUCT_H
12 #define _LINUX_UTRACE_STRUCT_H 1
16 #include <linux/list.h>
17 #include <linux/spinlock.h>
20 * Per-thread structure private to utrace implementation. This properly
21 * belongs in kernel/utrace.c and its use is entirely private to the code
22 * there. It is only defined in a header file so that it can be embedded
23 * in the struct task_struct layout. It is here rather than in utrace.h
24 * to avoid header nesting order issues getting too complex.
28 struct task_struct
*cloning
;
30 struct list_head attached
, attaching
;
33 struct utrace_engine
*reporting
;
35 unsigned int stopped
:1;
36 unsigned int report
:1;
37 unsigned int interrupt
:1;
38 unsigned int signal_handler
:1;
39 unsigned int vfork_stop
:1; /* need utrace_stop() before vfork wait */
40 unsigned int death
:1; /* in utrace_report_death() now */
41 unsigned int reap
:1; /* release_task() has run */
44 # define INIT_UTRACE(tsk) \
47 .lock = __SPIN_LOCK_UNLOCKED(tsk.utrace.lock), \
48 .attached = LIST_HEAD_INIT(tsk.utrace.attached), \
49 .attaching = LIST_HEAD_INIT(tsk.utrace.attaching), \
54 # define INIT_UTRACE(tsk) /* Nothing. */
56 #endif /* CONFIG_UTRACE */
58 #endif /* linux/utrace_struct.h */