Ignore:
Timestamp:
Jun 6, 2009, 4:22:27 AM (16 years ago)
Author:
Paul Smedley
Message:

Move functions out of config.h into appropriate linux header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/include/linux/workqueue.h

    r305 r441  
    11#ifndef __LINUX_WORKQUEUE_H
    22#define __LINUX_WORKQUEUE_H
     3struct work_struct {
     4        unsigned long pending;
     5        struct list_head entry;
     6        void (*func)(void *);
     7        void *data;
     8        void *wq_data;
     9        struct timer_list timer;
     10};
     11
     12struct delayed_work {
     13        struct work_struct work;
     14};
     15
     16#define INIT_WORK(_work, _func, _data)                  \
     17        do {                                            \
     18                (_work)->func = _func;                  \
     19                (_work)->data = _data;                  \
     20                init_timer(&(_work)->timer);            \
     21        } while (0)
     22#define __WORK_INITIALIZER(n, f, d) {                   \
     23                .func = (f),                            \
     24                .data = (d),                            \
     25        }
     26#define DECLARE_WORK(n, f, d)                           \
     27        struct work_struct n = __WORK_INITIALIZER(n, f, d)
     28
     29/* redefine INIT_WORK() */
     30static inline void snd_INIT_WORK(struct work_struct *w, void (*f)(struct work_struct *))
     31{
     32        INIT_WORK(w, (void(*)(void*))(f), w);
     33}
     34#undef INIT_WORK
     35#define INIT_WORK(w,f) snd_INIT_WORK(w,f)
     36#define create_singlethread_workqueue(name) create_workqueue(name)
    337#endif /* __LINUX_WORKQUEUE_H */
Note: See TracChangeset for help on using the changeset viewer.