Ignore:
Timestamp:
Jun 6, 2009, 11:07:11 AM (16 years ago)
Author:
Paul Smedley
Message:

Reorganise code to make maintenance easier

File:
1 edited

Legend:

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

    r441 r442  
    11#ifndef __LINUX_WORKQUEUE_H
    22#define __LINUX_WORKQUEUE_H
     3
     4#include <sound/compat_22.h>
     5/* we know this is used below exactly once for at most one waiter */
     6
    37struct work_struct {
    48        unsigned long pending;
     
    1014};
    1115
     16struct workqueue_struct {
     17        spinlock_t lock;
     18        const char *name;
     19        struct list_head worklist;
     20        int task_pid;
     21        struct task_struct *task;
     22        wait_queue_head_t more_work;
     23        wait_queue_head_t work_done;
     24        struct completion thread_exited;
     25};
    1226struct delayed_work {
    1327        struct work_struct work;
    1428};
     29
     30struct workqueue_struct *create_workqueue(const char *name);
     31void destroy_workqueue(struct workqueue_struct *wq);
     32int queue_work(struct workqueue_struct *wq, struct work_struct *work);
     33void flush_workqueue(struct workqueue_struct *wq);
    1534
    1635#define INIT_WORK(_work, _func, _data)                  \
     
    3554#define INIT_WORK(w,f) snd_INIT_WORK(w,f)
    3655#define create_singlethread_workqueue(name) create_workqueue(name)
     56
    3757#endif /* __LINUX_WORKQUEUE_H */
Note: See TracChangeset for help on using the changeset viewer.