mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge remote branch 'tip/x86/entry' into kvm-updates/2.6.33
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
commit
58988b07cf
9 changed files with 119 additions and 2 deletions
49
include/linux/user-return-notifier.h
Normal file
49
include/linux/user-return-notifier.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#ifndef _LINUX_USER_RETURN_NOTIFIER_H
|
||||
#define _LINUX_USER_RETURN_NOTIFIER_H
|
||||
|
||||
#ifdef CONFIG_USER_RETURN_NOTIFIER
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
struct user_return_notifier {
|
||||
void (*on_user_return)(struct user_return_notifier *urn);
|
||||
struct hlist_node link;
|
||||
};
|
||||
|
||||
|
||||
void user_return_notifier_register(struct user_return_notifier *urn);
|
||||
void user_return_notifier_unregister(struct user_return_notifier *urn);
|
||||
|
||||
static inline void propagate_user_return_notify(struct task_struct *prev,
|
||||
struct task_struct *next)
|
||||
{
|
||||
if (test_tsk_thread_flag(prev, TIF_USER_RETURN_NOTIFY)) {
|
||||
clear_tsk_thread_flag(prev, TIF_USER_RETURN_NOTIFY);
|
||||
set_tsk_thread_flag(next, TIF_USER_RETURN_NOTIFY);
|
||||
}
|
||||
}
|
||||
|
||||
void fire_user_return_notifiers(void);
|
||||
|
||||
static inline void clear_user_return_notifier(struct task_struct *p)
|
||||
{
|
||||
clear_tsk_thread_flag(p, TIF_USER_RETURN_NOTIFY);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
struct user_return_notifier {};
|
||||
|
||||
static inline void propagate_user_return_notify(struct task_struct *prev,
|
||||
struct task_struct *next)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void fire_user_return_notifiers(void) {}
|
||||
|
||||
static inline void clear_user_return_notifier(struct task_struct *p) {}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Reference in a new issue