virthread.c 1.1 KB
Newer Older
1
/*
2
 * virthread.c: basic thread synchronization primitives
3
 *
4
 * Copyright (C) 2009-2010 Red Hat, Inc.
5 6 7 8 9 10 11 12 13 14 15 16
 *
 * 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; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * 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
17
 * License along with this library.  If not, see
O
Osier Yang 已提交
18
 * <http://www.gnu.org/licenses/>.
19 20 21 22 23
 *
 */

#include <config.h>

24
#include "virthread.h"
25

26 27 28
/* On mingw, we prefer native threading over the sometimes-broken
 * pthreads-win32 library wrapper.  */
#ifdef WIN32
29
# include "virthreadwin32.c"
30
#elif defined HAVE_PTHREAD_MUTEXATTR_INIT
31
# include "virthreadpthread.c"
32
#else
33
# error "Either pthreads or Win32 threads are required"
34
#endif