-/* $OpenBSD: cpu.h,v 1.32 2008/06/26 05:42:08 ray Exp $ */
+/* $OpenBSD: cpu.h,v 1.33 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.45 2000/08/21 02:03:12 thorpej Exp $ */
/*-
ci->ci_want_resched = 1; \
aston(curcpu()); \
} while (/*CONSTCOND*/0)
+#define clear_resched(ci) (ci)->ci_want_resched = 0
#else
#define need_resched(ci) \
do { \
curcpu()->ci_want_resched = 1; \
aston(curcpu()); \
} while (/*CONSTCOND*/0)
+#define clear_resched(ci) curcpu()->ci_want_resched = 0
#endif
/*
-/* $OpenBSD: cpu.h,v 1.36 2008/06/10 02:55:39 weingart Exp $ */
+/* $OpenBSD: cpu.h,v 1.37 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
* or after the current trap/syscall if in system mode.
*/
extern void need_resched(struct cpu_info *);
+#define clear_resched(ci) (ci)->ci_want_resched = 0
#if defined(MULTIPROCESSOR)
-/* $OpenBSD: cpu.h,v 1.18 2007/08/14 15:18:07 deraadt Exp $ */
+/* $OpenBSD: cpu.h,v 1.19 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.34 2003/06/23 11:01:08 martin Exp $ */
/*
*/
extern int want_resched; /* resched() was called */
#define need_resched(ci) (want_resched = 1, setsoftast())
+#define clear_resched(ci) want_resched = 0
/*
* Give a profiling tick to the current process when the user profiling
-/* $OpenBSD: cpu.h,v 1.35 2007/11/02 19:18:54 martin Exp $ */
+/* $OpenBSD: cpu.h,v 1.36 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.28 1998/02/13 07:41:51 scottr Exp $ */
/*
*/
extern int want_resched; /* resched() was called */
#define need_resched(ci) { want_resched = 1; aston(); }
+#define clear_resched(ci) want_resched = 0
/*
* Give a profiling tick to the current process when the user profiling
-/* $OpenBSD: cpu.h,v 1.53 2008/07/14 13:39:06 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.54 2008/07/18 23:43:31 art Exp $ */
/*
* Copyright (c) 2000-2004 Michael Shalayeff
#define signotify(p) (setsoftast())
#define need_resched(ci) (want_resched = 1, setsoftast())
+#define clear_resched(ci) want_resched = 0
#define need_proftick(p) setsoftast()
#define PROC_PC(p) ((p)->p_md.md_regs->tf_iioq_head)
-/* $OpenBSD: cpu.h,v 1.11 2007/05/16 19:37:06 thib Exp $ */
+/* $OpenBSD: cpu.h,v 1.12 2008/07/18 23:43:31 art Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
#define signotify(p) (setsoftast())
#define need_resched(ci) (want_resched = 1, setsoftast())
+#define clear_resched(ci) want_resched = 0
#define need_proftick(p) setsoftast()
#ifndef _LOCORE
-/* $OpenBSD: cpu.h,v 1.102 2008/06/09 20:43:43 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.103 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
* or after the current trap/syscall if in system mode.
*/
extern void need_resched(struct cpu_info *);
+#define clear_resched(ci) (ci)->ci_want_resched = 0
#define CLKF_USERMODE(frame) USERMODE((frame)->if_cs, (frame)->if_eflags)
#define CLKF_PC(frame) ((frame)->if_eip)
-/* $OpenBSD: cpu.h,v 1.34 2008/01/13 20:20:29 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.35 2008/07/18 23:43:31 art Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* Copyright (c) 1992, 1993
if (ci->ci_curproc != NULL) \
aston(ci->ci_curproc); \
} while (0)
+#define clear_resched(ci) (ci)->ci_want_resched = 0
/*
* Give a profiling tick to the current process when the user profiling
-/* $OpenBSD: cpu.h,v 1.46 2007/11/02 19:18:54 martin Exp $ */
+/* $OpenBSD: cpu.h,v 1.47 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.45 1997/02/10 22:13:40 scottr Exp $ */
/*
*/
extern int want_resched; /* resched() was called */
#define need_resched(ci) { want_resched = 1; aston(); }
+#define clear_resched(ci) want_resched = 0
/*
* Give a profiling tick to the current process from the softclock
-/* $OpenBSD: cpu.h,v 1.24 2008/04/07 22:37:16 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.25 2008/07/18 23:43:31 art Exp $ */
/*-
* Copyright (c) 1992, 1993
* or after the current trap/syscall if in system mode.
*/
#define need_resched(info) { want_resched = 1; aston(); }
+#define clear_resched(ci) want_resched = 0
/*
* Give a profiling tick to the current process when the user profiling
-/* $OpenBSD: cpu.h,v 1.27 2007/05/30 17:10:44 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.28 2008/07/18 23:43:31 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
*/
extern int want_resched;
#define need_resched(ci) { want_resched = 1; aston(); }
+#define clear_resched(ci) want_resched = 0
/*
* Give a profiling tick to the current process when the user profiling
-/* $OpenBSD: cpu.h,v 1.37 2008/05/04 20:54:22 drahn Exp $ */
+/* $OpenBSD: cpu.h,v 1.38 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */
/*
if (ci->ci_curproc != NULL) \
aston(ci->ci_curproc); \
} while (0)
+#define clear_resched(ci) (ci)->ci_want_resched = 0
#define need_proftick(p) aston(p)
-/* $OpenBSD: cpu.h,v 1.13 2008/05/21 19:45:37 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.14 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.41 2006/01/21 04:24:12 uwe Exp $ */
/*-
if (curproc != NULL) \
aston(curproc); \
} while (/*CONSTCOND*/0)
+#define clear_resched(ci) want_resched = 0
/*
* Give a profiling tick to the current process when the user profiling
-/* $OpenBSD: cpu.h,v 1.29 2007/05/08 07:23:18 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.30 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.24 1997/03/15 22:25:15 pk Exp $ */
/*
*/
extern int want_resched; /* resched() was called */
#define need_resched(ci) (want_resched = 1, want_ast = 1)
+#define clear_resched(ci) want_resched = 0
extern int want_ast;
/*
-/* $OpenBSD: cpu.h,v 1.62 2008/07/04 22:03:30 kettenis Exp $ */
+/* $OpenBSD: cpu.h,v 1.63 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */
/*
* or after the current trap/syscall if in system mode.
*/
extern void need_resched(struct cpu_info *);
+#define clear_resched(ci) (ci)->ci_want_resched = 0
/*
* This is used during profiling to integrate system time.
-/* $OpenBSD: cpu.h,v 1.26 2007/10/10 15:53:53 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.27 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: cpu.h,v 1.41 1999/10/21 20:01:36 ragge Exp $ */
/*
want_resched++; \
mtpr(AST_OK,PR_ASTLVL); \
}
+#define clear_resched(ci) want_resched = 0
/*
* Notify the current process (p) that it has a signal pending,
-/* $OpenBSD: sched_bsd.c,v 1.16 2008/05/22 14:07:14 thib Exp $ */
+/* $OpenBSD: sched_bsd.c,v 1.17 2008/07/18 23:43:31 art Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
p->p_stat = SONPROC;
}
+ clear_resched(curcpu());
+
SCHED_ASSERT_LOCKED();
/*