summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/cpu.h
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2000-09-07 01:33:02 +0000
committerjasone <jasone@FreeBSD.org>2000-09-07 01:33:02 +0000
commit769e0f974d8929599ba599ac496510fffc90ff34 (patch)
tree9387522900085835de81e7830e570ef3f6b3ea80 /sys/amd64/include/cpu.h
parentacf1927de02afda4855ec278b1128fd9446405ea (diff)
downloadFreeBSD-src-769e0f974d8929599ba599ac496510fffc90ff34.zip
FreeBSD-src-769e0f974d8929599ba599ac496510fffc90ff34.tar.gz
Major update to the way synchronization is done in the kernel. Highlights
include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
Diffstat (limited to 'sys/amd64/include/cpu.h')
-rw-r--r--sys/amd64/include/cpu.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h
index ffabf7f..18822b8 100644
--- a/sys/amd64/include/cpu.h
+++ b/sys/amd64/include/cpu.h
@@ -46,6 +46,7 @@
#include <machine/psl.h>
#include <machine/frame.h>
#include <machine/segments.h>
+#include <machine/globals.h>
/*
* definitions of cpu-dependent requirements
@@ -86,7 +87,9 @@
* added, we will have an atomicy problem. The type of atomicy we need is
* a non-locked orl.
*/
-#define need_resched() do { astpending = AST_RESCHED|AST_PENDING; } while (0)
+#define need_resched() do { \
+ PCPU_SET(astpending, AST_RESCHED|AST_PENDING); \
+} while (0)
#define resched_wanted() (astpending & AST_RESCHED)
/*
@@ -109,8 +112,9 @@
* it off (asynchronous need_resched() conflicts are not critical).
*/
#define signotify(p) aston()
-
-#define aston() do { astpending |= AST_PENDING; } while (0)
+#define aston() do { \
+ PCPU_SET(astpending, astpending | AST_PENDING); \
+} while (0)
#define astoff()
/*
@@ -135,7 +139,9 @@
#ifdef _KERNEL
extern char btext[];
extern char etext[];
+#ifndef intr_nesting_level
extern u_char intr_nesting_level;
+#endif
void fork_trampoline __P((void));
void fork_return __P((struct proc *, struct trapframe));
OpenPOWER on IntegriCloud