* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+/* Remove deprecation warnings from LGPL wrapper build. */
+#define CDS_LFS_RCU_DEPRECATED
+
/* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
#undef _LGPL_SOURCE
#include "urcu/rculfstack.h"
extern "C" {
#endif
+#ifndef CDS_LFS_RCU_DEPRECATED
+#define CDS_LFS_RCU_DEPRECATED \
+ __attribute__((deprecated("urcu/rculfstack.h is deprecated. Please use urcu/lfstack.h instead.")))
+#endif
+
struct cds_lfs_node_rcu {
struct cds_lfs_node_rcu *next;
};
#include <urcu/static/rculfstack.h>
-#define cds_lfs_node_init_rcu _cds_lfs_node_init_rcu
-#define cds_lfs_init_rcu _cds_lfs_init_rcu
-#define cds_lfs_push_rcu _cds_lfs_push_rcu
-#define cds_lfs_pop_rcu _cds_lfs_pop_rcu
+static inline CDS_LFS_RCU_DEPRECATED
+void cds_lfs_node_init_rcu(struct cds_lfs_node_rcu *node)
+{
+ _cds_lfs_node_init_rcu(node);
+}
+
+static inline
+void cds_lfs_init_rcu(struct cds_lfs_stack_rcu *s)
+{
+ _cds_lfs_init_rcu(s);
+}
+
+static inline CDS_LFS_RCU_DEPRECATED
+int cds_lfs_push_rcu(struct cds_lfs_stack_rcu *s,
+ struct cds_lfs_node_rcu *node)
+{
+ return _cds_lfs_push_rcu(s, node);
+}
+
+static inline CDS_LFS_RCU_DEPRECATED
+struct cds_lfs_node_rcu *cds_lfs_pop_rcu(struct cds_lfs_stack_rcu *s)
+{
+ return _cds_lfs_pop_rcu(s);
+}
#else /* !_LGPL_SOURCE */
-extern void cds_lfs_node_init_rcu(struct cds_lfs_node_rcu *node);
-extern void cds_lfs_init_rcu(struct cds_lfs_stack_rcu *s);
-extern int cds_lfs_push_rcu(struct cds_lfs_stack_rcu *s,
+extern CDS_LFS_RCU_DEPRECATED
+void cds_lfs_node_init_rcu(struct cds_lfs_node_rcu *node);
+extern CDS_LFS_RCU_DEPRECATED
+void cds_lfs_init_rcu(struct cds_lfs_stack_rcu *s);
+extern CDS_LFS_RCU_DEPRECATED
+int cds_lfs_push_rcu(struct cds_lfs_stack_rcu *s,
struct cds_lfs_node_rcu *node);
/*
* node or modifying the cds_lfs_node_rcu structure.
* Returns NULL if stack is empty.
*/
-extern struct cds_lfs_node_rcu *cds_lfs_pop_rcu(struct cds_lfs_stack_rcu *s);
+extern CDS_LFS_RCU_DEPRECATED
+struct cds_lfs_node_rcu *cds_lfs_pop_rcu(struct cds_lfs_stack_rcu *s);
#endif /* !_LGPL_SOURCE */