From 4fbe7358c7747a9165f776eb19addbb9baf7def2 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 27 Jul 2013 22:07:53 +0000 Subject: rename libdde_linux26 into libdde-linux26 to make dpkg-source happy --- libdde_linux26/contrib/include/linux/preempt.h | 139 ------------------------- 1 file changed, 139 deletions(-) delete mode 100644 libdde_linux26/contrib/include/linux/preempt.h (limited to 'libdde_linux26/contrib/include/linux/preempt.h') diff --git a/libdde_linux26/contrib/include/linux/preempt.h b/libdde_linux26/contrib/include/linux/preempt.h deleted file mode 100644 index 72b1a10a..00000000 --- a/libdde_linux26/contrib/include/linux/preempt.h +++ /dev/null @@ -1,139 +0,0 @@ -#ifndef __LINUX_PREEMPT_H -#define __LINUX_PREEMPT_H - -/* - * include/linux/preempt.h - macros for accessing and manipulating - * preempt_count (used for kernel preemption, interrupt count, etc.) - */ - -#include -#include -#include - -#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER) - extern void add_preempt_count(int val); - extern void sub_preempt_count(int val); -#else -# define add_preempt_count(val) do { preempt_count() += (val); } while (0) -# define sub_preempt_count(val) do { preempt_count() -= (val); } while (0) -#endif - -#define inc_preempt_count() add_preempt_count(1) -#define dec_preempt_count() sub_preempt_count(1) - -#define preempt_count() (current_thread_info()->preempt_count) - -#ifdef CONFIG_PREEMPT - -asmlinkage void preempt_schedule(void); - -#define preempt_disable() \ -do { \ - inc_preempt_count(); \ - barrier(); \ -} while (0) - -#define preempt_enable_no_resched() \ -do { \ - barrier(); \ - dec_preempt_count(); \ -} while (0) - -#define preempt_check_resched() \ -do { \ - if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \ - preempt_schedule(); \ -} while (0) - -#define preempt_enable() \ -do { \ - preempt_enable_no_resched(); \ - barrier(); \ - preempt_check_resched(); \ -} while (0) - -/* For debugging and tracer internals only! */ -#define add_preempt_count_notrace(val) \ - do { preempt_count() += (val); } while (0) -#define sub_preempt_count_notrace(val) \ - do { preempt_count() -= (val); } while (0) -#define inc_preempt_count_notrace() add_preempt_count_notrace(1) -#define dec_preempt_count_notrace() sub_preempt_count_notrace(1) - -#define preempt_disable_notrace() \ -do { \ - inc_preempt_count_notrace(); \ - barrier(); \ -} while (0) - -#define preempt_enable_no_resched_notrace() \ -do { \ - barrier(); \ - dec_preempt_count_notrace(); \ -} while (0) - -/* preempt_check_resched is OK to trace */ -#define preempt_enable_notrace() \ -do { \ - preempt_enable_no_resched_notrace(); \ - barrier(); \ - preempt_check_resched(); \ -} while (0) - -#else - -#define preempt_disable() do { } while (0) -#define preempt_enable_no_resched() do { } while (0) -#define preempt_enable() do { } while (0) -#define preempt_check_resched() do { } while (0) - -#define preempt_disable_notrace() do { } while (0) -#define preempt_enable_no_resched_notrace() do { } while (0) -#define preempt_enable_notrace() do { } while (0) - -#endif - -#ifdef CONFIG_PREEMPT_NOTIFIERS - -struct preempt_notifier; - -/** - * preempt_ops - notifiers called when a task is preempted and rescheduled - * @sched_in: we're about to be rescheduled: - * notifier: struct preempt_notifier for the task being scheduled - * cpu: cpu we're scheduled on - * @sched_out: we've just been preempted - * notifier: struct preempt_notifier for the task being preempted - * next: the task that's kicking us out - */ -struct preempt_ops { - void (*sched_in)(struct preempt_notifier *notifier, int cpu); - void (*sched_out)(struct preempt_notifier *notifier, - struct task_struct *next); -}; - -/** - * preempt_notifier - key for installing preemption notifiers - * @link: internal use - * @ops: defines the notifier functions to be called - * - * Usually used in conjunction with container_of(). - */ -struct preempt_notifier { - struct hlist_node link; - struct preempt_ops *ops; -}; - -void preempt_notifier_register(struct preempt_notifier *notifier); -void preempt_notifier_unregister(struct preempt_notifier *notifier); - -static inline void preempt_notifier_init(struct preempt_notifier *notifier, - struct preempt_ops *ops) -{ - INIT_HLIST_NODE(¬ifier->link); - notifier->ops = ops; -} - -#endif - -#endif /* __LINUX_PREEMPT_H */ -- cgit v1.2.3