Fwd: [RFC] Kernel shared variables
John Baldwin
jhb at freebsd.org
Tue Jun 5 15:02:18 UTC 2012
On Tuesday, June 05, 2012 9:07:08 am Dag-Erling Smørgrav wrote:
> John Baldwin <jhb at freebsd.org> writes:
> > I think this is an important question actually. Is there anything
> > that really needs to be here besides gettimeofday()? I mean, is there
> > any real-world application that needs to call getpid() or getppid() a
> > bunch of times?
>
> Yes, for fork detection when accessing resources shared between
> descendants of the process that allocated them.
So you call getpid() on each access to a shared resource?
--
John Baldwin
More information about the freebsd-arch
mailing list