Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

fsl_shw_return_t sah_add_two_d_desc ( uint32_t  header,
const uint8_t *  in1,
uint32_t  in1_length,
const uint8_t *  in2,
uint32_t  in2_length,
const sah_Mem_Util mu,
sah_Head_Desc **  desc_chain 
)

Add a descriptor with two 'data' pointers

Add descriptor where neither link needs sync

Parameters:
header The Sahara header value for the descriptor.
in1 The first input buffer (or NULL)
in1_length Size of in1
[out] in2 The second input buffer (or NULL)
in2_length Size of in2
mu Memory functions
[in,out] desc_chain Chain to start or append to
Returns:
A return code of type fsl_shw_return_t.

Definition at line 880 of file sf_util.c.

References FSL_RETURN_OK_S, sah_Append_Desc(), sah_Create_Link(), sah_Destroy_Link(), and SAH_USES_LINK_DATA.

{
      fsl_shw_return_t status = FSL_RETURN_OK_S;
      sah_Link *link1 = NULL;
      sah_Link *link2 = NULL;

      printk("Entering sah_add_two_d_desc \n");

      if (in1 != NULL) {
            status = sah_Create_Link(mu, &link1,
                               (sah_Oct_Str) in1, in1_length,
                               SAH_USES_LINK_DATA);
      }

      if ((in2 != NULL) && (status == FSL_RETURN_OK_S)) {
            status = sah_Create_Link(mu, &link2,
                               (sah_Oct_Str) in2, in2_length,
                               SAH_USES_LINK_DATA);
      }

      if (status != FSL_RETURN_OK_S) {
            if (link1 != NULL) {
                  sah_Destroy_Link(mu, link1);
            }
            if (link2 != NULL) {
                  sah_Destroy_Link(mu, link2);
            }
      } else {
            status = sah_Append_Desc(mu, desc_chain, header, link1, link2);
      }

      return status;
}                       /* sah_add_two_d_desc() */


Generated by  Doxygen 1.6.0   Back to index