@@ -267,10 +267,10 @@ VALUE rb_fiber_scheduler_io_selectv(VALUE scheduler, int argc, VALUE *argv);
267267 * Non-blocking read from the passed IO.
268268 *
269269 * @param[in] scheduler Target scheduler.
270- * @param[out] io An io object to read from.
271- * @param[out ] buffer Return buffer.
272- * @param[in] length Requested number of bytes to read.
273- * @param[in] offset The offset in the buffer to read to .
270+ * @param[in] io An io object to read from.
271+ * @param[in ] buffer The buffer to read to .
272+ * @param[in] length The minimum number of bytes to read.
273+ * @param[in] offset The offset in the buffer to read from .
274274 * @retval RUBY_Qundef `scheduler` doesn't have `#io_read`.
275275 * @return otherwise What `scheduler.io_read` returns `[-errno, size]`.
276276 */
@@ -280,9 +280,9 @@ VALUE rb_fiber_scheduler_io_read(VALUE scheduler, VALUE io, VALUE buffer, size_t
280280 * Non-blocking write to the passed IO.
281281 *
282282 * @param[in] scheduler Target scheduler.
283- * @param[out] io An io object to write to.
284- * @param[in] buffer What to write.
285- * @param[in] length Number of bytes to write.
283+ * @param[in] io An io object to write to.
284+ * @param[in] buffer The buffer to write from .
285+ * @param[in] length The minimum number of bytes to write.
286286 * @param[in] offset The offset in the buffer to write from.
287287 * @retval RUBY_Qundef `scheduler` doesn't have `#io_write`.
288288 * @return otherwise What `scheduler.io_write` returns `[-errno, size]`.
@@ -293,10 +293,10 @@ VALUE rb_fiber_scheduler_io_write(VALUE scheduler, VALUE io, VALUE buffer, size_
293293 * Non-blocking read from the passed IO at the specified offset.
294294 *
295295 * @param[in] scheduler Target scheduler.
296- * @param[out] io An io object to read from.
297- * @param[in] from The offset in the given IO to read the data from.
298- * @param[out ] buffer The buffer to read the data to.
299- * @param[in] length Requested number of bytes to read.
296+ * @param[in] io An io object to read from.
297+ * @param[in] from The offset to read from.
298+ * @param[in ] buffer The buffer to read to.
299+ * @param[in] length The minimum number of bytes to read.
300300 * @param[in] offset The offset in the buffer to read to.
301301 * @retval RUBY_Qundef `scheduler` doesn't have `#io_read`.
302302 * @return otherwise What `scheduler.io_read` returns.
@@ -307,10 +307,10 @@ VALUE rb_fiber_scheduler_io_pread(VALUE scheduler, VALUE io, rb_off_t from, VALU
307307 * Non-blocking write to the passed IO at the specified offset.
308308 *
309309 * @param[in] scheduler Target scheduler.
310- * @param[out] io An io object to write to.
311- * @param[in] from The offset in the given IO to write the data to.
312- * @param[in] buffer The buffer to write the data from.
313- * @param[in] length Number of bytes to write.
310+ * @param[in] io An io object to write to.
311+ * @param[in] from The offset to write to.
312+ * @param[in] buffer The buffer to write from.
313+ * @param[in] length The minimum number of bytes to write.
314314 * @param[in] offset The offset in the buffer to write from.
315315 * @retval RUBY_Qundef `scheduler` doesn't have `#io_write`.
316316 * @return otherwise What `scheduler.io_write` returns.
@@ -321,27 +321,55 @@ VALUE rb_fiber_scheduler_io_pwrite(VALUE scheduler, VALUE io, rb_off_t from, VAL
321321 * Non-blocking read from the passed IO using a native buffer.
322322 *
323323 * @param[in] scheduler Target scheduler.
324- * @param[out] io An io object to read from.
325- * @param[out ] buffer Return buffer .
326- * @param[in] size Size of the return buffer .
327- * @param[in] length Requested number of bytes to read.
324+ * @param[in] io An io object to read from.
325+ * @param[in ] base The memory to read to .
326+ * @param[in] size Size of the memory .
327+ * @param[in] length The minimum number of bytes to read.
328328 * @retval RUBY_Qundef `scheduler` doesn't have `#io_read`.
329329 * @return otherwise What `scheduler.io_read` returns.
330330 */
331- VALUE rb_fiber_scheduler_io_read_memory (VALUE scheduler, VALUE io, void *buffer , size_t size, size_t length);
331+ VALUE rb_fiber_scheduler_io_read_memory (VALUE scheduler, VALUE io, void *base , size_t size, size_t length);
332332
333333/* *
334334 * Non-blocking write to the passed IO using a native buffer.
335335 *
336336 * @param[in] scheduler Target scheduler.
337- * @param[out] io An io object to write to.
338- * @param[in] buffer What to write.
339- * @param[in] size Size of the buffer.
340- * @param[in] length Number of bytes to write.
337+ * @param[in] io An io object to write to.
338+ * @param[in] base The memory to write from.
339+ * @param[in] size Size of the memory.
340+ * @param[in] length The minimum number of bytes to write.
341+ * @retval RUBY_Qundef `scheduler` doesn't have `#io_write`.
342+ * @return otherwise What `scheduler.io_write` returns.
343+ */
344+ VALUE rb_fiber_scheduler_io_write_memory (VALUE scheduler, VALUE io, const void *base, size_t size, size_t length);
345+
346+ /* *
347+ * Non-blocking pread from the passed IO using a native buffer.
348+ *
349+ * @param[in] scheduler Target scheduler.
350+ * @param[in] io An io object to read from.
351+ * @param[in] from The offset to read from.
352+ * @param[in] base The memory to read to.
353+ * @param[in] size Size of the memory.
354+ * @param[in] length The minimum number of bytes to read.
355+ * @retval RUBY_Qundef `scheduler` doesn't have `#io_read`.
356+ * @return otherwise What `scheduler.io_read` returns.
357+ */
358+ VALUE rb_fiber_scheduler_io_pread_memory (VALUE scheduler, VALUE io, rb_off_t from, void *base, size_t size, size_t length);
359+
360+ /* *
361+ * Non-blocking pwrite to the passed IO using a native buffer.
362+ *
363+ * @param[in] scheduler Target scheduler.
364+ * @param[in] io An io object to write to.
365+ * @param[in] from The offset to write from.
366+ * @param[in] base The memory to write from.
367+ * @param[in] size Size of the memory.
368+ * @param[in] length The minimum number of bytes to write.
341369 * @retval RUBY_Qundef `scheduler` doesn't have `#io_write`.
342370 * @return otherwise What `scheduler.io_write` returns.
343371 */
344- VALUE rb_fiber_scheduler_io_write_memory (VALUE scheduler, VALUE io, const void *buffer , size_t size, size_t length);
372+ VALUE rb_fiber_scheduler_io_pwrite_memory (VALUE scheduler, VALUE io, rb_off_t from, const void *base , size_t size, size_t length);
345373
346374/* *
347375 * Non-blocking close the given IO.
0 commit comments