Blame libvirt-gobject/libvirt-gobject-compat.c

Packit a07778
/*
Packit a07778
 * This library is free software; you can redistribute it and/or
Packit a07778
 * modify it under the terms of the GNU Lesser General Public
Packit a07778
 * License as published by the Free Software Foundation; either
Packit a07778
 * version 2.1 of the License, or (at your option) any later version.
Packit a07778
 *
Packit a07778
 * This library is distributed in the hope that it will be useful,
Packit a07778
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit a07778
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit a07778
 * Lesser General Public License for more details.
Packit a07778
 *
Packit a07778
 * You should have received a copy of the GNU Lesser General Public
Packit a07778
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
Packit a07778
 */
Packit a07778
Packit a07778
#include <config.h>
Packit a07778
Packit a07778
#include "libvirt-gobject-compat.h"
Packit a07778
Packit a07778
GMutex *gvir_mutex_new(void)
Packit a07778
{
Packit a07778
    GMutex *mutex;
Packit a07778
Packit a07778
    mutex = g_new(GMutex, 1);
Packit a07778
    g_mutex_init(mutex);
Packit a07778
Packit a07778
    return mutex;
Packit a07778
}
Packit a07778
Packit a07778
void gvir_mutex_free(GMutex *mutex)
Packit a07778
{
Packit a07778
    g_mutex_clear(mutex);
Packit a07778
    g_free(mutex);
Packit a07778
}