Date: Sun, 2 Apr 2000 16:12:18 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Alfred Perlstein <bright@wintelcom.net> Cc: current@FreeBSD.ORG Subject: Re: cvs commit: src/sys/i386/i386 support.s src/sys/kern init_sysent.c kern_prot.c kern_sig.c Message-ID: <200004022312.QAA51299@apollo.backplane.com> References: <200004021752.KAA13175@freefall.freebsd.org> <20000402163552.P21029@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
:Along with snagging the "easy ones" for MP safeness, shouldn't getpid :be MP safe? The struct proc is allocated from the proc_zone, and :afaik zalloc allows for stable storage meaning it's safe to dereference :the ppid pointer once the entire struct proc is populated, which needs :to happen before the process can even call getpid(). : :phk seems to agree. : :-- :-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] :"I have the heart of a child; I keep it in a jar on my desk." The problem is that getpid() also extracts the ppid (look at the syscall code), which is not MP safe. -Matt Matthew Dillon <dillon@backplane.com> 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?200004022312.QAA51299>