string-list: make string_list_sort() reentrant
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 12 repliesIn review
- v13 patches 12 repliesSuperseded
Changes in v2 from the cover letter
* Renamed HAVE_QSORT_S to HAVE_ISO_QSORT_S in Makefile to disambiguate.
* Added basic perf test (patch 3).
* Converted a second caller to QSORT_S, in ref-filter.c (patch 5).
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | compat: add qsort_s()Makefile compat/ git-compat-util.h | +83 | 0 replies | |
| 2/5 | add QSORT_Sgit-compat-util.h | +5 | 0 replies | |
| 3/5 | perf: add basic sort performance testt/ t/ | +51 | 0 replies | |
| 4/5 | string-list: use QSORT_S in string_list_sort()string-list.c | +5 | 0 replies | |
| 5/5 | ref-filter: use QSORT_S in ref_array_sort()ref-filter.c | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/5] string-list: make string_list_sort() reentrant
Use qsort_s() from C11 Annex K to make string_list_sort() safer, in particular when called from parallel threads.
Changes from v1:
* Renamed HAVE_QSORT_S to HAVE_ISO_QSORT_S in Makefile to disambiguate.
* Added basic perf test (patch 3).
* Converted a second caller to QSORT_S, in ref-filter.c (patch 5).
compat: add qsort_s()
add QSORT_S
perf: add basic sort performance test
string-list: use QSORT_S in string_list_sort()
ref-filter: use QSORT_S in ref_array_sort()
Makefile | 8 ++++++ compat/qsort_s.c | 69 +++++++++++++++++++++++++++++++++++++++++++++ git-compat-util.h | 11 ++++++++ ref-filter.c | 6 ++-- string-list.c | 13 ++++----- t/helper/test-string-list.c | 25 ++++++++++++++++ t/perf/p0071-sort.sh | 26 +++++++++++++++++ 7 files changed, 146 insertions(+), 12 deletions(-) create mode 100644 compat/qsort_s.c create mode 100755 t/perf/p0071-sort.sh
Signature · 1 line
2.11.0