Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/profil.h')
-rw-r--r--winsup/cygwin/profil.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/winsup/cygwin/profil.h b/winsup/cygwin/profil.h
index a681da123..f33591d09 100644
--- a/winsup/cygwin/profil.h
+++ b/winsup/cygwin/profil.h
@@ -1,6 +1,6 @@
/* profil.h: gprof profiling header file
- Copyright 1998, 1999, 2000, 2001, 2003 Red Hat, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin.
@@ -8,6 +8,11 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+/*
+ * This file is taken from Cygwin distribution. Please keep it in sync.
+ * The differences should be within __MINGW32__ guard.
+ */
+
/* profiling frequency. (No larger than 1000) */
#define PROF_HZ 100
@@ -23,22 +28,28 @@ details. */
})
/* convert an index into an address */
-#define PROFADDR(idx, base, scale) \
- ((base) + ((((unsigned long long)(idx) << 16) / (scale)) << 1))
+#define PROFADDR(idx, base, scale) \
+ ((base) \
+ + ((((unsigned long long)(idx) << 16) \
+ / (unsigned long long)(scale)) << 1))
/* convert a bin size into a scale */
#define PROFSCALE(range, bins) (((bins) << 16) / ((range) >> 1))
typedef void *_WINHANDLE;
+#ifdef __MINGW32__
+#include <_bsd_types.h>
+#endif /* __MINGW32__*/
struct profinfo {
_WINHANDLE targthr; /* thread to profile */
_WINHANDLE profthr; /* profiling thread */
+ _WINHANDLE quitevt; /* quit event */
u_short *counter; /* profiling counters */
- u_long lowpc, highpc; /* range to be profiled */
+ size_t lowpc, highpc; /* range to be profiled */
u_int scale; /* scale value of bins */
};
-int profile_ctl(struct profinfo *, char *, size_t, u_long, u_int);
-int profil(char *, size_t, u_long, u_int);
+int profile_ctl(struct profinfo *, char *, size_t, size_t, u_int);
+int profil(char *, size_t, size_t, u_int);