sync with OpenBSD -current

This commit is contained in:
purplerain 2024-01-15 03:18:19 +00:00
parent 60ea4113ce
commit 25aa71bc5f
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
6 changed files with 56 additions and 21 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: sched.h,v 1.67 2023/10/24 13:20:11 claudio Exp $ */
/* $OpenBSD: sched.h,v 1.69 2024/01/14 17:23:56 cheloha Exp $ */
/* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */
/*-
@ -69,8 +69,6 @@
#ifndef _SYS_SCHED_H_
#define _SYS_SCHED_H_
#include <sys/queue.h>
/*
* Posix defines a <sched.h> which may want to include <sys/sched.h>
*/
@ -88,6 +86,17 @@
#define CP_IDLE 5
#define CPUSTATES 6
struct cpustats {
uint64_t cs_time[CPUSTATES]; /* CPU state statistics */
uint64_t cs_flags; /* see below */
};
#define CPUSTATS_ONLINE 0x0001 /* CPU is schedulable */
#ifdef _KERNEL
#include <sys/queue.h>
#define SCHED_NQS 32 /* 32 run queues. */
struct clockintr;
@ -124,15 +133,6 @@ struct schedstate_percpu {
u_char spc_smrgp; /* this CPU's view of grace period */
};
struct cpustats {
uint64_t cs_time[CPUSTATES]; /* CPU state statistics */
uint64_t cs_flags; /* see below */
};
#define CPUSTATS_ONLINE 0x0001 /* CPU is schedulable */
#ifdef _KERNEL
/* spc_flags */
#define SPCF_SEENRR 0x0001 /* process has seen roundrobin() */
#define SPCF_SHOULDYIELD 0x0002 /* process should yield the CPU */