Date: Fri, 06 Jul 2001 19:43:42 -0700 From: Peter Wemm <peter@wemm.org> To: Julian Elischer <julian@elischer.org> Cc: Daniel Eischen <eischen@vigrid.com>, John Baldwin <jhb@FreeBSD.ORG>, current@FreeBSD.ORG, Jason Evans <jasone@canonware.com> Subject: Re: RFC: Kernel thread system nomenclature. Message-ID: <20010707024342.35F64380F@overcee.netplex.com.au> In-Reply-To: <Pine.BSF.4.21.0107061957110.35249-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010707024342.35F64380F>