summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/arch/amd64/cpu.h1
-rw-r--r--sys/include/sys/sched.h3
-rw-r--r--sys/include/sys/spinlock.h3
3 files changed, 4 insertions, 3 deletions
diff --git a/sys/include/arch/amd64/cpu.h b/sys/include/arch/amd64/cpu.h
index 6ed675e..cf073fe 100644
--- a/sys/include/arch/amd64/cpu.h
+++ b/sys/include/arch/amd64/cpu.h
@@ -58,6 +58,7 @@ struct cpu_info {
uint32_t apicid;
uint32_t feat;
uint32_t vendor; /* Vendor (see CPU_VENDOR_*) */
+ uint8_t preempt : 1; /* CPU is preemptable */
uint8_t ipi_dispatch : 1; /* 1: IPIs being dispatched */
uint8_t ipi_id;
ipi_pend_t ipi_pending[N_IPIVEC];
diff --git a/sys/include/sys/sched.h b/sys/include/sys/sched.h
index 8b0ba02..7bba9df 100644
--- a/sys/include/sys/sched.h
+++ b/sys/include/sys/sched.h
@@ -66,6 +66,9 @@ struct sched_stat {
void sched_stat(struct sched_stat *statp);
void sched_init(void);
+void sched_preempt_set(bool enable);
+bool sched_preemptable(void);
+
void sched_yield(void);
void sched_suspend(struct proc *td, const struct timeval *tv);
void sched_detach(struct proc *td);
diff --git a/sys/include/sys/spinlock.h b/sys/include/sys/spinlock.h
index 140addc..b416152 100644
--- a/sys/include/sys/spinlock.h
+++ b/sys/include/sys/spinlock.h
@@ -44,9 +44,6 @@ void spinlock_release(struct spinlock *lock);
int spinlock_try_acquire(struct spinlock *lock);
int spinlock_usleep(struct spinlock *lock, size_t usec_max);
-/* System-wide locking (be careful!!) */
-int syslock(void);
-void sysrel(void);
#endif
#endif /* !_SYS_SPINLOCK_H_ */