Skip to content

Commit

Permalink
Added lfsr_rid/bid/mid/did_t types, tried using types more consistently
Browse files Browse the repository at this point in the history
Adopted lfsr_rid/bid/mid/did_t where appropriate. This includes using
lfsr_rid_t for tag/rbyd weights. Although I am using lfsr_srid_t for
rbyd weights now, since it both captures the use of the sign bit and
reduces the number of casts a bit in the code.

I learned recently Zig has any-bit integers (e.g. uint31_t), and I'm
realizing how nice it would be to have those in this codebase.

Also tried to use lfs_size_t/lfs_off_t more correctly. In Linux/BSD,
only off_t is used for file-size-related operations and is usually much
larger than size_t. These were used interchangably in littlefs and their
original meaning kind of fell by the wayside. Getting their use right
will be important if littlefs ever supports different integer widths.
  • Loading branch information
geky committed Sep 13, 2023
1 parent 1af433f commit 327d967
Show file tree
Hide file tree
Showing 4 changed files with 387 additions and 378 deletions.
Loading

0 comments on commit 327d967

Please sign in to comment.