Commit a4b65d0
Andreas Molzer
Add constructor of IoUring from raw FD (#288)
* Add constructor of IoUring from raw FD
The user must communicate the parameters utilized with its construction
out-of-band but can otherwise use an existing file descriptor. The
library will then map the existing ring's queues. This permits using a
pre-opened file descriptor such as one shared by a parent process, or
one stashed away to be kept open in systemd's file descriptor store.
Keeping a ring open can allow its operations to complete despite the
writer's process dying unexpectedly. Additionally, another process might
register a personality (IORING_REGISTER_PERSONALITY) to be used as means
of effective access controls for operations that must avoid confused
deputy scenarios. A ring opened by a parent might also have pre-existing
trusted restrictions (IORING_REGISTER_RESTRICTIONS) applied to it.
Note that this is _not_ an implementation of `IORING_SETUP_ATTACH_WQ` or
of a multi-issuer submission queue.
* Make parameters repr-transparent, add safety note1 parent 02a27c9 commit a4b65d0
1 file changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
84 | 99 | | |
85 | 100 | | |
86 | 101 | | |
| |||
103 | 118 | | |
104 | 119 | | |
105 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
106 | 126 | | |
107 | 127 | | |
108 | 128 | | |
| |||
149 | 169 | | |
150 | 170 | | |
151 | 171 | | |
152 | | - | |
153 | | - | |
154 | 172 | | |
155 | 173 | | |
156 | 174 | | |
| |||
0 commit comments