On Thu, May 12, 2016 at 09:07:58PM +0200, Kamil Rytarowski wrote: > On 12.05.2016 07:37, Charles Cui wrote: > > PTHREAD_STACK_MIN (freebsd) > > I was told that this one is missing on purpose as there is no good > reason to limit it from this side and a sane minimum is PAGE_SIZE. > > Perhaps this is the way to go, to define it as it?
Posix says: {PTHREAD_STACK_MIN} Minimum size in bytes of thread stack storage. Minimum Acceptable Value: 0 but in the prefix: Runtime Invariant Values (Possibly Indeterminate) A definition of one of the symbolic constants in the following list shall be omitted from <limits.h> on specific implementations where the corresponding value is equal to or greater than the stated minimum, but is unspecified. This indetermination might depend on the amount of available memory space on a specific instance of a specific implementation. The actual value supported by a specific instance shall be provided by the sysconf() function. So we should not define it but provide the proper sysconf() as an alias for page size (or two pages)? Martin