X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fringbuffer%2Fring_buffer_frontend.c;h=817cc842a3d49373773b714c184cbc4058395a65;hb=a616fb4e0a0245ae2cbd4614910480df19aa23d6;hp=91c69b7697d9e7f1bd1b06a518a66049a8ce210c;hpb=217babc9b6b5dcc531fb6b8bc5fc6e2906a060be;p=lttng-ust.git diff --git a/src/common/ringbuffer/ring_buffer_frontend.c b/src/common/ringbuffer/ring_buffer_frontend.c index 91c69b76..817cc842 100644 --- a/src/common/ringbuffer/ring_buffer_frontend.c +++ b/src/common/ringbuffer/ring_buffer_frontend.c @@ -982,7 +982,7 @@ struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_ring_buffer_c int64_t blocking_timeout_ms; if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) - nr_streams = num_possible_cpus(); + nr_streams = get_possible_cpus_array_len(); else nr_streams = 1; @@ -1011,7 +1011,7 @@ struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_ring_buffer_c return NULL; /* Allocate table for channel + per-cpu buffers */ - handle->table = shm_object_table_create(1 + num_possible_cpus()); + handle->table = shm_object_table_create(1 + get_possible_cpus_array_len()); if (!handle->table) goto error_table_alloc; @@ -1095,7 +1095,7 @@ struct lttng_ust_shm_handle *channel_handle_create(void *data, return NULL; /* Allocate table for channel + per-cpu buffers */ - handle->table = shm_object_table_create(1 + num_possible_cpus()); + handle->table = shm_object_table_create(1 + get_possible_cpus_array_len()); if (!handle->table) goto error_table_alloc; /* Add channel object */ @@ -1190,7 +1190,7 @@ struct lttng_ust_ring_buffer *channel_get_ring_buffer( if (config->alloc == RING_BUFFER_ALLOC_GLOBAL) { cpu = 0; } else { - if (cpu >= num_possible_cpus()) + if (cpu >= get_possible_cpus_array_len()) return NULL; } ref = &chan->backend.buf[cpu].shmp._ref; @@ -1235,7 +1235,7 @@ int ring_buffer_stream_close_wait_fd(const struct lttng_ust_ring_buffer_config * if (config->alloc == RING_BUFFER_ALLOC_GLOBAL) { cpu = 0; } else { - if (cpu >= num_possible_cpus()) + if (cpu >= get_possible_cpus_array_len()) return -EINVAL; } ref = &chan->backend.buf[cpu].shmp._ref; @@ -1253,7 +1253,7 @@ int ring_buffer_stream_close_wakeup_fd(const struct lttng_ust_ring_buffer_config if (config->alloc == RING_BUFFER_ALLOC_GLOBAL) { cpu = 0; } else { - if (cpu >= num_possible_cpus()) + if (cpu >= get_possible_cpus_array_len()) return -EINVAL; } ref = &chan->backend.buf[cpu].shmp._ref;