Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2018 21:51:00 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328446 - head/stand/uboot/lib
Message-ID:  <201801262151.w0QLp0sE021257@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Jan 26 21:50:59 2018
New Revision: 328446
URL: https://svnweb.freebsd.org/changeset/base/328446

Log:
  Now that exit is __dead2, we need to tag ub_exit() as __dead2. To do
  that, we have to put a while (1); after the syscall that will never
  return to fake out the compiler....

Modified:
  head/stand/uboot/lib/glue.c
  head/stand/uboot/lib/glue.h

Modified: head/stand/uboot/lib/glue.c
==============================================================================
--- head/stand/uboot/lib/glue.c	Fri Jan 26 18:42:28 2018	(r328445)
+++ head/stand/uboot/lib/glue.c	Fri Jan 26 21:50:59 2018	(r328446)
@@ -187,6 +187,7 @@ ub_reset(void)
 {
 
 	syscall(API_RESET, NULL);
+	while (1);		/* Can't tag syscall as __dead2 */
 }
 
 static struct mem_region mr[UB_MAX_MR];

Modified: head/stand/uboot/lib/glue.h
==============================================================================
--- head/stand/uboot/lib/glue.h	Fri Jan 26 18:42:28 2018	(r328445)
+++ head/stand/uboot/lib/glue.h	Fri Jan 26 21:50:59 2018	(r328446)
@@ -78,7 +78,7 @@ void ub_putc(char);
 void ub_puts(const char *);
 
 /* system */
-void ub_reset(void);
+void ub_reset(void) __dead2;
 struct sys_info *ub_get_sys_info(void);
 
 /* time */



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