This source file includes following definitions.
- mca_btl_vader_send
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #include "opal_config.h"
25
26 #include "btl_vader.h"
27 #include "btl_vader_frag.h"
28 #include "btl_vader_fifo.h"
29 #include "btl_vader_fbox.h"
30
31
32
33
34
35
36
37 int mca_btl_vader_send (struct mca_btl_base_module_t *btl,
38 struct mca_btl_base_endpoint_t *endpoint,
39 struct mca_btl_base_descriptor_t *descriptor,
40 mca_btl_base_tag_t tag)
41 {
42 mca_btl_vader_frag_t *frag = (mca_btl_vader_frag_t *) descriptor;
43 const size_t total_size = frag->segments[0].seg_len;
44
45
46
47 frag->base.des_flags |= MCA_BTL_DES_SEND_ALWAYS_CALLBACK;
48
49
50 frag->hdr->len = total_size;
51
52 frag->hdr->tag = tag;
53
54
55 if (opal_list_get_size (&endpoint->pending_frags) || !vader_fifo_write_ep (frag->hdr, endpoint)) {
56 frag->base.des_flags |= MCA_BTL_DES_SEND_ALWAYS_CALLBACK;
57 OPAL_THREAD_LOCK(&endpoint->pending_frags_lock);
58 opal_list_append (&endpoint->pending_frags, (opal_list_item_t *) frag);
59 if (!endpoint->waiting) {
60 OPAL_THREAD_LOCK(&mca_btl_vader_component.lock);
61 opal_list_append (&mca_btl_vader_component.pending_endpoints, &endpoint->super);
62 OPAL_THREAD_UNLOCK(&mca_btl_vader_component.lock);
63 endpoint->waiting = true;
64 }
65 OPAL_THREAD_UNLOCK(&endpoint->pending_frags_lock);
66 return OPAL_SUCCESS;
67 }
68
69 return OPAL_SUCCESS;
70
71 #if 0
72 if ((frag->hdr->flags & MCA_BTL_VADER_FLAG_SINGLE_COPY) ||
73 !(frag->base.des_flags & MCA_BTL_DES_FLAGS_BTL_OWNERSHIP)) {
74 frag->base.des_flags |= MCA_BTL_DES_SEND_ALWAYS_CALLBACK;
75
76 return OPAL_SUCCESS;
77 }
78
79
80
81 return 1;
82 #endif
83 }