mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
Kernel: Make makedev()/minor()/major() static
This was originally done in7274037
and for some reason reverted in740140a
. This avoids "multiple definitions" link errors and fixes the libuv port.
This commit is contained in:
parent
0fba71a655
commit
f3aa87c436
1 changed files with 3 additions and 3 deletions
|
@ -92,9 +92,9 @@ typedef struct __pthread_condattr_t {
|
|||
int clockid; // clockid_t
|
||||
} pthread_condattr_t;
|
||||
|
||||
inline dev_t makedev(unsigned major, unsigned minor) { return (minor & 0xffu) | (major << 8u) | ((minor & ~0xffu) << 12u); }
|
||||
inline unsigned int major(dev_t dev) { return (dev & 0xfff00u) >> 8u; }
|
||||
inline unsigned int minor(dev_t dev) { return (dev & 0xffu) | ((dev >> 12u) & 0xfff00u); }
|
||||
static inline dev_t makedev(unsigned major, unsigned minor) { return (minor & 0xffu) | (major << 8u) | ((minor & ~0xffu) << 12u); }
|
||||
static inline unsigned int major(dev_t dev) { return (dev & 0xfff00u) >> 8u; }
|
||||
static inline unsigned int minor(dev_t dev) { return (dev & 0xffu) | ((dev >> 12u) & 0xfff00u); }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue