__attribute__((visibility("hidden")))
unsigned int channel_handle_get_nr_streams(struct lttng_ust_shm_handle *handle);
-__attribute__((visibility("hidden")))
-extern
-void channel_destroy(struct lttng_ust_lib_ring_buffer_channel *chan,
- struct lttng_ust_shm_handle *handle,
- int consumer);
-
/*
* Pointer dereferencing. We don't trust the shm_ref, so we validate
* both the index and offset with known boundaries.
return &obj->memory_map[ref_offset];
}
-#define shmp_index(handle, ref, index) \
- ({ \
- __typeof__((ref)._type) ____ptr_ret; \
- ____ptr_ret = (__typeof__(____ptr_ret)) _shmp_offset((handle)->table, &(ref)._ref, index, sizeof(*____ptr_ret)); \
- ____ptr_ret; \
- })
+#define shmp_index(handle, ref, index) \
+ ((__typeof__((ref)._type)) _shmp_offset((handle)->table, &(ref)._ref, index, sizeof(*((ref)._type))))
#define shmp(handle, ref) shmp_index(handle, ref, 0)