X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=libcounter%2Fshm.c;h=70651e6a44ee38876d642da34fa6dba72967f556;hb=33b563d60bb08300f2879a7c67f5f6483ccf3943;hp=a2e1f819574b1e151165f369e8cbb50b047339a4;hpb=ebabbf580131acd1fe246c4d31fc5c044d36a038;p=lttng-ust.git diff --git a/libcounter/shm.c b/libcounter/shm.c index a2e1f819..70651e6a 100644 --- a/libcounter/shm.c +++ b/libcounter/shm.c @@ -1,25 +1,10 @@ /* - * libcounter/shm.c + * SPDX-License-Identifier: LGPL-2.1-only * * Copyright (C) 2005-2012 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; only - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #define _LGPL_SOURCE -#include #include "shm.h" #include #include @@ -31,15 +16,18 @@ #include #include #include -#include #include #include #include + #ifdef HAVE_LIBNUMA #include #include #endif -#include + +#include + +#include #include #include "../libringbuffer/mmap.h" @@ -382,6 +370,6 @@ struct lttng_counter_shm_ref lttng_counter_zalloc_shm(struct lttng_counter_shm_o void lttng_counter_align_shm(struct lttng_counter_shm_object *obj, size_t align) { - size_t offset_len = offset_align(obj->allocated_len, align); + size_t offset_len = lttng_ust_offset_align(obj->allocated_len, align); obj->allocated_len += offset_len; }