Date: Tue, 8 Jul 2014 23:07:27 +0200 From: Jilles Tjoelker <jilles@stack.nl> To: Bryan Drewery <bdrewery@FreeBSD.org> Cc: arch@FreeBSD.org Subject: Re: sys/proc.h inclusion of sys/time.h Message-ID: <20140708210727.GA63071@stack.nl> In-Reply-To: <53BC4F49.7000903@FreeBSD.org> References: <53BC4F49.7000903@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 08, 2014 at 03:06:33PM -0500, Bryan Drewery wrote: > In r34924 sys/proc.h was changed to only include sys/time.h if not > building in kernel. > [snip] > (Why am I doing this? I need PID_MAX and NO_PID for a tcpdump change I > am testing that is intended for upstreaming. Perhaps I can use > kern.pid_max in __FreeBSD__ and other hacks on other platforms, I have > not yet decided on this.) The kern.pid_max sysctl is mostly intended for running FreeBSD 1.0 binaries, which have a 16-bit pid_t. Therefore, it is run-time adjustable and existing processes may have a pid higher than its value. Ideally, you do not need PID_MAX and NO_PID; try to use a variable of type pid_t only for a process ID and store flags elsewhere. There may be a problem if you need to read pid_t from an internal structure or message, though. -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140708210727.GA63071>