vdev_thread_create()

Create a thread for a vdev

Synopsis:

#include <qvm/vdev-core.h>
int vdev_thread_create(const vdev_t *vdp,
                       const char *name,
                       pthread_t *thread,
                       pthread_attr_t *attr,
                       vdev_thread_create_func_t start_routine,
                       void *arg)

Arguments:

vdp
A pointer to the vdev.
name
A pointer to the name of the thread.
thread
A pointer to the location where the returned pthread_t object is to be stored.
attr
A pointer to the pthread_attr_t object to be passed to pthread_create() as the attr parameter.
start_routine
A pointer to the function to be passed to pthread_create() as the start_routine parameter.
arg
A pointer to the argument to be passed to pthread_create() as the arg parameter.

Description:

This function creates a new thread for the given vdev. The specified name is passed to pthread_setname_np() and the remaining parameters are passed to pthread_create(). For more information, see the pthread_create() entry in the C Library Reference.

Returns:

The value returned by pthread_create().

Page updated: