version 1.14, 2001/07/01 18:06:12 |
version 1.15, 2003/01/18 09:53:20 |
|
|
/* $NetBSD$ */ |
/* $NetBSD$ */ |
|
|
/*- |
/*- |
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. |
* Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc. |
* All rights reserved. |
* All rights reserved. |
* |
* |
* This code is derived from software contributed to The NetBSD Foundation |
* This code is derived from software contributed to The NetBSD Foundation |
* by Ross Harvey and Jason R. Thorpe. |
* by Ross Harvey, Jason R. Thorpe, and Nathan J. Williams. |
* |
* |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* modification, are permitted provided that the following conditions |
|
|
#include "opt_lockdebug.h" |
#include "opt_lockdebug.h" |
#endif |
#endif |
|
|
|
struct sched_param { |
|
int sched_priority; |
|
}; |
|
|
/* |
/* |
* Posix defines a <sched.h> which may want to include <sys/sched.h> |
* Scheduling policies required by IEEE Std 1003.1-2001 |
*/ |
*/ |
|
#define SCHED_OTHER 0 /* Behavior can be FIFO or RR, or not */ |
|
#define SCHED_FIFO 1 |
|
#define SCHED_RR 2 |
|
|
|
/* Other nonstandard policies: */ |
|
|
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) && \ |
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) && \ |
!defined(_ANSI_SOURCE) |
!defined(_ANSI_SOURCE) |
|
|
#define SLPQUE_TABLESIZE 128 |
#define SLPQUE_TABLESIZE 128 |
#define SLPQUE_LOOKUP(x) (((u_long)(x) >> 8) & (SLPQUE_TABLESIZE - 1)) |
#define SLPQUE_LOOKUP(x) (((u_long)(x) >> 8) & (SLPQUE_TABLESIZE - 1)) |
struct slpque { |
struct slpque { |
struct proc *sq_head; |
struct lwp *sq_head; |
struct proc **sq_tailp; |
struct lwp **sq_tailp; |
}; |
}; |
|
|
/* |
/* |
|
|
*/ |
*/ |
#define RUNQUE_NQS 32 |
#define RUNQUE_NQS 32 |
struct prochd { |
struct prochd { |
struct proc *ph_link; |
struct lwp *ph_link; |
struct proc *ph_rlink; |
struct lwp *ph_rlink; |
}; |
}; |
|
|
/* |
/* |
Line 196 extern __volatile u_int32_t sched_whichq |
|
Line 205 extern __volatile u_int32_t sched_whichq |
|
struct proc; |
struct proc; |
struct cpu_info; |
struct cpu_info; |
|
|
void schedclock(struct proc *p); |
void schedclock(struct lwp *p); |
void sched_wakeup(void *); |
void sched_wakeup(void *); |
void roundrobin(struct cpu_info *); |
void roundrobin(struct cpu_info *); |
|
|