[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Use long_natural_t in kern/task.h and kern/slab.h
From: |
Flavio Cruz |
Subject: |
[PATCH] Use long_natural_t in kern/task.h and kern/slab.h |
Date: |
Tue, 6 Dec 2022 23:57:32 -0500 |
RPC interfaces already use long_natural_t so internally we can also use
this type.
---
kern/slab.h | 10 +++++-----
kern/task.h | 14 +++++++-------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/kern/slab.h b/kern/slab.h
index 9d8a1156..1e916872 100644
--- a/kern/slab.h
+++ b/kern/slab.h
@@ -171,9 +171,9 @@ struct kmem_cache {
int flags;
size_t bufctl_dist; /* Distance from buffer to bufctl */
size_t slab_size;
- unsigned long bufs_per_slab;
- unsigned long nr_objs; /* Number of allocated objects */
- unsigned long nr_free_slabs;
+ long_natural_t bufs_per_slab;
+ long_natural_t nr_objs; /* Number of allocated objects */
+ long_natural_t nr_free_slabs;
kmem_cache_ctor_t ctor;
/* All fields below are cold */
size_t obj_size; /* User-provided size */
@@ -182,8 +182,8 @@ struct kmem_cache {
size_t buf_size; /* Aligned object size */
size_t color;
size_t color_max;
- unsigned long nr_bufs; /* Total number of buffers */
- unsigned long nr_slabs;
+ long_natural_t nr_bufs; /* Total number of buffers */
+ long_natural_t nr_slabs;
char name[KMEM_CACHE_NAME_SIZE];
size_t buftag_dist; /* Distance from buffer to buftag */
size_t redzone_pad; /* Bytes from end of object to redzone word */
diff --git a/kern/task.h b/kern/task.h
index 6251317c..7e915e02 100644
--- a/kern/task.h
+++ b/kern/task.h
@@ -115,13 +115,13 @@ struct task {
machine_task_t machine;
/* Statistics */
- natural_t faults; /* page faults counter */
- natural_t zero_fills; /* zero fill pages counter */
- natural_t reactivations; /* reactivated pages counter */
- natural_t pageins; /* actual pageins couter */
- natural_t cow_faults; /* copy-on-write faults counter */
- natural_t messages_sent; /* messages sent counter */
- natural_t messages_received; /* messages received counter */
+ long_natural_t faults; /* page faults counter */
+ long_natural_t zero_fills; /* zero fill pages counter */
+ long_natural_t reactivations; /* reactivated pages counter */
+ long_natural_t pageins; /* actual pageins couter */
+ long_natural_t cow_faults; /* copy-on-write faults counter */
+ long_natural_t messages_sent; /* messages sent counter */
+ long_natural_t messages_received; /* messages received counter */
char name[TASK_NAME_SIZE];
};
--
2.37.2
- [PATCH] Use long_natural_t in kern/task.h and kern/slab.h,
Flavio Cruz <=