Skip to content

Commit 69292a3

Browse files
authored
Merge pull request #113 from KaiNorberg/develop
Develop
2 parents dd205f8 + 75613ba commit 69292a3

71 files changed

Lines changed: 531 additions & 560 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

include/kernel/cpu/ipi.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ typedef struct ipi_chip
5656
*/
5757
typedef struct
5858
{
59-
void* private;
59+
void* data;
6060
} ipi_func_data_t;
6161

6262
/**
@@ -73,7 +73,7 @@ typedef void (*ipi_func_t)(ipi_func_data_t* data);
7373
typedef struct ipi
7474
{
7575
ipi_func_t func;
76-
void* private;
76+
void* data;
7777
} ipi_t;
7878

7979
/**
@@ -158,15 +158,15 @@ uint64_t ipi_chip_amount(void);
158158
* @param cpu The specified CPU, check `ipi_flags_t`.
159159
* @param flags The flags for how to send the IPI.
160160
* @param func The function to execute on target CPU(s).
161-
* @param private The private data to pass to the function, will be found in `irq_func_data_t->private`.
161+
* @param private The private data to pass to the function, will be found in `irq_func_data_t->data`.
162162
* @return On success, `0`. On failure, `ERR` and `errno` is set to:
163163
* - `EINVAL`: Invalid parameters.
164164
* - `ENODEV`: No IPI chip is registered.
165165
* - `ENOSYS`: The registered IPI chip does not have a `notify` function.
166166
* - `EBUSY`: The target CPU's IPI queue is full, some or all IPIs could not be sent.
167167
* - Other errors returned by the IPI chip's `notify` function.
168168
*/
169-
uint64_t ipi_send(cpu_t* cpu, ipi_flags_t flags, ipi_func_t func, void* private);
169+
uint64_t ipi_send(cpu_t* cpu, ipi_flags_t flags, ipi_func_t func, void* data);
170170

171171
/**
172172
* @brief Wake up one or more CPUs.

include/kernel/cpu/irq.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef struct
6464
{
6565
interrupt_frame_t* frame;
6666
irq_virt_t virt;
67-
void* private;
67+
void* data;
6868
} irq_func_data_t;
6969

7070
/**
@@ -79,7 +79,7 @@ typedef struct
7979
{
8080
list_entry_t entry;
8181
irq_func_t func;
82-
void* private;
82+
void* data;
8383
irq_virt_t virt;
8484
} irq_handler_t;
8585

@@ -127,7 +127,7 @@ typedef struct irq_domain
127127
{
128128
list_entry_t entry;
129129
irq_chip_t* chip;
130-
void* private;
130+
void* data;
131131
irq_phys_t start; ///< Inclusive
132132
irq_phys_t end; ///< Exclusive
133133
} irq_domain_t;
@@ -222,14 +222,14 @@ uint64_t irq_virt_set_affinity(irq_virt_t virt, cpu_t* cpu);
222222
* @param chip The IRQ chip to register.
223223
* @param start The start of the physical IRQ range.
224224
* @param end The end of the physical IRQ range.
225-
* @param private Private data for the IRQ chip, will be found in `irq_t->domain->private`.
225+
* @param private Private data for the IRQ chip, will be found in `irq_t->domain->data`.
226226
* @return On success, `0`. On failure, `ERR` and `errno` is set to:
227227
* - `EINVAL`: Invalid parameters.
228228
* - `EEXIST`: A chip with a domain overlapping the given range is already registered.
229229
* - `ENOMEM`: Memory allocation failed.
230230
* - Other errors as returned by the IRQ chip's `enable` function.
231231
*/
232-
uint64_t irq_chip_register(irq_chip_t* chip, irq_phys_t start, irq_phys_t end, void* private);
232+
uint64_t irq_chip_register(irq_chip_t* chip, irq_phys_t start, irq_phys_t end, void* data);
233233

234234
/**
235235
* @brief Unregister all instances of the given IRQ chip within the specified range.
@@ -265,7 +265,7 @@ uint64_t irq_chip_amount(void);
265265
* - `ENOMEM`: Memory allocation failed.
266266
* - Other errors as returned by the IRQ chip's `enable` function.
267267
*/
268-
uint64_t irq_handler_register(irq_virt_t virt, irq_func_t func, void* private);
268+
uint64_t irq_handler_register(irq_virt_t virt, irq_func_t func, void* data);
269269

270270
/**
271271
* @brief Unregister an IRQ handler.

include/kernel/cpu/regs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define XCR0_ZMM16_32_ENABLE (1 << 7)
1212

1313
#define MSR_LAPIC 0x1B
14-
#define MSR_IA32_TSC_AUX 0xC0000103
14+
#define MSR_TSC_AUX 0xC0000103
1515
#define MSR_EFER 0xC0000080
1616
#define MSR_STAR 0xC0000081
1717
#define MSR_LSTAR 0xC0000082

include/kernel/drivers/abstract/fb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ typedef struct fb
7676
{
7777
char name[MAX_PATH];
7878
const fb_ops_t* ops;
79-
void* private;
79+
void* data;
8080
dentry_t* dir;
8181
list_t files;
8282
} fb_t;
@@ -89,7 +89,7 @@ typedef struct fb
8989
* @param private Private data for the framebuffer.
9090
* @return On success, the new framebuffer. On failure, `NULL` and `errno` is set.
9191
*/
92-
fb_t* fb_new(const char* name, const fb_ops_t* ops, void* private);
92+
fb_t* fb_new(const char* name, const fb_ops_t* ops, void* data);
9393

9494
/**
9595
* @brief Frees a framebuffer.

include/kernel/fs/dentry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ typedef struct dir_ctx
110110
*/
111111
bool (*emit)(dir_ctx_t* ctx, const char* name, ino_t number, itype_t type);
112112
size_t pos; ///< The current position in the directory, can be used to skip entries.
113-
void* private; ///< Private data that the filesystem can use to conveniently pass data.
113+
void* data; ///< Private data that the filesystem can use to conveniently pass data.
114114
size_t index; ///< An index that the filesystem can use for its own purposes.
115115
} dir_ctx_t;
116116

@@ -162,7 +162,7 @@ typedef struct dentry
162162
list_t children;
163163
superblock_t* superblock;
164164
const dentry_ops_t* ops;
165-
void* private;
165+
void* data;
166166
struct dentry* next; ///< Next dentry in the dentry cache hash bucket.
167167
_Atomic(uint64_t) mountCount; ///< Number of mounts targeting this dentry.
168168
rcu_entry_t rcu; ///< RCU entry for deferred cleanup.

include/kernel/fs/devfs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void devfs_init(void);
3939
* @param private Private data to store in the inode of the new directory, can be `NULL`.
4040
* @return On success, the new devfs directory. On failure, `NULL` and `errno` is set.
4141
*/
42-
dentry_t* devfs_dir_new(dentry_t* parent, const char* name, const inode_ops_t* inodeOps, void* private);
42+
dentry_t* devfs_dir_new(dentry_t* parent, const char* name, const inode_ops_t* inodeOps, void* data);
4343

4444
/**
4545
* @brief Create a new file inside a mounted devfs instance.
@@ -52,7 +52,7 @@ dentry_t* devfs_dir_new(dentry_t* parent, const char* name, const inode_ops_t* i
5252
* @return On success, the new devfs file. On failure, `NULL` and `errno` is set.
5353
*/
5454
dentry_t* devfs_file_new(dentry_t* parent, const char* name, const inode_ops_t* inodeOps, const file_ops_t* fileOps,
55-
void* private);
55+
void* data);
5656

5757
/**
5858
* @brief Create a new symbolic link inside a mounted devfs instance.
@@ -63,7 +63,7 @@ dentry_t* devfs_file_new(dentry_t* parent, const char* name, const inode_ops_t*
6363
* @param private Private data to store in the inode of the new symbolic link, can be `NULL`.
6464
* @return On success, the new devfs symbolic link. On failure, `NULL` and `errno` is set.
6565
*/
66-
dentry_t* devfs_symlink_new(dentry_t* parent, const char* name, const inode_ops_t* inodeOps, void* private);
66+
dentry_t* devfs_symlink_new(dentry_t* parent, const char* name, const inode_ops_t* inodeOps, void* data);
6767

6868
/**
6969
* @brief Descriptor for batch file creation.
@@ -74,7 +74,7 @@ typedef struct devfs_file_desc
7474
const char* name; ///< Name of the file, `NULL` marks end of array.
7575
const inode_ops_t* inodeOps; ///< Inode operations, can be `NULL`.
7676
const file_ops_t* fileOps; ///< File operations, can be `NULL`.
77-
void* private; ///< Private data to store in the inode of the file.
77+
void* data; ///< Private data to store in the inode of the file.
7878
} devfs_file_desc_t;
7979

8080
/**

include/kernel/fs/file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typedef struct file
4343
inode_t* inode;
4444
path_t path;
4545
const file_ops_t* ops;
46-
void* private;
46+
void* data;
4747
} file_t;
4848

4949
/**

include/kernel/fs/filesystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ typedef struct filesystem
6565
* @param private Private data for the filesystem's mount function.
6666
* @return On success, the root dentry of the mounted filesystem. On failure, `NULL` and `errno` is set.
6767
*/
68-
dentry_t* (*mount)(filesystem_t* fs, const char* details, void* private);
68+
dentry_t* (*mount)(filesystem_t* fs, const char* details, void* data);
6969
} filesystem_t;
7070

7171
/**s

include/kernel/fs/inode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ typedef struct inode
5858
time_t modifyTime; ///< Unix time stamp for last file content alteration.
5959
time_t changeTime; ///< Unix time stamp for the last file metadata alteration.
6060
time_t createTime; ///< Unix time stamp for the inode creation.
61-
void* private;
61+
void* data;
6262
superblock_t* superblock;
6363
const inode_ops_t* ops;
6464
const file_ops_t* fileOps;

include/kernel/fs/namespace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ bool namespace_rcu_traverse(namespace_t* ns, mount_t** mount, dentry_t** dentry)
136136
* - Other errors as returned by the filesystem's `mount()` operation or `mount_new()`.
137137
*/
138138
mount_t* namespace_mount(namespace_t* ns, path_t* target, filesystem_t* fs, const char* options, mode_t mode,
139-
void* private);
139+
void* data);
140140

141141
/**
142142
* @brief Bind a source path to a target path in a namespace.

0 commit comments

Comments
 (0)