Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2002 17:04:04 -0700
From:      Alfred Perlstein <bright@mu.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        arch@freebsd.org
Subject:   Re: Process/thread states.
Message-ID:  <20020827000404.GM96154@elvis.mu.org>
In-Reply-To: <Pine.BSF.4.21.0208261603020.83598-100000@InterJet.elischer.org>
References:  <Pine.BSF.4.21.0208261603020.83598-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Julian Elischer <julian@elischer.org> [020826 17:00] wrote:
> 
> Ok so I've mentionned this to a few peopel at different times and not got
> any real feedback/pushback.. time fopr a wider audience.
...
> e.g. something like: (yeah I know its messy but...):
> 
> 
>  
> #define TD_ST_SUSPQ        0x01    /* uses runq field */
> #define TD_ST_RUNQ         0x02    /* uses runq field */
> #define TD_ST_RUNNING      0x03    /* uses no (virtual) field */
> #define TD_ST_MTX          0x04    /* uses mtx field */
> #define TD_ST_RQ_MASK      0x07    /* mask of non sleep states */
> #define TD_ST_SLPQ         0x08    /* uses slpq field */
> enum thread_state {
>         TDS_UNQUEUED    = 0x00,
>         TDS_SLP         = TD_ST_SLPQ,
>         TDS_RUNQ        = TD_ST_RUNQ,
>         TDS_RUNNING     = TD_ST_RUNNING,
>         TDS_SUSPENDED   = TD_ST_SUSPQ,
>         TDS_MTX         = TD_ST_MTX,
>         TDS_SUSP_SLP    = TD_ST_SUSPQ|TD_ST_SLPQ,
>         TDS_RUN_SLP     = TD_ST_RUNNING|TD_ST_SLPQ,
>         TDS_RUNQ_SLP    = TD_ST_RUNQ|TD_ST_SLPQ, 
>         TDS_MTX_SLP     = TD_ST_MTX|TD_ST_SLPQ,
>         TDS_SWAPPING    = TD_ST_SLPQ|TD_ST_RQ_MASK + 1,
>         TDS_IWAIT,	/* needed? */
>         TDS_SURPLUS	/* needed? */
> };

This seems good, another option would be to mostly expose things 
through a functional interface, like proc_set_swapping() or something.

-Alfred

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020827000404.GM96154>