From owner-freebsd-current Fri Jul 6 19:43:48 2001 Delivered-To: freebsd-current@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id 802A237B401; Fri, 6 Jul 2001 19:43:42 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f672hgM70270; Fri, 6 Jul 2001 19:43:42 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 35F64380F; Fri, 6 Jul 2001 19:43:42 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Julian Elischer Cc: Daniel Eischen , John Baldwin , current@FreeBSD.ORG, Jason Evans Subject: Re: RFC: Kernel thread system nomenclature. In-Reply-To: Date: Fri, 06 Jul 2001 19:43:42 -0700 From: Peter Wemm Message-Id: <20010707024342.35F64380F@overcee.netplex.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. eg: -int sys_exit(struct proc *, void *, register_t *); +int sys_exit(struct lwp *, void *, register_t *); ... int -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. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message