diff options
author | Julian Elischer <julian@FreeBSD.org> | 2002-08-23 20:13:22 +0000 |
---|---|---|
committer | Julian Elischer <julian@FreeBSD.org> | 2002-08-23 20:13:22 +0000 |
commit | 7ed56cf2833dc580320d70c4965ad0fa079abc66 (patch) | |
tree | 31186de5e9c18d9770bc980f9283815ef2318988 /sys | |
parent | 7d151849d04701bef68d921f5fe4fae273fd782d (diff) | |
download | src-7ed56cf2833dc580320d70c4965ad0fa079abc66.tar.gz src-7ed56cf2833dc580320d70c4965ad0fa079abc66.zip |
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.
Notes
Notes:
svn path=/head/; revision=102327
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/proc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 95875770dde6..0fc94815cb11 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) */ |