Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm."
authorHans Petter Selasky <hselasky@FreeBSD.org>
Thu, 20 Apr 2023 16:50:32 +0000 (18:50 +0200)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Thu, 20 Apr 2023 17:16:14 +0000 (19:16 +0200)
commitbb8e8e230d94c9522bd9ff95c13dc9f5b1592929
treee4f7129f28214731cbaf16558ae4ea345f08661d
parent8fe4f8f7a75f3f6d1fc52e31a6d25a112d4644fd
Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm."

Some points for the future:
 - libc is not the right place for sorting algorithms.
   Probably libutil is better suited for this purpose or
   a dedicated libsort. Should move all sorting algorithms
   away from libc eventually.
 - CheriBSD uses capabilities for memory access, and could
   benefit from a standard memswap() function.
 - Do something about qsort() in FreeBSD's libc like:
   - Mark it deprecated on FreeBSD, as a first step,
     due to missing limits on CPU time.
   - Audit the use of qsort() in the FreeBSD base system
     and consider swapping to other existing sorting
     algorithms.

Discussed with: brooks@

Differential Revision: https://reviews.freebsd.org/D36493

This reverts commit a7469c9c0a504a5e6e9b89e148cd78df5e67ff7f.
This reverts commit 7d65a450cdcc7cc743f2ecd114ba3428a21c0033.
This reverts commit 8dcf3a82c54cb216df3213a013047907636a01da.
include/stdlib.h
lib/libc/stdlib/Makefile.inc
lib/libc/stdlib/Symbol.map
lib/libc/stdlib/bsort.3 [deleted file]
lib/libc/stdlib/bsort.c [deleted file]
lib/libc/stdlib/bsort_r.c [deleted file]
lib/libc/stdlib/bsort_s.c [deleted file]