[rtems-libbsd commit] Make sure CALLOUT_PROCESSED is not used

Sebastian Huber sebh at rtems.org
Thu Jul 26 12:50:30 UTC 2018


Module:    rtems-libbsd
Branch:    master
Commit:    e37f03e47a0b4329fbea954c841f17f7e6c41ceb
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=e37f03e47a0b4329fbea954c841f17f7e6c41ceb

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jul 26 14:35:56 2018 +0200

Make sure CALLOUT_PROCESSED is not used

This flag is only used in combination with the callout expire list,
which we do not use in libbsd.

---

 freebsd/sys/kern/kern_timeout.c | 2 ++
 freebsd/sys/sys/callout.h       | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/freebsd/sys/kern/kern_timeout.c b/freebsd/sys/kern/kern_timeout.c
index 2b08d5c..d78cf64 100644
--- a/freebsd/sys/kern/kern_timeout.c
+++ b/freebsd/sys/kern/kern_timeout.c
@@ -681,7 +681,9 @@ callout_cc_add(struct callout *c, struct callout_cpu *cc,
 		sbt = cc->cc_lastscan;
 	c->c_arg = arg;
 	c->c_iflags |= CALLOUT_PENDING;
+#ifndef __rtems__
 	c->c_iflags &= ~CALLOUT_PROCESSED;
+#endif /* __rtems__ */
 	c->c_flags |= CALLOUT_ACTIVE;
 #ifndef __rtems__
 	if (flags & C_DIRECT_EXEC)
diff --git a/freebsd/sys/sys/callout.h b/freebsd/sys/sys/callout.h
index eee6884..6c94848 100644
--- a/freebsd/sys/sys/callout.h
+++ b/freebsd/sys/sys/callout.h
@@ -47,8 +47,8 @@
 #define	CALLOUT_RETURNUNLOCKED	0x0010 /* handler returns with mtx unlocked */
 #define	CALLOUT_SHAREDLOCK	0x0020 /* callout lock held in shared mode */
 #define	CALLOUT_DFRMIGRATION	0x0040 /* callout in deferred migration mode */
-#define	CALLOUT_PROCESSED	0x0080 /* callout in wheel or processing list? */
 #ifndef __rtems__
+#define	CALLOUT_PROCESSED	0x0080 /* callout in wheel or processing list? */
 #define	CALLOUT_DIRECT 		0x0100 /* allow exec from hw int context */
 #endif /* __rtems__ */
 



More information about the vc mailing list