~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/workqueues.h

Version: ~ [ linux-4.19-rc7 ] ~ [ linux-4.18.12 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.74 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.131 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.159 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.123 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.59 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.31.14 ] ~ [ linux-2.6.30.10 ] ~ [ linux-2.6.29.6 ] ~ [ linux-2.6.28.10 ] ~ [ linux-2.6.27.62 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef WORKQUEUES_H
  3 #define WORKQUEUES_H
  4 
  5 #include <stdbool.h>
  6 
  7 #include "barriers.h"
  8 #include "bug_on.h"
  9 #include "int_typedefs.h"
 10 
 11 #include <linux/types.h>
 12 
 13 /* Stub workqueue implementation. */
 14 
 15 struct work_struct;
 16 typedef void (*work_func_t)(struct work_struct *work);
 17 void delayed_work_timer_fn(unsigned long __data);
 18 
 19 struct work_struct {
 20 /*      atomic_long_t data; */
 21         unsigned long data;
 22 
 23         struct list_head entry;
 24         work_func_t func;
 25 #ifdef CONFIG_LOCKDEP
 26         struct lockdep_map lockdep_map;
 27 #endif
 28 };
 29 
 30 struct timer_list {
 31         struct hlist_node       entry;
 32         unsigned long           expires;
 33         void                    (*function)(unsigned long);
 34         unsigned long           data;
 35         u32                     flags;
 36         int                     slack;
 37 };
 38 
 39 struct delayed_work {
 40         struct work_struct work;
 41         struct timer_list timer;
 42 
 43         /* target workqueue and CPU ->timer uses to queue ->work */
 44         struct workqueue_struct *wq;
 45         int cpu;
 46 };
 47 
 48 
 49 static inline bool schedule_work(struct work_struct *work)
 50 {
 51         BUG();
 52         return true;
 53 }
 54 
 55 static inline bool schedule_work_on(int cpu, struct work_struct *work)
 56 {
 57         BUG();
 58         return true;
 59 }
 60 
 61 static inline bool queue_work(struct workqueue_struct *wq,
 62                               struct work_struct *work)
 63 {
 64         BUG();
 65         return true;
 66 }
 67 
 68 static inline bool queue_delayed_work(struct workqueue_struct *wq,
 69                                       struct delayed_work *dwork,
 70                                       unsigned long delay)
 71 {
 72         BUG();
 73         return true;
 74 }
 75 
 76 #define INIT_WORK(w, f) \
 77         do { \
 78                 (w)->data = 0; \
 79                 (w)->func = (f); \
 80         } while (0)
 81 
 82 #define INIT_DELAYED_WORK(w, f) INIT_WORK(&(w)->work, (f))
 83 
 84 #define __WORK_INITIALIZER(n, f) { \
 85                 .data = 0, \
 86                 .entry = { &(n).entry, &(n).entry }, \
 87                 .func = f \
 88         }
 89 
 90 /* Don't bother initializing timer. */
 91 #define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \
 92         .work = __WORK_INITIALIZER((n).work, (f)), \
 93         }
 94 
 95 #define DECLARE_WORK(n, f) \
 96         struct workqueue_struct n = __WORK_INITIALIZER
 97 
 98 #define DECLARE_DELAYED_WORK(n, f) \
 99         struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f, 0)
100 
101 #define system_power_efficient_wq ((struct workqueue_struct *) NULL)
102 
103 #endif
104 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp