Julian Elischer wrote:
> On Fri, 6 Jul 2001, Daniel Eischen wrote:
> > 
>     ->proc->
> >   ->thrgrp->
> >   ->thr->
> >   ->thrctx->
> > 
> interesting, though the thrctx maps most closely to a userland thread.
> there may be many threads running on each #3.

IMHO, I like this less than kse/kseg/ksec/proc.  Remember.. these are
not thread specific.. they can be used to implement aio etc as well.

The KSE paper's definitions of things are pretty clear.  If we're not
going to use something netbsd compatable, then IMHO we should stick to
the design paper.

The only variation that I think I'd find appealing would be to try
and make the kseg/ksec difference stand out more.  ksegrp/ksectx is less
likely to be confused at a casual glance.

I'm not really sure that we can use the 'struct lwp' name in a compatable
way with NetBSD.  It would be even worse if we both had 'struct lwp'
but ours was different to theirs.

Have a good look at: http://people.freebsd.org/~peter/sa1.diff
This was generated from NetBSD's netbsd_sa branch a while ago.
It shows the linkage between struct proc and struct lwp pretty clearly.
-int    sys_exit(struct proc *, void *, register_t *);
+int    sys_exit(struct lwp *, void *, register_t *);

-sys_execve(struct proc *p, void *v, register_t *retval)
+sys_execve(struct lwp *l, void *v, register_t *retval)
        struct sys_execve_args /* {
                syscallarg(const char *)        path;
                syscallarg(char * const *)      argp;
@@ -315,8 +316,9 @@
        int                     error, i;
        struct exec_package     pack;
        struct nameidata        nid;
        struct vattr            attr;
+       struct proc             *p;
        struct ucred            *cred;
        char                    *argp;
        char * const            *cpp;
        char                    *dp, *sp;
@@ -328,8 +330,9 @@
        char                    **tmpfap;
        int                     szsigcode;
        struct exec_vmcmd       *base_vcp;
+       p = l->l_proc;
        cred = p->p_ucred;
        base_vcp = NULL;
         * Init the namei data to point the file user's program name.

... etc...

Look for these in particular:
Index: sys/sys/lwp.h
Index: sys/sys/proc.h
Index: sys/sys/sa.h
Index: sys/sys/savar.h

If we dont do similar structure member naming, then there is no point
using the same structure names as that will just increase the confusion.

NetBSD's structure is different too.. They have implelemted both
Solaris-style LWP's and SA's over the top of the same low level entity.

"All of this is for nothing if we don't go to the stars" - JMS/B5

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to