gimplify: Handle void expression as asm input [PR100501, PR100792]
[gcc.git] / libgcc / config / i386 / gthr-win32.c
blob40d598dd78a94865454bc64c9c0d5a4496e6d13c
1 /* Implementation of threads compatibility routines for libgcc2. */
3 /* Copyright (C) 1999-2024 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
26 /* Get the out-of-line version of the inline routines. */
28 #define __GTHREAD_WIN32_ACTIVE_P() 1
29 #define __GTHREAD_WIN32_INLINE
31 #define __gthread_detach __gthr_win32_detach
32 #define __gthread_equal __gthr_win32_equal
33 #define __gthread_yield __gthr_win32_yield
34 #define __gthread_once __gthr_win32_once
35 #define __gthread_key_create __gthr_win32_key_create
36 #define __gthread_key_delete __gthr_win32_key_delete
37 #define __gthread_getspecific __gthr_win32_getspecific
38 #define __gthread_setspecific __gthr_win32_setspecific
39 #define __gthread_mutex_init_function __gthr_win32_mutex_init_function
40 #define __gthread_mutex_destroy __gthr_win32_mutex_destroy
41 #define __gthread_mutex_lock __gthr_win32_mutex_lock
42 #define __gthread_mutex_trylock __gthr_win32_mutex_trylock
43 #define __gthread_mutex_unlock __gthr_win32_mutex_unlock
44 #define __gthread_recursive_mutex_trylock __gthr_win32_recursive_mutex_trylock
46 #include "gthr-win32.h"
48 /* Check the sizes of the local version of the Win32 types. */
50 #define CHECK_SIZE_OF(TYPE) \
51 typedef int assertion[sizeof(__gthr_win32_##TYPE) == sizeof(TYPE) ? 1 : -1];
53 CHECK_SIZE_OF (DWORD)
54 CHECK_SIZE_OF (HANDLE)
55 CHECK_SIZE_OF (CRITICAL_SECTION)