diff options
author | 2020-12-13 03:15:52 +0000 | |
---|---|---|
committer | 2020-12-13 03:15:52 +0000 | |
commit | db0fc38d112d3f4890eadffbbe558bc4ae933a38 (patch) | |
tree | e18b5c400245612b9fa4b9ef48025b931d72db23 /sys/dev/pci/drm/include/linux/wait.h | |
parent | Correct wrong type of variable and remove useless casts. (diff) | |
download | wireguard-openbsd-db0fc38d112d3f4890eadffbbe558bc4ae933a38.tar.xz wireguard-openbsd-db0fc38d112d3f4890eadffbbe558bc4ae933a38.zip |
remove unused wait interfaces
Diffstat (limited to 'sys/dev/pci/drm/include/linux/wait.h')
-rw-r--r-- | sys/dev/pci/drm/include/linux/wait.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/sys/dev/pci/drm/include/linux/wait.h b/sys/dev/pci/drm/include/linux/wait.h index 2552c534c68..44b42b4eb66 100644 --- a/sys/dev/pci/drm/include/linux/wait.h +++ b/sys/dev/pci/drm/include/linux/wait.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wait.h,v 1.6 2020/12/10 12:24:06 jsg Exp $ */ +/* $OpenBSD: wait.h,v 1.7 2020/12/13 03:15:52 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * Copyright (c) 2017 Martin Pieuchot @@ -44,7 +44,6 @@ extern int sch_priority; struct wait_queue_head { struct mutex lock; - unsigned int count; struct list_head head; }; typedef struct wait_queue_head wait_queue_head_t; @@ -53,13 +52,11 @@ static inline void init_waitqueue_head(wait_queue_head_t *wqh) { mtx_init(&wqh->lock, IPL_TTY); - wqh->count = 0; INIT_LIST_HEAD(&wqh->head); } #define __init_waitqueue_head(wq, name, key) init_waitqueue_head(wq) -int default_wake_function(struct wait_queue_entry *, unsigned int, int, void *); int autoremove_wake_function(struct wait_queue_entry *, unsigned int, int, void *); static inline void @@ -118,11 +115,9 @@ remove_wait_queue(wait_queue_head_t *head, wait_queue_entry_t *old) KASSERT(!cold); \ \ mtx_enter(&sch_mtx); \ - atomic_inc_int(&(wq).count); \ deadline = jiffies + ret; \ __error = msleep(&wq, &sch_mtx, prio, "drmweti", ret); \ ret = deadline - jiffies; \ - atomic_dec_int(&(wq).count); \ if (__error == ERESTART || __error == EINTR) { \ ret = -ERESTARTSYS; \ mtx_leave(&sch_mtx); \ @@ -232,7 +227,6 @@ wake_up_all_locked(wait_queue_head_t *wqh) } #define wake_up_interruptible(wq) wake_up(wq) -#define waitqueue_active(wq) ((wq)->count > 0) #define DEFINE_WAIT(name) \ struct wait_queue_entry name = { \ @@ -240,12 +234,6 @@ wake_up_all_locked(wait_queue_head_t *wqh) .func = autoremove_wake_function, \ .entry = LIST_HEAD_INIT((name).entry), \ } -#define DEFINE_WAIT_FUNC(name, cb) \ - struct wait_queue_entry name = { \ - .private = NULL, \ - .func = cb, \ - .entry = LIST_HEAD_INIT((name).entry), \ - } static inline void prepare_to_wait(wait_queue_head_t *wqh, wait_queue_entry_t *wqe, int state) |