counters_offset = shm_length;
shm_length += counter_size * nr_elem;
overflow_offset = shm_length;
- shm_length += ALIGN(nr_elem, 8) / 8;
+ shm_length += LTTNG_UST_ALIGN(nr_elem, 8) / 8;
underflow_offset = shm_length;
- shm_length += ALIGN(nr_elem, 8) / 8;
+ shm_length += LTTNG_UST_ALIGN(nr_elem, 8) / 8;
layout->shm_len = shm_length;
if (counter->is_daemon) {
/* Allocate and clear shared memory. */
return -1;
if (!(config->alloc & COUNTER_ALLOC_PER_CPU) && counter_cpu_fds)
return -1;
- if (!(config->alloc & COUNTER_ALLOC_PER_CPU) && counter_cpu_fds >= 0)
+ if (!(config->alloc & COUNTER_ALLOC_PER_CPU) && nr_counter_cpu_fds >= 0)
return -1;
if (counter_cpu_fds && nr_cpus != nr_counter_cpu_fds)
return -1;