X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=libringbuffer%2Fshm.h;h=4889d6d62a0b9adb6cc453ec65851dde8369a398;hb=b89c5899ef86060111a6814c13df2684dc352737;hp=b558464728be52087e13dae3f931ccf2d2c308e2;hpb=ddabe860f4cf41a4206a8157d83e6b9354f85cb5;p=lttng-ust.git diff --git a/libringbuffer/shm.h b/libringbuffer/shm.h index b5584647..4889d6d6 100644 --- a/libringbuffer/shm.h +++ b/libringbuffer/shm.h @@ -30,11 +30,6 @@ int channel_handle_add_stream(struct lttng_ust_shm_handle *handle, __attribute__((visibility("hidden"))) unsigned int channel_handle_get_nr_streams(struct lttng_ust_shm_handle *handle); -__attribute__((visibility("hidden"))) -extern -void channel_destroy(struct 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. @@ -63,12 +58,8 @@ char *_shmp_offset(struct shm_object_table *table, struct shm_ref *ref, 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)