svn commit: r328446 - head/stand/uboot/lib

Warner Losh imp at FreeBSD.org
Fri Jan 26 21:51:00 UTC 2018


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 */


More information about the svn-src-all mailing list