Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/microcode/aic7xxx For "num_critical_sections", now o...



details:   https://anonhg.NetBSD.org/src/rev/d372e18ef160
branches:  trunk
changeset: 990060:d372e18ef160
user:      ryo <ryo%NetBSD.org@localhost>
date:      Mon Oct 25 07:41:41 2021 +0000

description:
For "num_critical_sections", now output not only the "static const int" variable but also macro definition.

diffstat:

 sys/dev/microcode/aic7xxx/aicasm.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r e4da6bdae4ee -r d372e18ef160 sys/dev/microcode/aic7xxx/aicasm.c
--- a/sys/dev/microcode/aic7xxx/aicasm.c        Mon Oct 25 07:40:29 2021 +0000
+++ b/sys/dev/microcode/aic7xxx/aicasm.c        Mon Oct 25 07:41:41 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aicasm.c,v 1.11 2021/07/24 21:31:37 andvar Exp $       */
+/*     $NetBSD: aicasm.c,v 1.12 2021/10/25 07:41:41 ryo Exp $  */
 
 /*
  * Aic7xxx SCSI host adapter firmware asssembler
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: aicasm.c,v 1.11 2021/07/24 21:31:37 andvar Exp $");
+__RCSID("$NetBSD: aicasm.c,v 1.12 2021/10/25 07:41:41 ryo Exp $");
 
 #include <sys/types.h>
 #include <sys/mman.h>
@@ -455,8 +455,10 @@
        fprintf(ofile, "\n};\n\n");
 
        fprintf(ofile,
-"static const int num_critical_sections = sizeof(critical_sections)\n"
-"                                     / sizeof(*critical_sections);\n");
+"#define NUM_CRITICAL_SECTIONS \\\n"
+"    (sizeof(critical_sections) / sizeof(*critical_sections))\n");
+       fprintf(ofile,
+"static const int num_critical_sections = NUM_CRITICAL_SECTIONS;\n");
 
        fprintf(stderr, "%s: %d instructions used\n", appname, instrcount);
 }



Home | Main Index | Thread Index | Old Index