summaryrefslogtreecommitdiffstats
path: root/sys/libkern
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-14 05:09:48 +0000
committerbde <bde@FreeBSD.org>1998-07-14 05:09:48 +0000
commit55ddae5a80992ccb5383ea0c6f2f7055694716b7 (patch)
tree7658bd93d378ee99a6ee447cba3e12c7e55ab765 /sys/libkern
parent95415c676d9622fd2a2dda4dea047790c204c1eb (diff)
downloadFreeBSD-src-55ddae5a80992ccb5383ea0c6f2f7055694716b7.zip
FreeBSD-src-55ddae5a80992ccb5383ea0c6f2f7055694716b7.tar.gz
Changed to the C9x draft spelling of the (unsigned) integral type
suitable for holding object pointers (ptrint_t -> uintptr_t). Added corresponding signed type (intptr_t). Changed/added corresponding non-C9x types for function pointers to match. Don't use nonstandard types to implement these types, and don't comment on them in <machine/types.h>.
Diffstat (limited to 'sys/libkern')
-rw-r--r--sys/libkern/mcount.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/libkern/mcount.c b/sys/libkern/mcount.c
index 233fe3c..6199729 100644
--- a/sys/libkern/mcount.c
+++ b/sys/libkern/mcount.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: mcount.c,v 1.12 1997/02/22 09:39:55 peter Exp $";
#endif
#include <sys/param.h>
@@ -70,7 +70,7 @@ void user __P((void));
* perform this optimization.
*/
_MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
- register fptrint_t frompc, selfpc;
+ register uintfptr_t frompc, selfpc;
{
#ifdef GUPROF
int delta;
@@ -108,9 +108,9 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
*/
if (frompci >= p->textsize) {
if (frompci + p->lowpc
- >= (fptrint_t)(VM_MAXUSER_ADDRESS + UPAGES * PAGE_SIZE))
+ >= (uintfptr_t)(VM_MAXUSER_ADDRESS + UPAGES * PAGE_SIZE))
goto done;
- frompci = (fptrint_t)user - p->lowpc;
+ frompci = (uintfptr_t)user - p->lowpc;
if (frompci >= p->textsize)
goto done;
}
@@ -155,12 +155,12 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
* exceptions appear in the call graph as calls from btrap() and
* bintr() instead of calls from all over.
*/
- if ((fptrint_t)selfpc >= (fptrint_t)btrap
- && (fptrint_t)selfpc < (fptrint_t)eintr) {
- if ((fptrint_t)selfpc >= (fptrint_t)bintr)
- frompci = (fptrint_t)bintr - p->lowpc;
+ if ((uintfptr_t)selfpc >= (uintfptr_t)btrap
+ && (uintfptr_t)selfpc < (uintfptr_t)eintr) {
+ if ((uintfptr_t)selfpc >= (uintfptr_t)bintr)
+ frompci = (uintfptr_t)bintr - p->lowpc;
else
- frompci = (fptrint_t)btrap - p->lowpc;
+ frompci = (uintfptr_t)btrap - p->lowpc;
}
#endif /* KERNEL */
@@ -267,13 +267,13 @@ MCOUNT
#ifdef GUPROF
void
mexitcount(selfpc)
- fptrint_t selfpc;
+ uintfptr_t selfpc;
{
struct gmonparam *p;
- fptrint_t selfpcdiff;
+ uintfptr_t selfpcdiff;
p = &_gmonparam;
- selfpcdiff = selfpc - (fptrint_t)p->lowpc;
+ selfpcdiff = selfpc - (uintfptr_t)p->lowpc;
if (selfpcdiff < p->textsize) {
int delta;
OpenPOWER on IntegriCloud