Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Sep 2016 11:16:00 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305804 - head/sys/boot/kshim
Message-ID:  <201609141116.u8EBG06e082899@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Sep 14 11:16:00 2016
New Revision: 305804
URL: https://svnweb.freebsd.org/changeset/base/305804

Log:
  Make the callout structure in the boot loader's kernel shim more
  similar to the kernel one.
  
  MFC after:	1 week

Modified:
  head/sys/boot/kshim/bsd_kernel.c
  head/sys/boot/kshim/bsd_kernel.h

Modified: head/sys/boot/kshim/bsd_kernel.c
==============================================================================
--- head/sys/boot/kshim/bsd_kernel.c	Wed Sep 14 10:51:06 2016	(r305803)
+++ head/sys/boot/kshim/bsd_kernel.c	Wed Sep 14 11:16:00 2016	(r305804)
@@ -432,8 +432,8 @@ callout_callback(struct callout *c)
 	}
 	mtx_unlock(&mtx_callout);
 
-	if (c->func)
-		(c->func) (c->arg);
+	if (c->c_func != NULL)
+		(c->c_func) (c->c_arg);
 
 	if (!(c->flags & CALLOUT_RETURNUNLOCKED))
 		mtx_unlock(c->mtx);
@@ -487,8 +487,8 @@ callout_reset(struct callout *c, int to_
 {
 	callout_stop(c);
 
-	c->func = func;
-	c->arg = arg;
+	c->c_func = func;
+	c->c_arg = arg;
 	c->timeout = ticks + to_ticks;
 
 	mtx_lock(&mtx_callout);
@@ -507,8 +507,8 @@ callout_stop(struct callout *c)
 	}
 	mtx_unlock(&mtx_callout);
 
-	c->func = NULL;
-	c->arg = NULL;
+	c->c_func = NULL;
+	c->c_arg = NULL;
 }
 
 void

Modified: head/sys/boot/kshim/bsd_kernel.h
==============================================================================
--- head/sys/boot/kshim/bsd_kernel.h	Wed Sep 14 10:51:06 2016	(r305803)
+++ head/sys/boot/kshim/bsd_kernel.h	Wed Sep 14 11:16:00 2016	(r305804)
@@ -299,8 +299,8 @@ extern volatile int ticks;
 
 struct callout {
 	LIST_ENTRY(callout) entry;
-	callout_fn_t *func;
-	void   *arg;
+	callout_fn_t *c_func;
+	void   *c_arg;
 	struct mtx *mtx;
 	int	flags;
 	int	timeout;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609141116.u8EBG06e082899>