[newlib-cygwin/main] libgloss: i386: cygmon-gmon.c: make moncontrol() visible to its users
Jeff Johnston
jjohnstn@sourceware.org
Mon Nov 3 20:33:25 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ca2276cc2334219920b69b395e9dca1742a410e4
commit ca2276cc2334219920b69b395e9dca1742a410e4
Author: Vincent Mailhol <mailhol@kernel.org>
Date: Mon Nov 3 15:28:59 2025 -0500
libgloss: i386: cygmon-gmon.c: make moncontrol() visible to its users
Diff:
---
libgloss/i386/cygmon-gmon.c | 50 ++++++++++++++++++++++-----------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/libgloss/i386/cygmon-gmon.c b/libgloss/i386/cygmon-gmon.c
index 7d0697852..88bdf251c 100644
--- a/libgloss/i386/cygmon-gmon.c
+++ b/libgloss/i386/cygmon-gmon.c
@@ -92,6 +92,31 @@ static int s_scale;
extern int errno;
+/*
+ * Control profiling
+ * profiling is what mcount checks to see if
+ * all the data structures are ready.
+ */
+void
+moncontrol(int mode)
+{
+ if (mode)
+ {
+ /* start */
+ profil((unsigned short *)(sbuf + sizeof(struct phdr)),
+ ssiz - sizeof(struct phdr),
+ (int)s_lowpc, s_scale);
+
+ profiling = 0;
+ }
+ else
+ {
+ /* stop */
+ profil((unsigned short *)0, 0, 0, 0);
+ profiling = 3;
+ }
+}
+
int
monstartup(lowpc, highpc)
char *lowpc;
@@ -338,28 +363,3 @@ overflow:
write (2, TOLIMIT, sizeof(TOLIMIT));
goto out;
}
-
-/*
- * Control profiling
- * profiling is what mcount checks to see if
- * all the data structures are ready.
- */
-moncontrol(mode)
- int mode;
-{
- if (mode)
- {
- /* start */
- profil((unsigned short *)(sbuf + sizeof(struct phdr)),
- ssiz - sizeof(struct phdr),
- (int)s_lowpc, s_scale);
-
- profiling = 0;
- }
- else
- {
- /* stop */
- profil((unsigned short *)0, 0, 0, 0);
- profiling = 3;
- }
-}
More information about the Newlib-cvs
mailing list