Implement BSD calculations

- load_avg, recent_cpu, priority calculations
- reduce frac bits to 14
- ignore thread_set_priority when BSD enabled
This commit is contained in:
2024-10-16 22:50:46 +01:00
parent a7a6d0b9d4
commit c5e41db9b0
3 changed files with 71 additions and 42 deletions

View File

@@ -8,7 +8,7 @@ typedef struct
} fp32_t;
/* Fixed Point Arithmetic bit count constants */
#define NUM_FRAC_BITS 20
#define NUM_FRAC_BITS 14
#define NUM_INT_BITS (31 - NUM_FRAC_BITS)
#define CONVERSION_CONST (1 << NUM_FRAC_BITS) /* f = 2^q, (2^20) */