3 ms·
As PHK points out [0] qsort was imported [1] into the kernel in 1995, it was simply never used for the boot process, but it is availible. [0]: https://twitter.
by erk__ 3y ago
As PHK points out [0] qsort was imported [1] into the kernel in 1995, it was simply never used for the boot process, but it is availible.
[0]: https://twitter.com/bsdphk/status/1659568675899228163 https://twitter.com/bsdphk/status/1659568675899228163
[1]: https://github.com/freebsd/freebsd-src/commit/d89a1b600fc07174b854f76aaddffe475e65ef36#diff-5d3389cd135876e0a2f899d06b38c59d40d8736ed57eae6989bad02fb92263c3 https://github.com/freebsd/freebsd-src/commit/d89a1b600fc071...
- canucker2016 3y agoLooks like the code to bubble-sort the SYSINIT objects was committed a few months BEFORE this kernel qsort code was committed (late Aug 1995 vs early Nov 1995). So that's why the sort-SYSINIT objects code didn't use qsort. I'd also guess that there were fewer SYSINIT objects to sort back in 1995 than today. see ~line 150 of sys/kern/init_main.c in https://github.com/freebsd/freebsd-src/commit/2b14f991e64ebe31ca31a1a41237061c22a753d0#diff-892b418520675d603d352b09af1db41d918281f57aa0042b4d76d7a94fb8d2d1 https://github.com/freebsd/freebsd-src/commit/2b14f991e64ebe...