mirror of
https://github.com/gluster/glusterfs.git
synced 2026-02-05 15:48:40 +01:00
Add local definition of cds_list_add_tail_rcu for liburcu-0.7
Change-Id: Ifd7364aaf83665689dd297bbeb4ee4aeaece744c
This commit is contained in:
@@ -1101,7 +1101,10 @@ fi
|
||||
|
||||
dnl Check for userspace-rcu
|
||||
PKG_CHECK_MODULES([URCU], [liburcu-bp])
|
||||
PKG_CHECK_MODULES([URCU_CDS], [liburcu-cds])
|
||||
PKG_CHECK_MODULES([URCU_CDS], [liburcu-cds >= 0.8], [],
|
||||
[PKG_CHECK_MODULES([URCU_CDS], [liburcu-cds >= 0.7],
|
||||
[AC_DEFINE(URCU_0_7, 1, [Define if liburcu 0.7 is found])],
|
||||
[AC_MSG_ERROR([liburcu >= 0.7 required])])])
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
# end enable debug section
|
||||
|
||||
@@ -1081,4 +1081,21 @@ glusterd_add_brick_status_to_dict (dict_t *dict, glusterd_volinfo_t *volinfo,
|
||||
|
||||
int32_t
|
||||
glusterd_handle_snap_limit (dict_t *dict, dict_t *rsp_dict);
|
||||
|
||||
#ifdef URCU_0_7
|
||||
/* Copying this definition from liburcu-0.8 as liburcu-0.7 does not have this
|
||||
* particular list api
|
||||
*/
|
||||
/* Add new element at the tail of the list. */
|
||||
static inline
|
||||
void cds_list_add_tail_rcu(struct cds_list_head *newp,
|
||||
struct cds_list_head *head)
|
||||
{
|
||||
newp->next = head;
|
||||
newp->prev = head->prev;
|
||||
rcu_assign_pointer(head->prev->next, newp);
|
||||
head->prev = newp;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user