Scroll to navigation

MINIASYNC_VDM_THREADS(7) MINIASYNC Programmer's Manual MINIASYNC_VDM_THREADS(7)

NAME

miniasync_vdm_threads - virtual data mover implementation for miniasync using system threads

SYNOPSIS

#include <libminiasync.h>
    

For general description of virtual data mover API, see miniasync(7).

DESCRIPTION

Thread data mover is a thread-based implementation of the virtual data mover. Operations submitted to a thread data mover instance are queued and then executed by one of the working threads that has taken an operation off the queue. Working threads of each thread data mover instance are put to sleep until there’s a data mover operation to execute.

When the future is polled for the first time the data mover operation will be queued for asynchronous execution on one of the working threads associated with the instance of thread data mover.

Each thread data mover instance uses an internal ringbuffer for allocations associated with data mover operations.

To create a new thread data mover instance, use data_mover_threads_new(3) or data_mover_threads_default(3) function.

Thread data mover supports following operations:

vdm_memcpy(3) - memory copy operation
vdm_memmove(3) - memory move operation
vdm_memset(3) - memory set operation

Thread data mover supports following notifier types:

FUTURE_NOTIFIER_NONE - no notifier
FUTURE_NOTIFIER_WAKER - waker

For more information about notifiers, see miniasync_future(7).

For more information about the usage of thread data mover API, see examples directory in miniasync repository <https://github.com/pmem/miniasync>.

EXAMPLE

Example usage of default thread data mover vdm_memcpy(3) operation:

struct data_mover_threads *dmt = data_mover_threads_default();
struct vdm *thread_mover = data_mover_threads_get_vdm(dmt);
struct vdm_memcpy_future memcpy_fut =

vdm_memcpy(thread_mover, dest, src, copy_size, 0);

SEE ALSO

data_mover_threads_default(3), data_mover_threads_get_vdm(3), data_mover_threads_new(3), vdm_memcpy(3), vdm_memmove(3), vdm_memset(3), miniasync(7), miniasync_future(7), miniasync_vdm(7) and <https://pmem.io>

2022-09-04 MINIASYNC - miniasync version 0.2.1