HomeFreeBSD

fts: Add blocks support.

Description

fts: Add blocks support.

This adds an fts_open_b() variant of fts_open() which takes a block
instead of a function pointer.

This was inspired by, and is intended to be compatible with, Apple's
implementation; however, although our FTS and theirs share a common
ancestor, they have diverged significantly. That and the fact that
we still target compilers which don't support blocks means Apple's
implementation was not directly reusable.

This is the second use case for blocks in FreeBSD (the first being
qsort_b(), which we use here). This suggest we might want to add
a COMPILER_FEATURE for blocks to avoid hardcoding any further
COMPILER_TYPE checks.

MFC after: never
Relnotes: yes
Sponsored by: Klara, Inc.
Reviewed by: kevans, theraven, imp
Differential Revision: https://reviews.freebsd.org/D49877

Details

Provenance
desAuthored on Tue, Apr 22, 5:16 PM
Reviewer
kevans
Differential Revision
D49877: fts: Add blocks support.
Parents
rGccaf78c962e8: arm64: Move cpu0 dpcpu and msgbuf to the DMAP
Branches
Unknown
Tags
Unknown