1IBV_ALLOC_TD(3)         Libibverbs Programmer's Manual         IBV_ALLOC_TD(3)
2
3
4

NAME

6       ibv_alloc_td(),  ibv_dealloc_td()  -  allocate  and  deallocate  thread
7       domain object
8

SYNOPSIS

10       #include <infiniband/verbs.h>
11
12       struct ibv_td *ibv_alloc_td(struct ibv_context *context,
13                                   struct ibv_td_init_attr *init_attr);
14
15       int ibv_dealloc_td(struct ibv_td *td);
16

DESCRIPTION

18       ibv_alloc_td() allocates a thread domain object  for  the  RDMA  device
19       context context.
20
21       The  thread  domain object defines how the verbs libraries and provider
22       will use locks and additional hardware  capabilities  to  achieve  best
23       performance  for handling multi-thread or single-thread protection.  An
24       application assigns verbs resources to a thread domain when it  creates
25       a verbs object.
26
27       If  the  ibv_td object is specified then any objects created under this
28       thread domain will disable internal locking designed to protect against
29       concurrent access to that object from multiple user threads. By default
30       all verbs objects are safe for multi-threaded access, whether or not  a
31       thread domain is specified.
32
33       A  struct  ibv_td  can  be  added to a parent domain via ibv_alloc_par‐
34       ent_domain() and then the parent domain can be  used  to  create  verbs
35       objects.
36
37       ibv_dealloc_td()  will  deallocate the thread domain td.  All resources
38       created with the td should be destroyed prior to deallocating the td.
39

RETURN VALUE

41       ibv_alloc_td() returns a pointer to the allocated struct ibv_td object,
42       or  NULL  if  the request fails (and sets errno to indicate the failure
43       reason).
44
45       ibv_dealloc_td() returns 0 on success, or the value of errno on failure
46       (which indicates the failure reason).
47

SEE ALSO

49       ibv_alloc_parent_domain(3),
50

AUTHORS

52       Alex Rosenbaum <alexr@mellanox.com>
53
54       Yishai Hadas <yishaih@mellanox.com>
55
56
57
58libibverbs                        2017-11-06                   IBV_ALLOC_TD(3)
Impressum