summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-08-23 20:13:22 +0000
committerjulian <julian@FreeBSD.org>2002-08-23 20:13:22 +0000
commit5aae4c8ba0a6ae2d92988170f5c9761f10ac5e3a (patch)
tree31186de5e9c18d9770bc980f9283815ef2318988 /sys
parent7e209156e9246f621a97df363d99ce0d574b138e (diff)
downloadFreeBSD-src-5aae4c8ba0a6ae2d92988170f5c9761f10ac5e3a.zip
FreeBSD-src-5aae4c8ba0a6ae2d92988170f5c9761f10ac5e3a.tar.gz
Add the complex state TDS_SUSP_SLP.
This state is to allow some experimentation and not YET used.. The theory is that a thread that is about to sleep is placed on the sleep queue and then discovers it should suspend, and is placed on suspend queue. (these are separate queues and it can be on both). It will not become runnable until it has been removed from BOTH queues. i.e. a wakeup event has occured AND the process has been unsuspended. If it were not on the sleep queue when suspended, then the (possibly only) wakeup event might arrive and not find any process to wake up. this would result in the thread sleeping 'forever' when the suspension is lifted. This state will transition to one of TDS_SLP or TDS_SUSPENDED, depending upon which constraint is lifted first.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/proc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 9587577..0fc9481 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -307,7 +307,8 @@ struct thread {
TDS_SUSPENDED, /* would have liked to have run */
TDS_IWAIT,
TDS_SURPLUS,
- TDS_SWAPPED
+ TDS_SWAPPED,
+ TDS_SUSP_SLP /* on sleep queue AND suspend queue */
} td_state;
struct callout td_slpcallout; /* (h) Callout for sleep. */
struct trapframe *td_frame; /* (k) */
OpenPOWER on IntegriCloud