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