Ignore:
Timestamp:
Mar 18, 2021, 8:57:36 PM (4 years ago)
Author:
David Azarewicz
Message:

Merge changes from Paul's uniaud32next branch.

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/include/linux/wait.h

    r32 r679  
    1212
    1313#include <linux/spinlock.h>
     14#include <linux/list.h>
     15#include <asm/page.h>
    1416
    15 #include <asm/page.h>
     17typedef struct wait_queue_entry wait_queue_entry_t;
     18
     19typedef int (*wait_queue_func_t)(struct wait_queue_entry *wq_entry, unsigned mode, int flags, void *key);
     20
     21/*
     22 * A single wait-queue entry structure:
     23 */
     24struct wait_queue_entry {
     25        unsigned int            flags;
     26        void                    *private;
     27        wait_queue_func_t       func;
     28        struct list_head        entry;
     29};
    1630
    1731/*
     
    3044};
    3145typedef struct __wait_queue wait_queue_t;
     46
     47struct __wait_queue_head {
     48        spinlock_t              lock;
     49        struct list_head        task_list;
     50};
     51
     52struct wait_queue_head {
     53        spinlock_t              lock;
     54        struct list_head        head;
     55};
     56typedef struct wait_queue_head wait_queue_head_t;
    3257
    3358/*
     
    6590#endif
    6691
    67 struct __wait_queue_head {
    68         void * lock;
    69         void * task_list;
    70 #if WAITQUEUE_DEBUG
    71         long __magic;
    72         long __creator;
    73 #endif
    74 };
    75 typedef struct __wait_queue_head wait_queue_head_t;
    76 
    7792#if WAITQUEUE_DEBUG
    7893# define __WAITQUEUE_DEBUG_INIT(name) \
     
    91106
    92107#define __WAIT_QUEUE_HEAD_INITIALIZER(name) \
    93 { WAITQUEUE_RW_LOCK_UNLOCKED, { &(name).task_list, &(name).task_list } \
     108{ WAITQUEUE_RW_LOCK_UNLOCKED, { &(name).head, &(name).head } \
    94109                __WAITQUEUE_HEAD_DEBUG_INIT(name)}
    95110
     
    99114void init_waitqueue_head(wait_queue_head_t *q);
    100115
    101 void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p);
     116extern void init_waitqueue_entry(struct wait_queue_entry *wq_entry, struct task_struct *p);
     117extern void add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
     118extern void add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
     119extern void remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
    102120
    103121int waitqueue_active(wait_queue_head_t *q);
     
    110128void __add_wait_queue_tail(wait_queue_head_t *head, wait_queue_t *new);
    111129void __remove_wait_queue(wait_queue_head_t *head, wait_queue_t *old);
    112 
     130void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr);
    113131#endif /* __KERNEL__ */
    114 
     132#define wait_event_lock_irq(wq_head, condition, lock)
     133#define wake_up_all(x)                 
    115134#endif
Note: See TracChangeset for help on using the changeset viewer.