Skip to content

Commit

Permalink
Merge branch 'upstream-EVPath' into ThreadTest
Browse files Browse the repository at this point in the history
* upstream-EVPath:
  EVPath 2020-06-11 (342508eb)
  • Loading branch information
eisenhauer committed Jun 11, 2020
2 parents 24f66ad + 4567af3 commit bf02720
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions thirdparty/EVPath/EVPath/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,15 @@ INT_CMget_contact_list(CManager cm)
return (cm->contact_lists[0]);
}

extern attr_list
INT_CMderef_and_copy_list(CManager cm, attr_list attrs)
{
// done inside the CM lock, so a safe way to convert a shared list to an owned list
attr_list ret = attr_copy_list(attrs);
free_attr_list(attrs);
return ret;
}

extern attr_list
INT_CMget_specific_contact_list(CManager cm, attr_list attrs)
{
Expand Down
1 change: 1 addition & 0 deletions thirdparty/EVPath/EVPath/cm_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ void *INT_CMCondition_get_client_data(CManager cm, int condition);
int INT_CMCondition_wait(CManager cm, int condition);
extern void INT_CMCondition_fail(CManager cm, int condition);
extern attr_list INT_CMget_contact_list(CManager cm);
extern attr_list INT_CMderef_and_copy_list(CManager cm, attr_list attrs);
extern void INT_CMregister_non_CM_message_handler(int header, CMNonCMHandler handler);
extern void *INT_CMtake_buffer(CManager cm, void *data);
extern void INT_CMreturn_buffer(CManager cm, void *data);
Expand Down
9 changes: 9 additions & 0 deletions thirdparty/EVPath/EVPath/evpath.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ CM_insert_contact_info (CManager cm, attr_list attrs);
extern attr_list
CMget_specific_contact_list (CManager cm, attr_list attrs);

/*!
* get a thread-owned version of a shared attribute list in a thread-safe way
* \param cm the CManager which owns the attribute list.
* \param attrs the shared attribute list (from CMget_contact list, etc.)
* \return a single-owner contact list
*/
extern attr_list
CMderef_and_copy_list(CManager cm, attr_list attrs);

/*!
* check to see if this is contact information for <b>this</b> CM.
*
Expand Down

0 comments on commit bf02720

Please sign in to comment.