.\" Automatically generated by Pandoc 2.17.1.1 .\" .TH "DATA_MOVER_THREADS_NEW" "3" "2022-09-04" "MINIASYNC - miniasync version 0.2.1" "MINIASYNC Programmer's Manual" .hy .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright 2020-2022, Intel Corporation .SH NAME .PP \f[B]data_mover_threads_new\f[R](), \f[B]data_mover_threads_delete\f[R](), \f[B]data_mover_threads_default\f[R]() - allocate, free or allocate with default parameters threads data mover structure .SH SYNOPSIS .IP .nf \f[C] #include enum future_notifier_type { FUTURE_NOTIFIER_NONE, FUTURE_NOTIFIER_WAKER, FUTURE_NOTIFIER_POLLER, }; struct data_mover_threads; struct data_mover_threads *data_mover_threads_new(size_t nthreads, size_t ringbuf_size, enum future_notifier_type desired_notifier); void data_mover_threads_delete(struct data_mover_threads *dmt); struct data_mover_threads *data_mover_threads_default(); \f[R] .fi .PP For general description of thread data mover API, see \f[B]miniasync_vdm_threads\f[R](7). .SH DESCRIPTION .PP The \f[B]data_mover_threads_new\f[R]() function allocates and initializes a new thread data mover structure. This function spawns \f[I]nthreads\f[R] working threads during initialization. Each thread data mover instance creates an internal ringuffer with size \f[I]ringbuf_size\f[R] bytes, it is needed for allocations associated with data mover operations. \f[I]desired_notifier\f[R] parameter specifies the notifier type that should be used. .PP The \f[B]data_mover_threads_default\f[R]() function allocates and initialzied a new thread data mover structure with default parameters. It spanws \f[I]12\f[R] threads and creates a ringbuffer with size of \f[I]128\f[R] bytes. .PP Currently, thread data mover supports following notifier types: .IP \[bu] 2 \f[B]FUTURE_NOTIFIER_NONE\f[R] .IP \[bu] 2 \f[B]FUTURE_NOTIFIER_WAKER\f[R] .PP For more information about notifiers, see \f[B]miniasync_future\f[R](7). .PP The \f[B]data_mover_threads_delete\f[R]() function frees and finalizes the synchronous data mover structure pointed by \f[I]dms\f[R]. Spawned threads are cleaned up during finalization. .SH RETURN VALUE .PP \f[B]data_mover_threads_new\f[R]() and data_mover_threads_default functions return a pointer to \f[I]struct data_mover_sync\f[R] structure or \f[B]NULL\f[R] if the allocation or initialization failed. .PP The \f[B]data_mover_threads_delete\f[R]() function does not return any value. .SH SEE ALSO .PP \f[B]miniasync\f[R](7), \f[B]miniasync_future\f[R](7), \f[B]miniasync_vdm_threads\f[R](7) and \f[B]\f[R]