Moved ckprogs behind LFS_CKPROGS ifdef
So just like ckreads, ckprogs is now opt-in, requiring both 1. defining
LFS_CKPROGS at compile-time, and 2. passing the LFS_M_CKPROGS flag
during lfsr_mount.
_Unlike_ ckreads, ckprogs is actually a very lightweight feature. So the
difference between compiling with/without ckprogs is really quite small:
code stack
before: 36480 2680
yes-ckprogs: 36480 (+0.0%) 2680 (+0.0%)
no-ckprogs: 36428 (-0.1%) 2680 (+0.0%)
It's almost not worth putting behind an ifdef if not for consistency
with ckreads.
This commit is contained in:
+9
-3
@@ -138,10 +138,16 @@ extern "C"
|
||||
|
||||
|
||||
// Some ifdef conveniences
|
||||
#ifdef LFS_CKREADS
|
||||
#define LFS_IFDEF_CKREADS(a, b) a
|
||||
#ifdef LFS_CKPROGS
|
||||
#define LFS_IFDEF_CKPROGS(a, b) (a)
|
||||
#else
|
||||
#define LFS_IFDEF_CKREADS(a, b) b
|
||||
#define LFS_IFDEF_CKPROGS(a, b) (b)
|
||||
#endif
|
||||
|
||||
#ifdef LFS_CKREADS
|
||||
#define LFS_IFDEF_CKREADS(a, b) (a)
|
||||
#else
|
||||
#define LFS_IFDEF_CKREADS(a, b) (b)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user