Module Name:    src
Committed By:   ryo
Date:           Mon Oct 25 07:41:41 UTC 2021

Modified Files:
        src/sys/dev/microcode/aic7xxx: aicasm.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/microcode/aic7xxx/aicasm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/microcode/aic7xxx/aicasm.c
diff -u src/sys/dev/microcode/aic7xxx/aicasm.c:1.11 src/sys/dev/microcode/aic7xxx/aicasm.c:1.12
--- src/sys/dev/microcode/aic7xxx/aicasm.c:1.11	Sat Jul 24 21:31:37 2021
+++ src/sys/dev/microcode/aic7xxx/aicasm.c	Mon Oct 25 07:41:41 2021
@@ -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 @@ output_code(void)
 	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);
 }

Reply via email to