Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106222
b: refs/heads/master
c: 64b1208
h: refs/heads/master
v: v3
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Jul 26, 2008
1 parent 7f1c979 commit 0bb53be
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b787f7ba677840da16a2228c16571ce8a1fcb799
refs/heads/master: 64b1208d5b0ef8859fd52ea7ae286a3eb994669b
34 changes: 34 additions & 0 deletions trunk/include/linux/tracehook.h
Original file line number Diff line number Diff line change
Expand Up @@ -537,4 +537,38 @@ static inline void tracehook_report_death(struct task_struct *task,
{
}

#ifdef TIF_NOTIFY_RESUME
/**
* set_notify_resume - cause tracehook_notify_resume() to be called
* @task: task that will call tracehook_notify_resume()
*
* Calling this arranges that @task will call tracehook_notify_resume()
* before returning to user mode. If it's already running in user mode,
* it will enter the kernel and call tracehook_notify_resume() soon.
* If it's blocked, it will not be woken.
*/
static inline void set_notify_resume(struct task_struct *task)
{
if (!test_and_set_tsk_thread_flag(task, TIF_NOTIFY_RESUME))
kick_process(task);
}

/**
* tracehook_notify_resume - report when about to return to user mode
* @regs: user-mode registers of @current task
*
* This is called when %TIF_NOTIFY_RESUME has been set. Now we are
* about to return to user mode, and the user state in @regs can be
* inspected or adjusted. The caller in arch code has cleared
* %TIF_NOTIFY_RESUME before the call. If the flag gets set again
* asynchronously, this will be called again before we return to
* user mode.
*
* Called without locks.
*/
static inline void tracehook_notify_resume(struct pt_regs *regs)
{
}
#endif /* TIF_NOTIFY_RESUME */

#endif /* <linux/tracehook.h> */

0 comments on commit 0bb53be

Please sign in to comment.