DragonFlyBSD/src dc676ealib/libc/gen tls.c

libc - Use sbrk() system call, remove brk() (2)

* Change the initial TLS allocation to use mmap() instead of sbrk()
  in order to maintain compatibility with older kernels.

* Using sbrk() will work with a fully updated system, but will not
  work with an old kernel because it returns an error and sets errno,
  but setting errno requires the TLS to already be installed.  So
  even though we have back-off code in libc, it seg-faults before
  it gets to it.

* Only affects a few programs in base such as 'chflags' so not a
  disaster.  But still, the intent was to maintain compatibility
  with older kernels.
DeltaFile
+16-5lib/libc/gen/tls.c
+16-51 files

UnifiedSplitRaw