diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-18 17:39:15 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-18 17:39:15 +0300 |
| commit | f9e23e6e41068d63d42f950941c3d2fc155ef21c (patch) | |
| tree | f548be5eab98389108dbd52b69eae413800405da /src/bits.c | |
| parent | f952391ee86f42d7606b2d3791931aba746a7aca (diff) | |
| download | kmi-f9e23e6e41068d63d42f950941c3d2fc155ef21c.tar.gz kmi-f9e23e6e41068d63d42f950941c3d2fc155ef21c.zip | |
add ipc_tail()
+ ipc_kick() does a forward and a tail at the same time
The idea with ipc_tail() is to allow 'trusted' calls, so for example a
process is not allowed to willy-nilly open a file, as it has to go via
init(), making the eid 1. This way the receiver can know that the
request has gone through init() and can open up a new connection
(file, whatever) after which requests from that pid/tid are allowed
without init() intervention
Diffstat (limited to 'src/bits.c')
| -rw-r--r-- | src/bits.c | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -17,7 +17,13 @@ __weak uint16_t __bswap16(const uint16_t u) return (u & 0xff00) >> 8 | (u & 0x00ff) << 8; } -uint16_t __bswaphi2(uint16_t u) +/** + * Wrapper for gcc builtins, if arch doesn't have it. + * + * @param u Value to byteswap. + * @return \p u byteswapped. + */ +__used uint16_t __bswaphi2(uint16_t u) { return __bswap16(u); } @@ -29,7 +35,13 @@ __weak uint32_t __bswap32(const uint32_t u) (u & 0x0000ff00) << 8 | (u & 0x000000ff) << 24; } -uint32_t __bswapsi2(uint32_t u) +/** + * Wrapper for gcc builtins, if arch doesn't have it. + * + * @param u Value to byteswap. + * @return \p u byteswapped. + */ +__used uint32_t __bswapsi2(uint32_t u) { return __bswap32(u); } @@ -47,7 +59,13 @@ __weak uint64_t __bswap64(const uint64_t u) (u & 0x00000000000000ffULL) << 56; } -uint64_t __bswapdi2(uint64_t u) +/** + * Wrapper for gcc builtins, if arch doesn't have it. + * + * @param u Value to byteswap. + * @return \p u byteswapped. + */ +__used uint64_t __bswapdi2(uint64_t u) { return __bswap64(u); } |
