X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fctf-writer%2Fobject-pool.h;h=34679ebf708427ab3d5212903ff84c5055e6caea;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hp=0d1ef70ef1a8a669f0d77f5926b204c0853ba06e;hpb=ef267d12284b855bc52ee429a5dc12da1d1e3b95;p=babeltrace.git diff --git a/src/ctf-writer/object-pool.h b/src/ctf-writer/object-pool.h index 0d1ef70e..34679ebf 100644 --- a/src/ctf-writer/object-pool.h +++ b/src/ctf-writer/object-pool.h @@ -1,29 +1,13 @@ -#ifndef BABELTRACE_CTF_WRITER_OBJECT_POOL_INTERNAL_H -#define BABELTRACE_CTF_WRITER_OBJECT_POOL_INTERNAL_H - /* + * SPDX-License-Identifier: MIT + * * Copyright (c) 2018 EfficiOS Inc. and Linux Foundation * Copyright (c) 2018 Philippe Proulx - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. */ +#ifndef BABELTRACE_CTF_WRITER_OBJECT_POOL_INTERNAL_H +#define BABELTRACE_CTF_WRITER_OBJECT_POOL_INTERNAL_H + /* * This is a generic object pool to avoid memory allocation/deallocation * for objects of which the lifespan is typically short, but which are @@ -108,7 +92,7 @@ void *bt_ctf_object_pool_create_object(struct bt_ctf_object_pool *pool) { struct bt_ctf_object *obj; - BT_ASSERT(pool); + BT_ASSERT_DBG(pool); #ifdef BT_LOGT BT_LOGT("Creating object from pool: pool-addr=%p, pool-size=%zu, pool-cap=%u", @@ -150,8 +134,8 @@ void bt_ctf_object_pool_recycle_object(struct bt_ctf_object_pool *pool, void *ob { struct bt_ctf_object *bt_obj = obj; - BT_ASSERT(pool); - BT_ASSERT(obj); + BT_ASSERT_DBG(pool); + BT_ASSERT_DBG(obj); #ifdef BT_LOGT BT_LOGT("Recycling object: pool-addr=%p, pool-size=%zu, pool-cap=%u, obj-addr=%p",