From dc064fbaf3e7a79fe80c06259fbf0ffed69bb936 Mon Sep 17 00:00:00 2001 From: bde Date: Wed, 28 Aug 1996 20:15:32 +0000 Subject: Cleaned up interrupt masking by declaring the state variable in a machine-dependent macro and passing it to all machine-dependent macros. Eliminated the state variable for the GUPROF case. --- lib/libc/gmon/mcount.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/libc/gmon') diff --git a/lib/libc/gmon/mcount.c b/lib/libc/gmon/mcount.c index 44d36d1..b44af99 100644 --- a/lib/libc/gmon/mcount.c +++ b/lib/libc/gmon/mcount.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id: mcount.c,v 1.5 1995/12/30 07:01:50 bde Exp $"; + "$Id: mcount.c,v 1.6 1996/05/02 08:43:37 phk Exp $"; #endif #include @@ -79,8 +79,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */ register struct gmonparam *p; register long toindex; #ifdef KERNEL - register int s; /* XXX */ - u_long save_eflags; /* XXX */ + MCOUNT_DECL(s) #endif p = &_gmonparam; @@ -93,7 +92,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */ return; #endif #ifdef KERNEL - MCOUNT_ENTER; + MCOUNT_ENTER(s); #else p->state = GMON_PROF_BUSY; #endif @@ -261,7 +260,7 @@ skip_guprof_stuff: } done: #ifdef KERNEL - MCOUNT_EXIT; + MCOUNT_EXIT(s); #else p->state = GMON_PROF_ON; #endif @@ -269,7 +268,7 @@ done: overflow: p->state = GMON_PROF_ERROR; #ifdef KERNEL - MCOUNT_EXIT; + MCOUNT_EXIT(s); #endif return; } -- cgit v1.1