Page MenuHomeFreeBSD

lib/libc/amd64/string: implement strsep() through strcspn()
ClosedPublic

Authored by fuz on Oct 24 2023, 4:41 AM.
Tags
None
Referenced Files
F132237638: D42346.id129275.diff
Wed, Oct 15, 2:05 AM
Unknown Object (File)
Sep 11 2025, 1:44 PM
Unknown Object (File)
Sep 11 2025, 11:27 AM
Unknown Object (File)
Sep 10 2025, 6:35 PM
Unknown Object (File)
Sep 2 2025, 11:39 AM
Unknown Object (File)
Aug 22 2025, 10:15 AM
Unknown Object (File)
Aug 14 2025, 12:01 PM
Unknown Object (File)
Jun 26 2025, 9:58 AM
Subscribers

Details

Summary

The strsep() function is basically strcspn() with extra steps.
On amd64, we now have an optimised implementation of strcspn(),
so instead of implementing the inner loop manually, just call
into the optimised routine.

Sponsored by: The FreeBSD Foundation.

Test Plan

no new test suite failures when substituting this
implementation.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable