Brought back the lfsr_mptr_t

This is just a useful type to have to make the code a bit more
readable.

This doesn't affect the code that much, except we are making more
on-stack copies of mptrs since the mdir doesn't technically contain
a mutable mptr. Maybe this should change?

            code          stack
  before:  30768           2496
  after:   30776 (+0.0%)   2504 (+0.3%)
This commit is contained in:
Christopher Haster
2023-11-21 13:53:15 -06:00
parent bc8d54f9e0
commit a8f54fb1e0
3 changed files with 89 additions and 85 deletions
+5 -1
View File
@@ -383,6 +383,10 @@ typedef struct lfsr_bptr {
typedef lfsr_rbyd_t lfsr_btree_t;
typedef struct lfsr_mptr {
lfs_block_t blocks[2];
} lfsr_mptr_t;
typedef struct lfsr_mdir {
lfsr_smid_t mid;
union {
@@ -573,7 +577,7 @@ typedef struct lfsr_mtree {
lfsr_smid_t weight;
struct {
lfsr_smid_t weight;
lfs_block_t blocks[2];
lfsr_mptr_t mptr;
} mptr;
lfsr_btree_t btree;
} u;