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

@@ -25,6 +25,10 @@ typedef int tid_t;
#define PRI_DEFAULT 31 /* Default priority. */
#define PRI_MAX 63 /* Highest priority. */
#define NICE_MIN -20 /* Lowest niceness. */
#define NICE_DEFAULT 0 /* Default niceness. */
#define NICE_MAX 20 /* Highest niceness. */
/* A kernel thread or user process.
Each thread structure is stored in its own 4 kB page. The