[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 14/26: update workqueue.h
From: |
Samuel Thibault |
Subject: |
[hurd] 14/26: update workqueue.h |
Date: |
Tue, 22 Sep 2015 21:51:48 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit 46d275d6b8853e95cd1d9b0353ab05553e5cd5aa
Author: Samuel Thibault <address@hidden>
Date: Fri Aug 28 19:57:37 2015 +0200
update workqueue.h
---
libdde_linux26/contrib/include/linux/workqueue.h | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/libdde_linux26/contrib/include/linux/workqueue.h
b/libdde_linux26/contrib/include/linux/workqueue.h
index 3cd51e5..cf24c20 100644
--- a/libdde_linux26/contrib/include/linux/workqueue.h
+++ b/libdde_linux26/contrib/include/linux/workqueue.h
@@ -41,6 +41,11 @@ struct delayed_work {
struct timer_list timer;
};
+static inline struct delayed_work *to_delayed_work(struct work_struct *work)
+{
+ return container_of(work, struct delayed_work, work);
+}
+
struct execute_work {
struct work_struct work;
};
@@ -89,7 +94,7 @@ struct execute_work {
/*
* initialize all of a work item in one go
*
- * NOTE! No point in using "atomic_long_set()": useing a direct
+ * NOTE! No point in using "atomic_long_set()": using a direct
* assignment of the work data initializer allows the compiler
* to generate better code.
*/
@@ -202,6 +207,7 @@ extern int queue_delayed_work_on(int cpu, struct
workqueue_struct *wq,
extern void flush_workqueue(struct workqueue_struct *wq);
extern void flush_scheduled_work(void);
+extern void flush_delayed_work(struct delayed_work *work);
extern int schedule_work(struct work_struct *work);
extern int schedule_work_on(int cpu, struct work_struct *work);
@@ -235,6 +241,21 @@ static inline int cancel_delayed_work(struct delayed_work
*work)
return ret;
}
+/*
+ * Like above, but uses del_timer() instead of del_timer_sync(). This means,
+ * if it returns 0 the timer function may be running and the queueing is in
+ * progress.
+ */
+static inline int __cancel_delayed_work(struct delayed_work *work)
+{
+ int ret;
+
+ ret = del_timer(&work->timer);
+ if (ret)
+ work_clear_pending(&work->work);
+ return ret;
+}
+
extern int cancel_delayed_work_sync(struct delayed_work *work);
/* Obsolete. use cancel_delayed_work_sync() */
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 11/26: Cherry-pick phy.h updates, (continued)
- [hurd] 11/26: Cherry-pick phy.h updates, Samuel Thibault, 2015/09/22
- [hurd] 05/26: commit 0c27922e4933ceb86644f4a9b1af212ffe5aad75, Samuel Thibault, 2015/09/22
- [hurd] 16/26: Add devres.c, Samuel Thibault, 2015/09/22
- [hurd] 18/26: commit d5a9e24afb4ab38110ebb777588ea0bd0eacbd0a, Samuel Thibault, 2015/09/22
- [hurd] 24/26: Merge remote-tracking branch 'incubator/dde' into dde-upstream, Samuel Thibault, 2015/09/22
- [hurd] 08/26: commit 042a53a9e437feaf2230dd2cadcecfae9c7bfe05, Samuel Thibault, 2015/09/22
- [hurd] 22/26: Install missing queue.h, Samuel Thibault, 2015/09/22
- [hurd] 12/26: update pci_ids, Samuel Thibault, 2015/09/22
- [hurd] 17/26: Add pr_cont, Samuel Thibault, 2015/09/22
- [hurd] 26/26: Move files, Samuel Thibault, 2015/09/22
- [hurd] 14/26: update workqueue.h,
Samuel Thibault <=
- [hurd] 25/26: Merge branch 'dde-upstream' into dde, Samuel Thibault, 2015/09/22
- [hurd] 23/26: Fix build with gcc 5, Samuel Thibault, 2015/09/22
- [hurd] 15/26: commit 9d21493b4beb8f918ba248032fefa393074a5e2b, Samuel Thibault, 2015/09/22
- [hurd] 21/26: Fix insecure format, Samuel Thibault, 2015/09/22
- [hurd] 03/26: commit f001fde5eadd915f4858d22ed70d7040f48767cf, Samuel Thibault, 2015/09/22
- [hurd] 06/26: commit 31278e71471399beaff9280737e52b47db4dc345, Samuel Thibault, 2015/09/22
- [hurd] 04/26: commit ccffad25b5136958d4769ed6de5e87992dd9c65c, Samuel Thibault, 2015/09/22
- [hurd] 09/26: Add mdio.h, Samuel Thibault, 2015/09/22
- [hurd] 19/26: Add rcuclassic.c, Samuel Thibault, 2015/09/22
- [hurd] 20/26: really add files, Samuel Thibault, 2015/09/22