# 1 "../block/file-posix.c" # 1 "" # 1 "" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 1 "/usr/include/stdc-predef.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* This header is separate from features.h so that the compiler can include it implicitly at the start of every compilation. It must not itself include or any other header that includes because the implicit include comes before any feature test macros that may be defined in a source file before it first explicitly includes a system header. GCC knows the name of this header in order to preinclude it. */ /* glibc's intent is to support the IEC 559 math functionality, real and complex. If the GCC (4.9 and later) predefined macros specifying compiler intent are available, use them to determine whether the overall intent is to support these features; otherwise, presume an older compiler has intent to support these features and define these macros by default. */ # 52 "/usr/include/stdc-predef.h" 3 4 /* wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is synchronized with ISO/IEC 10646:2017, fifth edition, plus the following additions from Amendment 1 to the fifth edition: - 56 emoji characters - 285 hentaigana - 3 additional Zanabazar Square characters */ /* We do not support C11 . */ # 1 "" 2 # 1 "../block/file-posix.c" # 1 "../block/file-posix.c" /* * Block driver for RAW files (posix) * * Copyright (c) 2006 Fabrice Bellard * * 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. */ # 1 "//qemu-2.11+dfsg/include/qemu/osdep.h" 1 /* * OS includes and handling of OS dependencies * * This header exists to pull in some common system headers that * most code in QEMU will want, and to fix up some possible issues with * it (missing defines, Windows weirdness, and so on). * * To avoid getting into possible circular include dependencies, this * file should not include any other QEMU headers, with the exceptions * of config-host.h, config-target.h, qemu/compiler.h, * sysemu/os-posix.h, sysemu/os-win32.h, glib-compat.h and * qemu/typedefs.h, all of which are doing a similar job to this file * and are under similar constraints. * * This header also contains prototypes for functions defined in * os-*.c and util/oslib-*.c; those would probably be better split * out into separate header files. * * In an ideal world this header would contain only: * (1) things which everybody needs * (2) things without which code would work on most platforms but * fail to compile or misbehave on a minority of host OSes * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ # 1 "./config-host.h" 1 /* Automatically generated by create_config - do not modify */ # 31 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "//qemu-2.11+dfsg/include/exec/poison.h" 1 /* Poison identifiers that should not be used when building target independent device code. */ # 35 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/compiler.h" 1 /* compiler.h: macros to abstract away compiler specifics * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ # 14 "//qemu-2.11+dfsg/include/qemu/compiler.h" /*---------------------------------------------------------------------------- | The macro QEMU_GNUC_PREREQ tests for minimum version of the GNU C compiler. | The code is a copy of SOFTFLOAT_GNUC_PREREQ, see softfloat-macros.h. *----------------------------------------------------------------------------*/ # 67 "//qemu-2.11+dfsg/include/qemu/compiler.h" /* Convert from a base type to a parent type, with compile time checking. */ # 102 "//qemu-2.11+dfsg/include/qemu/compiler.h" /* Use gnu_printf when supported (qemu uses standard format strings). */ # 37 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 /* Older versions of C++ don't get definitions of various macros from * stdlib.h unless we define these macros before first inclusion of * that system header. */ # 52 "//qemu-2.11+dfsg/include/qemu/osdep.h" /* The following block of code temporarily renames the daemon() function so the * compiler does not see the warning associated with it in stdlib.h on OSX */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.15 Variable arguments */ # 36 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 /* Define __gnuc_va_list. */ typedef __builtin_va_list __gnuc_va_list; /* Define the standard macros for the user, if this invocation was from the user program. */ # 56 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 /* Define va_list, if desired, from __gnuc_va_list. */ /* We deliberately do not define va_list when called from stdio.h, because ANSI C says that stdio.h is not supposed to define va_list. stdio.h needs to have access to that data type, but must not use that name. It should use the name __gnuc_va_list, which is safe because it is reserved for the implementation. */ # 86 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. But on BSD NET2 we must not test or define or undef it. (Note that the comments in NET 2's ansi.h are incorrect for _VA_LIST_--see stdio.h!) */ /* The macro _VA_LIST_DEFINED is used in Windows NT 3.5 */ /* The macro _VA_LIST is used in SCO Unix 3.2. */ /* The macro _VA_LIST_T_H is used in the Bull dpx2 */ /* The macro __va_list__ is used by BeOS. */ typedef __gnuc_va_list va_list; # 63 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ /* snaroff@next.com says the NeXT needs this. */ /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 149 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 typedef long int ptrdiff_t; # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 216 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 typedef long unsigned int size_t; # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 283 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other symbols in the _FOO_T_ family, stays defined even after its corresponding type is defined). If we define wchar_t, then we must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if we undef _WCHAR_T_, then we must also define rune_t, since headers like runetype.h assume that if machine/ansi.h is included, and _BSD_WCHAR_T_ is not defined, then rune_t is available. machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of the same type." */ # 310 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* FreeBSD 5 can't be handled well using "traditional" logic above since it no longer defines _BSD_RUNE_T_ yet still desires to export rune_t in some cases... */ # 328 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 typedef int wchar_t; # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ /* Type whose alignment is supported in every context and is at least as great as that of any standard type not using alignment specifiers. */ typedef struct { long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); /* _Float128 is defined as a basic type, so max_align_t must be sufficiently aligned for it. This code must work in C++, so we use __float128 here; that is only available on some architectures, but only on i386 is extra alignment needed for __float128. */ } max_align_t; # 64 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdbool.h" 1 3 4 /* Copyright (C) 1998-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.16 Boolean type and values */ # 51 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdbool.h" 3 4 /* Signal that all the definitions are present. */ # 65 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdint.h" 1 3 4 # 9 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdint.h" 3 4 # 1 "/usr/include/stdint.h" 1 3 4 /* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99: 7.18 Integer types */ # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* These are defined by the user (or the compiler) to specify the desired environment: __STRICT_ANSI__ ISO Standard C. _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. __STDC_WANT_LIB_EXT2__ Extensions to ISO C99 from TR 27431-2:2010. __STDC_WANT_IEC_60559_BFP_EXT__ Extensions to ISO C11 from TS 18661-1:2014. __STDC_WANT_IEC_60559_FUNCS_EXT__ Extensions to ISO C11 from TS 18661-4:2015. __STDC_WANT_IEC_60559_TYPES_EXT__ Extensions to ISO C11 from TS 18661-3:2015. _POSIX_SOURCE IEEE Std 1003.1. _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; if >=199309L, add IEEE Std 1003.1b-1993; if >=199506L, add IEEE Std 1003.1c-1995; if >=200112L, all of IEEE 1003.1-2004 if >=200809L, all of IEEE 1003.1-2008 _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if Single Unix conformance is wanted, to 600 for the sixth revision, to 700 for the seventh revision. _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. _LARGEFILE_SOURCE Some more functions for correct standard I/O. _LARGEFILE64_SOURCE Additional functionality from LFS for large files. _FILE_OFFSET_BITS=N Select default filesystem interface. _ATFILE_SOURCE Additional *at interfaces. _GNU_SOURCE All of the above, plus GNU extensions. _DEFAULT_SOURCE The default set of features (taking precedence over __STRICT_ANSI__). _FORTIFY_SOURCE Add security hardening to many library functions. Set to 1 or 2; 2 performs stricter checks than 1. _REENTRANT, _THREAD_SAFE Obsolete; equivalent to _POSIX_C_SOURCE=199506L. The `-ansi' switch to the GNU C compiler, and standards conformance options such as `-std=c99', define __STRICT_ANSI__. If none of these are defined, or if _DEFAULT_SOURCE is defined, the default is to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 200809L, as well as enabling miscellaneous functions from BSD and SVID. If more than one of these are defined, they accumulate. For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together give you ISO C, 1003.1, and 1003.2, but nothing else. These are defined by this file and are used by the header files to decide what to declare or define: __GLIBC_USE (F) Define things from feature set F. This is defined to 1 or 0; the subsequent macros are either defined or undefined, and those tests should be moved to __GLIBC_USE. __USE_ISOC11 Define ISO C11 things. __USE_ISOC99 Define ISO C99 things. __USE_ISOC95 Define ISO C90 AMD1 (C95) things. __USE_ISOCXX11 Define ISO C++11 things. __USE_POSIX Define IEEE Std 1003.1 things. __USE_POSIX2 Define IEEE Std 1003.2 things. __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. __USE_XOPEN Define XPG things. __USE_XOPEN_EXTENDED Define X/Open Unix things. __USE_UNIX98 Define Single Unix V2 things. __USE_XOPEN2K Define XPG6 things. __USE_XOPEN2KXSI Define XPG6 XSI things. __USE_XOPEN2K8 Define XPG7 things. __USE_XOPEN2K8XSI Define XPG7 XSI things. __USE_LARGEFILE Define correct standard I/O things. __USE_LARGEFILE64 Define LFS things with separate names. __USE_FILE_OFFSET64 Define 64bit interface as default. __USE_MISC Define things from 4.3BSD or System V Unix. __USE_ATFILE Define *at interfaces and AT_* constants for them. __USE_GNU Define GNU extensions. __USE_FORTIFY_LEVEL Additional security measures used, according to level. The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are defined by this file unconditionally. `__GNU_LIBRARY__' is provided only for compatibility. All new code should use the other symbols to test for features. All macros listed above as possibly being defined by this file are explicitly undefined if they are not explicitly defined. Feature-test macros that are not defined by the user or compiler but are implied by the other feature-test macros defined (or by the lack of any definitions) are defined by the file. ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included, and so they are handled in , which does not have a multiple include guard. Feature test macros that can be handled from the first system header included are handled here. */ /* Undefine everything, so we get a clean slate. */ # 144 "/usr/include/features.h" 3 4 /* Suppress kernel-name space pollution unless user expressedly asks for it. */ /* Convenience macro to test the version of gcc. Use like this: #if __GNUC_PREREQ (2,8) ... code requiring gcc 2.8 or later ... #endif Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was added in 2.0. */ /* Similarly for clang. Features added to GCC after version 4.2 may or may not also be available in clang, and clang's definitions of __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such features can be queried via __has_extension/__has_feature. */ /* Whether to use feature set F. */ /* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not issue a warning; the expectation is that the source is being transitioned to use the new macro. */ /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ # 213 "/usr/include/features.h" 3 4 /* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, define _DEFAULT_SOURCE. */ # 224 "/usr/include/features.h" 3 4 /* This is to enable the ISO C11 extension. */ /* This is to enable the ISO C99 extension. */ /* This is to enable the ISO C90 Amendment 1:1995 extension. */ # 255 "/usr/include/features.h" 3 4 /* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE is defined, use POSIX.1-2008 (or another version depending on _XOPEN_SOURCE). */ # 284 "/usr/include/features.h" 3 4 /* Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be defined in all multithreaded code. GNU libc has not required this for many years. We now treat them as compatibility synonyms for _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with comprehensive support for multithreaded code. Using them never lowers the selected level of POSIX conformance, only raises it. */ # 390 "/usr/include/features.h" 3 4 /* The function 'gets' existed in C89, but is impossible to use safely. It has been removed from ISO C11 and ISO C++14. Note: for compatibility with various implementations of , this test must consider only the value of __cplusplus when compiling C++. */ /* Get definitions of __STDC_* predefined macros, if the compiler has not preincluded this header automatically. */ # 1 "/usr/include/stdc-predef.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 403 "/usr/include/features.h" 2 3 4 /* This macro indicates that the installed library is the GNU C Library. For historic reasons the value now is 6 and this will stay from now on. The use of this variable is deprecated. Use __GLIBC__ and __GLIBC_MINOR__ now (see below) when you want to test for a specific GNU C library version and use the values in to get the sonames of the shared libraries. */ /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ /* This is here only because every header file already includes this one. */ # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 /* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* We are almost always included from features.h. */ /* The GNU libc does not support any K&R compilers or the traditional mode of ISO C compilers anymore. Check for some of the combinations not anymore supported. */ /* Some user header file might have defined this before. */ /* All functions, except those with callbacks or those that synchronize memory, are leaf functions. */ # 49 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* GCC can always grok prototypes. For C++ programs we add throw() to help it optimize the function calls. But this works only with gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions as non-throwing using a function attribute since programs can use the -fexceptions options for C code as well. */ # 83 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Compilers that are not clang may object to #if defined __clang__ && __has_extension(...) even though they do not need to evaluate the right-hand side of the &&. */ /* These two macros are not used in glibc anymore. They are kept here only because some other projects expect the macros to be defined. */ /* For these things, GCC behaves the ANSI way normally, and the non-ANSI way under -traditional. */ /* This is not a typedef so `const __ptr_t' does the right thing. */ /* C++ needs to know that types and declarations are C, not C++. */ # 117 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Fortify support. */ # 133 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Support for flexible arrays. Headers that should use flexible arrays only if they're "real" (e.g. only if they won't affect sizeof()) should test #if __glibc_c99_flexarr_available. */ # 157 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* __asm__ ("xyz") is used throughout the headers to rename functions at the assembly language level. This is wrapped by the __REDIRECT macro, in order to support compilers that can do this some other way. When compilers don't support asm-names at all, we have to do preprocessor tricks instead (which don't have exactly the right semantics, but it's the best we can do). Example: int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ # 184 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* #elif __SOME_OTHER_COMPILER__ # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) ) */ /* GCC has various useful declarations that can be made with the `__attribute__' syntax. All of the ways we use this do fine if they are omitted for compilers that don't understand it. */ /* At some point during the gcc 2.96 development the `malloc' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ /* Tell the compiler which arguments to an allocation function indicate the size of the allocation. */ /* At some point during the gcc 2.96 development the `pure' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ /* This declaration tells the compiler that the value is constant. */ /* At some point during the gcc 3.1 development the `used' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ # 244 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Since version 3.2, gcc allows marking deprecated functions. */ /* Since version 4.5, gcc also allows one to specify the message printed when a deprecated function is used. clang claims to be gcc 4.2, but may also support this feature. */ # 262 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* At some point during the gcc 2.8 development the `format_arg' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. If several `format_arg' attributes are given for the same function, in gcc-3.0 and older, all but the last one are ignored. In newer gccs, all designated arguments are considered. */ /* At some point during the gcc 2.97 development the `strfmon' format attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ /* The nonull function attribute allows to mark pointer parameters which must not be NULL. */ /* If fortification mode, we warn about unused results of certain function calls which can lead to problems. */ # 308 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Forces a function to be always inlined. */ /* The Linux kernel defines __always_inline in stddef.h (283d7573), and it conflicts with this definition. Therefore undefine it first to allow either header to be included first. */ /* Associate error messages with the source location of the call site rather than with the source location inside the function. */ /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions older than 4.3 may define these macros and still not guarantee GNU inlining semantics. clang++ identifies itself as gcc-4.2, but has support for GNU inlining semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and __GNUC_GNU_INLINE__ macro definitions. */ # 354 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* GCC 4.3 and above allow passing all anonymous arguments of an __extern_always_inline function to some other vararg function. */ /* It is possible to compile containing GCC extensions even if GCC is run in pedantic mode if the uses are carefully marked using the `__extension__' keyword. But this is not generally available before version 2.8. */ /* __restrict is known in EGCS 1.2 and above. */ /* ISO C99 also allows to declare arrays as non-overlapping. The syntax is array_name[restrict] GCC 3.1 supports this. */ # 427 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 428 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4 /* Properties of long double type. ldbl-96 version. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C 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 License along with the GNU C Library; if not, see . */ /* long double is distinct from double, so there is nothing to define here. */ # 429 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 # 462 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is intended for use in preprocessor macros. Note: MESSAGE must be a _single_ string; concatenation of string literals is not supported. */ # 475 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Generic selection (ISO C11) is a C-only feature, available in GCC since version 4.9. Previous versions do not provide generic selection, even though they might set __STDC_VERSION__ to 201112L, when in -std=c11 mode. Thus, we must check for !defined __GNUC__ when testing __STDC_VERSION__ for generic selection support. On the other hand, Clang also defines __GNUC__, so a clang-specific check is required to enable the use of generic selection. */ # 425 "/usr/include/features.h" 2 3 4 /* If we don't have __REDIRECT, prototypes will be missing if __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */ /* Decide whether we can define 'extern inline' functions in headers. */ /* This is here only because every header file already includes this one. Get the definitions of all the appropriate `__stub_FUNCTION' symbols. contains `#define __stub_FUNCTION' when FUNCTION is a stub that will always return failure (and set errno to ENOSYS). */ # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4 /* This file is automatically generated. This file selects the right generated file of `__stub_FUNCTION' macros based on the architecture being compiled for. */ # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4 /* This file is automatically generated. It defines a symbol `__stub_FUNCTION' for each function in the C library which is a stub, meaning it will fail every time called, usually setting errno to ENOSYS. */ # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 # 449 "/usr/include/features.h" 2 3 4 # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 2 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ # 45 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. */ /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */ /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ # 27 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; /* Fixed-size types, underlying types depend on word size and compiler. */ typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; typedef signed long int __int64_t; typedef unsigned long int __uint64_t; /* quad_t is also 64 bits. */ typedef long int __quad_t; typedef unsigned long int __u_quad_t; /* Largest integral types. */ typedef long int __intmax_t; typedef unsigned long int __uintmax_t; /* The machine-dependent file defines __*_T_TYPE macros for each of the OS types we define below. The definitions of those macros must use the following macros for underlying types. We define __S_TYPE and __U_TYPE for the signed and unsigned variants of each of the following integer types on this machine. 16 -- "natural" 16-bit type (always short) 32 -- "natural" 32-bit type (always int) 64 -- "natural" 64-bit type (long or long long) LONG32 -- 32-bit type, traditionally long QUAD -- 64-bit type, always long long WORD -- natural type of __WORDSIZE bits (int or long) LONGWORD -- type of __WORDSIZE bits, traditionally long We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the conventional uses of `long' or `long long' type modifiers match the types we define, even when a less-adorned type would be the same size. This matters for (somewhat) portably writing printf/scanf formats for these types, where using the appropriate l or ll format modifiers can make the typedefs and the formats match up across all GNU platforms. If we used `long' when it's 64 bits where `long long' is expected, then the compiler would warn about the formats not matching the argument types, and the programmer changing them to shut up the compiler would break the program's portability. Here we assume what is presently the case in all the GCC configurations we support: long long is always 64 bits, long is always word/address size, and int is always 32 bits. */ # 125 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 /* No need to mark the typedef with __extension__. */ # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 /* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 /* See for the meaning of these macros. This file exists so that need not vary across different GNU platforms. */ /* X32 kernel interface is 64-bit. */ # 77 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ /* Same for ino_t and ino64_t. */ /* And for __rlim_t and __rlim64_t. */ /* Number of descriptors that can fit in an `fd_set'. */ # 131 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 typedef unsigned long int __dev_t; /* Type of device numbers. */ typedef unsigned int __uid_t; /* Type of user identifications. */ typedef unsigned int __gid_t; /* Type of group identifications. */ typedef unsigned long int __ino_t; /* Type of file serial numbers. */ typedef unsigned long int __ino64_t; /* Type of file serial numbers (LFS).*/ typedef unsigned int __mode_t; /* Type of file attribute bitmasks. */ typedef unsigned long int __nlink_t; /* Type of file link counts. */ typedef long int __off_t; /* Type of file sizes and offsets. */ typedef long int __off64_t; /* Type of file sizes and offsets (LFS). */ typedef int __pid_t; /* Type of process identifications. */ typedef struct { int __val[2]; } __fsid_t; /* Type of file system IDs. */ typedef long int __clock_t; /* Type of CPU usage counts. */ typedef unsigned long int __rlim_t; /* Type for resource measurement. */ typedef unsigned long int __rlim64_t; /* Type for resource measurement (LFS). */ typedef unsigned int __id_t; /* General type for IDs. */ typedef long int __time_t; /* Seconds since the Epoch. */ typedef unsigned int __useconds_t; /* Count of microseconds. */ typedef long int __suseconds_t; /* Signed count of microseconds. */ typedef int __daddr_t; /* The type of a disk address. */ typedef int __key_t; /* Type of an IPC key. */ /* Clock ID used in clock and timer functions. */ typedef int __clockid_t; /* Timer ID returned by `timer_create'. */ typedef void * __timer_t; /* Type to represent block size. */ typedef long int __blksize_t; /* Types from the Large File Support interface. */ /* Type to count number of disk blocks. */ typedef long int __blkcnt_t; typedef long int __blkcnt64_t; /* Type to count file system blocks. */ typedef unsigned long int __fsblkcnt_t; typedef unsigned long int __fsblkcnt64_t; /* Type to count file system nodes. */ typedef unsigned long int __fsfilcnt_t; typedef unsigned long int __fsfilcnt64_t; /* Type of miscellaneous file system fields. */ typedef long int __fsword_t; typedef long int __ssize_t; /* Type of a byte count, or error. */ /* Signed long type used in system calls. */ typedef long int __syscall_slong_t; /* Unsigned long type used in system calls. */ typedef unsigned long int __syscall_ulong_t; /* These few don't really vary by system, they always correspond to one of the other defined types. */ typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */ typedef char *__caddr_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ typedef long int __intptr_t; /* Duplicate info from sys/socket.h. */ typedef unsigned int __socklen_t; /* C99: An integer type that can be accessed as an atomic entity, even in the presence of asynchronous interrupts. It is not currently necessary for this to be machine-specific. */ typedef int __sig_atomic_t; # 28 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4 /* wchar_t type related definitions. Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* The fallback definitions, for when __WCHAR_MAX__ or __WCHAR_MIN__ are not defined, give the right value and type as long as both int and wchar_t are 32-bit types. Adding L'\0' to a constant value ensures that the type is correct; it is necessary to use (L'\0' + 0) rather than just L'\0' so that the type in C++ is the promoted version of wchar_t rather than the distinct wchar_t type itself. Because wchar_t in preprocessor #if expressions is treated as intmax_t or uintmax_t, the expression (L'\0' - 1) would have the wrong value for WCHAR_MAX in such expressions and so cannot be used to define __WCHAR_MAX in the unsigned case. */ # 29 "/usr/include/stdint.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 30 "/usr/include/stdint.h" 2 3 4 /* Exact integral types. */ /* Signed. */ # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 1 3 4 /* Define intN_t types. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 23 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 2 3 4 typedef __int8_t int8_t; typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; # 35 "/usr/include/stdint.h" 2 3 4 /* Unsigned. */ # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 1 3 4 /* Define uintN_t types. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 23 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 2 3 4 typedef __uint8_t uint8_t; typedef __uint16_t uint16_t; typedef __uint32_t uint32_t; typedef __uint64_t uint64_t; # 38 "/usr/include/stdint.h" 2 3 4 /* Small types. */ /* Signed. */ typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; typedef long int int_least64_t; /* Unsigned. */ typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; typedef unsigned long int uint_least64_t; /* Fast types. */ /* Signed. */ typedef signed char int_fast8_t; typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; /* Unsigned. */ typedef unsigned char uint_fast8_t; typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; # 94 "/usr/include/stdint.h" 3 4 /* Types for `void *' pointers. */ typedef long int intptr_t; typedef unsigned long int uintptr_t; # 110 "/usr/include/stdint.h" 3 4 /* Largest integral types. */ typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; # 123 "/usr/include/stdint.h" 3 4 /* Limits of integral types. */ /* Minimum of signed integral types. */ /* Maximum of signed integral types. */ /* Maximum of unsigned integral types. */ /* Minimum of signed integral types having a minimum size. */ /* Maximum of signed integral types having a minimum size. */ /* Maximum of unsigned integral types having a minimum size. */ /* Minimum of fast signed integral types having a minimum size. */ # 171 "/usr/include/stdint.h" 3 4 /* Maximum of fast signed integral types having a minimum size. */ # 182 "/usr/include/stdint.h" 3 4 /* Maximum of fast unsigned integral types having a minimum size. */ # 194 "/usr/include/stdint.h" 3 4 /* Values to test for integral types holding `void *' pointer. */ # 206 "/usr/include/stdint.h" 3 4 /* Minimum for largest signed integral type. */ /* Maximum for largest signed integral type. */ /* Maximum for largest unsigned integral type. */ /* Limits of other integer types. */ /* Limits of `ptrdiff_t' type. */ # 231 "/usr/include/stdint.h" 3 4 /* Limits of `sig_atomic_t'. */ /* Limit of `size_t' type. */ # 246 "/usr/include/stdint.h" 3 4 /* Limits of `wchar_t'. */ /* These constants might also be defined in . */ /* Limits of `wint_t'. */ /* Signed. */ # 267 "/usr/include/stdint.h" 3 4 /* Unsigned. */ # 277 "/usr/include/stdint.h" 3 4 /* Maximal type. */ # 10 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdint.h" 2 3 4 # 66 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 30 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 1 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 2 3 4 /* Returned by `clock'. */ typedef __clock_t clock_t; # 128 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 2 3 4 /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; # 130 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 2 3 4 /* Returned by `time'. */ typedef __time_t time_t; # 131 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 2 3 4 /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; # 132 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 146 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 /* Old compatibility names for C types. */ typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; /* These size-specific names are used by some of the inet code. */ # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 1 3 4 /* Define intN_t types. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 157 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 174 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 /* For GCC 2.7 and later, we can use specific type-size attributes. */ typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); /* Some code from BIND tests this macro to see if the types above are defined. */ /* In BSD is expected to define BYTE_ORDER. */ # 1 "/usr/include/endian.h" 1 3 4 /* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/endian.h" 2 3 4 /* Definitions for byte order, according to significance of bytes, from low addresses to high addresses. The value is what you get by putting '4' in the most significant byte, '3' in the second most significant byte, '2' in the second least significant byte, and '1' in the least significant byte, and then writing down one digit for each byte, starting with the byte at the lowest address at the left, and proceeding to the byte with the highest address at the right. */ /* This file defines `__BYTE_ORDER' for the particular machine. */ # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4 /* i386/x86_64 are little-endian. */ # 37 "/usr/include/endian.h" 2 3 4 /* Some machines may need to use a different endianness for floating point values. */ # 59 "/usr/include/endian.h" 3 4 /* Conversion interfaces. */ # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 /* Macros to swap the order of bytes in integer values. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 27 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 /* Swap bytes in 16 bit value. */ /* Get __bswap_16. */ # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4 /* Macros to swap the order of bytes in 16-bit integer values. Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 /* Swap bytes in 32 bit value. */ static __inline unsigned int __bswap_32 (unsigned int __bsx) { return __builtin_bswap32 (__bsx); } # 96 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 /* Swap bytes in 64 bit value. */ # 108 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { return __builtin_bswap64 (__bsx); } # 61 "/usr/include/endian.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4 /* Inline functions to return unsigned integer values unchanged. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 27 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 2 3 4 /* These inline functions are to ensure the appropriate type conversions and associated diagnostics from macros that convert to a given endianness. */ static __inline __uint16_t __uint16_identity (__uint16_t __x) { return __x; } static __inline __uint32_t __uint32_identity (__uint32_t __x) { return __x; } static __inline __uint64_t __uint64_identity (__uint64_t __x) { return __x; } # 62 "/usr/include/endian.h" 2 3 4 # 195 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 /* It also defines `fd_set' and the FD_* macros for `select'. */ # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4 /* `fd_set' type and related macros, and `select'/`pselect' declarations. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 25 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 /* Get definition of needed basic types. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 28 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 /* Get __FD_* definitions. */ # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4 /* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4 # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 /* Get sigset_t. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h" 1 3 4 typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 2 3 4 /* A set of signals to be blocked, unblocked, or waited for. */ typedef __sigset_t sigset_t; # 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 /* Get definition of timer specification structures. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 2 3 4 /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval { __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ }; # 38 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 2 3 4 /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ __syscall_slong_t tv_nsec; /* Nanoseconds. */ }; # 40 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 48 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 /* The fd_set member is required to be an array of longs. */ typedef long int __fd_mask; /* Some versions of define this macros. */ /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ /* fd_set for select and pselect. */ typedef struct { /* XPG4.2 requires this member name. Otherwise avoid the name from the global namespace. */ __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; } fd_set; /* Maximum number of file descriptors in `fd_set'. */ /* Sometimes the fd_set member is assumed to have this type. */ typedef __fd_mask fd_mask; /* Number of bits per word of `fd_set' (some code assumes this is 32). */ /* Access macros for `fd_set'. */ /* Check the first NFDS descriptors each in READFDS (if not NULL) for read readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out after waiting the interval specified therein. Returns the number of ready descriptors, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); /* Same as above only that the TIMEOUT value is given with higher resolution and a sigmask which is been set temporarily. This version should be used. This function is a cancellation point and therefore not marked with __THROW. */ extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); /* Define some inlines helping to catch common problems. */ # 198 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 /* BSD defines `major', `minor', and `makedev' in this header. However, these symbols are likely to collide with user code, so we are going to stop defining them here in an upcoming release. Code that needs these macros should include directly. Code that does not need these macros should #undef them after including this header. */ # 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4 /* Definitions of macros to access `dev_t' values. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* If is included after , these macros will already be defined, and we need to redefine them without the deprecation warnings. (If they are included in the opposite order, the outer #ifndef will suppress this entire file and the macros will be usable without warnings.) */ /* This is the macro that must be defined to satisfy the misuse check in bits/sysmacros.h. */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 40 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 41 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sysmacros.h" 1 3 4 /* Definitions of macros to access `dev_t' values. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/sysmacros.h" 3 4 /* dev_t in glibc is a 64-bit quantity, with 32-bit major and minor numbers. Our default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major number and m is a hex digit of the minor number. This is downward compatible with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also downward compatible with the Linux kernel, which (as of 2016) uses 32-bit dev_t, encoded as mmmM MMmm. Systems that use an incompatible encoding for dev_t should override this file in the appropriate sysdeps subdirectory. */ # 42 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 2 3 4 /* Caution: The text of this deprecation message is unquoted, so that #symbol can be substituted. (It is converted to a string by __SYSMACROS_DM1.) This means the message must be a sequence of complete pp-tokens; in particular, English contractions (it's, can't) cannot be used. The message has been manually word-wrapped to fit in 80 columns when output by GCC 5 and 6. The first line is shorter to leave some room for the "foo.c:23: warning:" annotation. */ # 60 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 /* This macro is variadic because the deprecation message above contains commas. */ # 71 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 extern unsigned int gnu_dev_major (__dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern unsigned int gnu_dev_minor (__dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern __dev_t gnu_dev_makedev (unsigned int __major, unsigned int __minor) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); # 85 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 # 206 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; /* Types from the Large File Support interface. */ typedef __blkcnt_t blkcnt_t; /* Type to count number of disk blocks. */ typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */ typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */ # 246 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt64_t; /* Type to count number of disk blocks. */ typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks. */ typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */ /* Now add the thread types. */ # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 /* Declaration of common pthread types for all architectures. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* For internal mutex and condition variable definitions. */ # 1 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 1 3 4 /* Common threading primitives definitions for both POSIX and C11. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Arch-specific definitions. Each architecture must define the following macros to define the expected sizes of pthread data types: __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. Also, the following macros must be define for internal pthread_mutex_t struct definitions (struct __pthread_mutex_s): __PTHREAD_COMPAT_PADDING_MID - any additional members after 'kind' and before '__spin' (for 64 bits) or '__nusers' (for 32 bits). __PTHREAD_COMPAT_PADDING_END - any additional members at the end of the internal structure. __PTHREAD_MUTEX_LOCK_ELISION - 1 if the architecture supports lock elision or 0 otherwise. __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers. The preferred value for new architectures is 0. __PTHREAD_MUTEX_USE_UNION - control whether internal __spins and __list will be place inside a union for linuxthreads compatibility. The preferred value for new architectures is 0. For a new port the preferred values for the required defines are: #define __PTHREAD_COMPAT_PADDING_MID #define __PTHREAD_COMPAT_PADDING_END #define __PTHREAD_MUTEX_LOCK_ELISION 0 #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 #define __PTHREAD_MUTEX_USE_UNION 0 __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to eventually support lock elision using transactional memory. The additional macro defines any constraint for the lock alignment inside the thread structures: __LOCK_ALIGNMENT - for internal lock/futex usage. Same idea but for the once locking primitive: __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t) must be defined. */ # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 1 3 4 /* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 2 3 4 # 50 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 /* Definitions for internal mutex struct. */ # 65 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 struct __pthread_rwlock_arch_t { unsigned int __readers; unsigned int __writers; unsigned int __wrphase_futex; unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; int __cur_writer; int __shared; signed char __rwelision; unsigned char __pad1[7]; unsigned long int __pad2; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; # 99 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 }; # 78 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4 /* Common definition of pthread_mutex_t. */ typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; /* Lock elision support. */ # 118 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 struct __pthread_mutex_s { int __lock ; unsigned int __count; int __owner; unsigned int __nusers; /* KIND must stay at this position in the structure to maintain binary compatibility with static initializers. */ int __kind; short __spins; short __elision; __pthread_list_t __list; # 145 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 }; /* Common definition of pthread_cond_t. */ struct __pthread_cond_s { __extension__ union { __extension__ unsigned long long int __wseq; struct { unsigned int __low; unsigned int __high; } __wseq32; }; __extension__ union { __extension__ unsigned long long int __g1_start; struct { unsigned int __low; unsigned int __high; } __g1_start32; }; unsigned int __g_refs[2] ; unsigned int __g_size[2]; unsigned int __g1_orig_size; unsigned int __wrefs; unsigned int __g_signals[2]; }; # 24 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4 /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ typedef unsigned long int pthread_t; /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ typedef union { char __size[4]; int __align; } pthread_mutexattr_t; /* Data structure for condition variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union { char __size[4]; int __align; } pthread_condattr_t; /* Keys for thread-specific data */ typedef unsigned int pthread_key_t; /* Once-only execution */ typedef int pthread_once_t; union pthread_attr_t { char __size[56]; long int __align; }; typedef union pthread_attr_t pthread_attr_t; typedef union { struct __pthread_mutex_s __data; char __size[40]; long int __align; } pthread_mutex_t; typedef union { struct __pthread_cond_s __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; /* Data structure for reader-writer lock variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union { struct __pthread_rwlock_arch_t __data; char __size[56]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; /* POSIX spinlock data type. */ typedef volatile int pthread_spinlock_t; /* POSIX barriers data type. The structure of the type is deliberately not exposed. */ typedef union { char __size[32]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 255 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 67 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/stdlib.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.20 General utilities */ # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 2 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ # 45 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. */ /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */ /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ # 26 "/usr/include/stdlib.h" 2 3 4 /* Get size_t, wchar_t and NULL from . */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 32 "/usr/include/stdlib.h" 2 3 4 /* XPG requires a few symbols from being defined. */ # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4 /* Definitions of flag bits for `waitpid' et al. Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Bits in the third argument to `waitpid'. */ /* Bits in the fourth argument to `waitid'. */ # 41 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 /* The following values are used by the `waitid' function. */ /* The Linux kernel defines these bare, rather than an enum, which causes a conflict if the include order is reversed. */ typedef enum { P_ALL, /* Wait for any child. */ P_PID, /* Wait for specified process. */ P_PGID /* Wait for members of process group. */ } idtype_t; # 40 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4 /* Definitions of status bits for `wait' et al. Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Everything extant so far uses these same bits. */ /* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ /* If WIFSIGNALED(STATUS), the terminating signal. */ /* If WIFSTOPPED(STATUS), the signal that stopped the child. */ /* Nonzero if STATUS indicates normal termination. */ /* Nonzero if STATUS indicates termination by a signal. */ /* Nonzero if STATUS indicates the child is stopped. */ /* Nonzero if STATUS indicates the child continued after a stop. We only define this if provides the WCONTINUED flag bit. */ /* Nonzero if STATUS indicates the child dumped core. */ /* Macros for constructing status values. */ # 41 "/usr/include/stdlib.h" 2 3 4 /* Define the macros also would define this way. */ # 54 "/usr/include/stdlib.h" 3 4 /* _FloatN API tests for enablement. */ # 1 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 1 3 4 /* Macros to control TS 18661-3 glibc features on x86. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 2 3 4 /* Defined to 1 if the current compiler invocation provides a floating-point type with the IEEE 754 binary128 format, and this glibc includes corresponding *f128 interfaces for it. The required libgcc support was added some time after the basic compiler support, for x86_64 and x86. */ # 38 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct from the default float, double and long double types in this glibc. */ /* Defined to 1 if the current compiler invocation provides a floating-point type with the right format for _Float64x, and this glibc includes corresponding *f64x interfaces for it. */ /* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has the format of _Float128, which must be different from that of long double. */ /* Defined to concatenate the literal suffix to be used with _Float128 types, if __HAVE_FLOAT128 is 1. */ # 70 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ # 82 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* The remaining of this file provides support for older compilers. */ /* The type _Float128 exists only since GCC 7.0. */ /* __builtin_huge_valf128 doesn't exist before GCC 7.0. */ /* Older GCC has only a subset of built-in functions for _Float128 on x86, and __builtin_infq is not usable in static initializers. Converting a narrower sNaN to _Float128 produces a quiet NaN, so attempts to use _Float128 sNaNs will not work properly with older compilers. */ # 108 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, e.g.: __builtin_signbitf128, before GCC 6. However, there has never been a __builtin_signbitf128 in GCC and the type-generic builtin is only available since GCC 6. */ # 120 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 1 3 4 /* Macros to control TS 18661-3 glibc features where the same definitions are appropriate for all platforms. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 24 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4 /* Properties of long double type. ldbl-96 version. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C 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 License along with the GNU C Library; if not, see . */ /* long double is distinct from double, so there is nothing to define here. */ # 25 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 2 3 4 /* This header should be included at the bottom of each bits/floatn.h. It defines the following macros for each _FloatN and _FloatNx type, where the same definitions, or definitions based only on the macros in bits/floatn.h, are appropriate for all glibc configurations. */ /* Defined to 1 if the current compiler invocation provides a floating-point type with the right format for this type, and this glibc includes corresponding *fN or *fNx interfaces for it. */ /* Defined to 1 if the corresponding __HAVE_ macro is 1 and the type is the first with its format in the sequence of (the default choices for) float, double, long double, _Float16, _Float32, _Float64, _Float128, _Float32x, _Float64x, _Float128x for this glibc; that is, if functions present once per floating-point format rather than once per type are present for this type. All configurations supported by glibc have _Float32 the same format as float, _Float64 and _Float32x the same format as double, the _Float64x the same format as either long double or _Float128. No configurations support _Float128x or, as of GCC 7, have compiler support for a type meeting the requirements for _Float128x. */ /* Defined to 1 if any _FloatN or _FloatNx types that are not ABI-distinct are however distinct types at the C language level (so for the purposes of __builtin_types_compatible_p and _Generic). */ # 70 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 /* Defined to concatenate the literal suffix to be used with _FloatN or _FloatNx types, if __HAVE_ is 1. The corresponding literal suffixes exist since GCC 7, for C only. */ # 130 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 /* Defined to a complex type if __HAVE_ is 1. */ # 188 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 /* The remaining of this file provides support for older compilers. */ # 221 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 /* If double, long double and _Float64 all have the same set of values, TS 18661-3 requires the usual arithmetic conversions on long double and _Float64 to produce _Float64. For this to be the case when building with a compiler without a distinct _Float64 type, _Float64 must be a typedef for long double, not for double. */ # 121 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 2 3 4 # 56 "/usr/include/stdlib.h" 2 3 4 /* Returned by `div'. */ typedef struct { int quot; /* Quotient. */ int rem; /* Remainder. */ } div_t; /* Returned by `ldiv'. */ typedef struct { long int quot; /* Quotient. */ long int rem; /* Remainder. */ } ldiv_t; /* Returned by `lldiv'. */ __extension__ typedef struct { long long int quot; /* Quotient. */ long long int rem; /* Remainder. */ } lldiv_t; /* The largest number rand will return (same as INT_MAX). */ /* We define these the same for all machines. Changes from this to the outside world should be done in `_exit'. */ /* Maximum length of a multibyte character in the current locale. */ extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Convert a string to a floating-point number. */ extern double atof (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Convert a string to an integer. */ extern int atoi (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Convert a string to a long integer. */ extern long int atol (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Convert a string to a long long integer. */ __extension__ extern long long int atoll (const char *__nptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Convert a string to a floating-point number. */ extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Likewise for `float' and `long double' sizes of floating-point numbers. */ extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Likewise for '_FloatN' and '_FloatNx'. */ # 140 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32 (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float64 strtof64 (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float128 strtof128 (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float32x strtof32x (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern _Float64x strtof64x (const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 175 "/usr/include/stdlib.h" 3 4 /* Convert a string to a long integer. */ extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Convert a string to an unsigned long integer. */ extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Convert a string to a quadword integer. */ __extension__ extern long long int strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Convert a string to an unsigned quadword integer. */ __extension__ extern unsigned long long int strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Convert a string to a quadword integer. */ __extension__ extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Convert a string to an unsigned quadword integer. */ __extension__ extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Convert a floating-point number to a string. */ extern int strfromd (char *__dest, size_t __size, const char *__format, double __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf (char *__dest, size_t __size, const char *__format, float __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfroml (char *__dest, size_t __size, const char *__format, long double __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); # 232 "/usr/include/stdlib.h" 3 4 extern int strfromf32 (char *__dest, size_t __size, const char * __format, _Float32 __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf64 (char *__dest, size_t __size, const char * __format, _Float64 __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf128 (char *__dest, size_t __size, const char * __format, _Float128 __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf32x (char *__dest, size_t __size, const char * __format, _Float32x __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int strfromf64x (char *__dest, size_t __size, const char * __format, _Float64x __f) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); # 269 "/usr/include/stdlib.h" 3 4 /* Parallel versions of the functions above which take the locale to use as an additional parameter. These are GNU extensions inspired by the POSIX.1-2008 extended locale API. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4 /* Definition of locale_t. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 1 3 4 /* Definition of struct __locale_struct and __locale_t. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* POSIX.1-2008: the locale_t type, representing a locale context (implementation-namespace version). This type should be treated as opaque by applications; some details are exposed for the sake of efficiency in e.g. ctype functions. */ struct __locale_struct { /* Note: LC_ALL is not a valid index into this array. */ struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */ /* To increase the speed of this solution we add some special members. */ const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; /* Note: LC_ALL is not a valid index into this array. */ const char *__names[13]; }; typedef struct __locale_struct *__locale_t; # 23 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 2 3 4 typedef __locale_t locale_t; # 273 "/usr/include/stdlib.h" 2 3 4 extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); __extension__ extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); __extension__ extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))); extern double strtod_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern float strtof_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern long double strtold_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); # 316 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float64 strtof64_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float128 strtof128_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float32x strtof32x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); extern _Float64x strtof64x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); # 382 "/usr/include/stdlib.h" 3 4 /* Convert N to base 64 using the digits "./0-9A-Za-z", least-significant digit first. Returns a pointer to static storage overwritten by the next call. */ extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Read a number from a string S in base 64 as above. */ extern long int a64l (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ # 395 "/usr/include/stdlib.h" 2 3 4 /* These are the functions that actually do things. The `random', `srandom', `initstate' and `setstate' functions are those from BSD Unices. The `rand' and `srand' functions are required by the ANSI standard. We provide both interfaces to the same random number generator. */ /* Return a random long integer between 0 and RAND_MAX inclusive. */ extern long int random (void) __attribute__ ((__nothrow__ , __leaf__)); /* Seed the random number generator with the given number. */ extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); /* Initialize the random number generator to use state buffer STATEBUF, of length STATELEN, and seed it with SEED. Optimal lengths are 8, 16, 32, 64, 128 and 256, the bigger the better; values less than 8 will cause an error and values greater than 256 will be rounded down. */ extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Switch the random number generator to state buffer STATEBUF, which should have been previously initialized by `initstate'. */ extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Reentrant versions of the `random' family of functions. These functions all use the following data structure to contain state, rather than global state variables. */ struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Return a random integer between 0 and RAND_MAX inclusive. */ extern int rand (void) __attribute__ ((__nothrow__ , __leaf__)); /* Seed the random number generator with the given number. */ extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); /* Reentrant interface according to POSIX.1. */ extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__)); /* System V style 48-bit random number generator functions. */ /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__)); extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return non-negative, long integer in [0,2^31). */ extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); extern long int nrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return signed, long integers in [-2^31,2^31). */ extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); extern long int jrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Seed random number generator. */ extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__)); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Data structure for communication with thread safe versions. This type is to be regarded as opaque. It's only exported because users have to allocate objects of this type. */ struct drand48_data { unsigned short int __x[3]; /* Current state. */ unsigned short int __old_x[3]; /* Old state. */ unsigned short int __c; /* Additive const. in congruential formula. */ unsigned short int __init; /* Flag for initializing. */ __extension__ unsigned long long int __a; /* Factor in congruential formula. */ }; /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Return non-negative, long integer in [0,2^31). */ extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Return signed, long integers in [-2^31,2^31). */ extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Seed random number generator. */ extern int srand48_r (long int __seedval, struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Allocate SIZE bytes of memory. */ extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) /* Ignore */; /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) /* Ignore */; /* Re-allocate the previously allocated block in PTR, making the new block SIZE bytes long. */ /* __attribute_malloc__ is not used, because if realloc returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); /* Re-allocate the previously allocated block in PTR, making the new block large enough for NMEMB elements of SIZE bytes each. */ /* __attribute_malloc__ is not used, because if reallocarray returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); /* Free a block allocated by `malloc', `realloc' or `calloc'. */ extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/alloca.h" 1 3 4 /* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/alloca.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 25 "/usr/include/alloca.h" 2 3 4 /* Remove any previous definitions. */ /* Allocate a block that will be freed when the calling function exits. */ extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__)); # 567 "/usr/include/stdlib.h" 2 3 4 /* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */ extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) /* Ignore */; /* Allocate memory of SIZE bytes with an alignment of ALIGNMENT. */ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* ISO C variant of aligned allocation. */ extern void *aligned_alloc (size_t __alignment, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) /* Ignore */; /* Abort execution and generate a core-dump. */ extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); /* Register a function to be called when `exit' is called. */ extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Register a function to be called when `quick_exit' is called. */ extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Register a function to be called with the status given to `exit' and the given argument. */ extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Call all functions registered with `atexit' and `on_exit', in the reverse of the order in which they were registered, perform stdio cleanup, and terminate program execution with STATUS. */ extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); /* Call all functions registered with `at_quick_exit' in the reverse of the order in which they were registered and terminate program execution with STATUS. */ extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); /* Terminate the program with STATUS without calling any of the functions registered with `atexit' or `on_exit'. */ extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); /* Return the value of envariable NAME, or NULL if it doesn't exist. */ extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* This function is similar to the above but returns NULL if the programs is running with SUID or SGID enabled. */ extern char *secure_getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* The SVID says this is in , but this seems a better place. */ /* Put STRING, which is of the form "NAME=VALUE", in the environment. If there is no `=', remove NAME from the environment. */ extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ extern int setenv (const char *__name, const char *__value, int __replace) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Remove the variable NAME from the environment. */ extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* The `clearenv' was planned to be added to POSIX.1 but probably never made it. Nevertheless the POSIX.9 standard (POSIX bindings for Fortran 77) requires this function. */ extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__)); /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. Always returns TEMPLATE, it's either a temporary file name or a null string if it cannot get a unique file name. */ extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the filename unique. Returns a file descriptor open on the file for reading and writing, or -1 if it cannot create a uniquely-named file. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) /* Ignore */; # 695 "/usr/include/stdlib.h" 3 4 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Similar to mkstemp, but the template can have a suffix after the XXXXXX. The length of the suffix is specified in the second parameter. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) /* Ignore */; # 717 "/usr/include/stdlib.h" 3 4 extern int mkstemps64 (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Generate a unique temporary file name from TEMPLATE similar to mkstemp. But allow the caller to pass additional flags which are used in the open call to create the file.. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) /* Ignore */; # 749 "/usr/include/stdlib.h" 3 4 extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Similar to mkostemp, but the template can have a suffix after the XXXXXX. The length of the suffix is specified in the second parameter. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int mkostemps (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) /* Ignore */; # 771 "/usr/include/stdlib.h" 3 4 extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Execute the given line as a shell command. This function is a cancellation point and therefore not marked with __THROW. */ extern int system (const char *__command) /* Ignore */; /* Return a malloc'd string containing the canonical absolute name of the existing named file. */ extern char *canonicalize_file_name (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Return the canonical absolute name of file NAME. If RESOLVED is null, the result is malloc'd; otherwise, if the canonical name is PATH_MAX chars or more, returns null with `errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the name in RESOLVED. */ extern char *realpath (const char *__restrict __name, char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Shorthand for type of comparison functions. */ typedef int (*__compar_fn_t) (const void *, const void *); typedef __compar_fn_t comparison_fn_t; typedef int (*__compar_d_fn_t) (const void *, const void *, void *); /* Do a binary search for KEY in BASE, which consists of NMEMB elements of SIZE bytes each, using COMPAR to perform the comparisons. */ extern void *bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) /* Ignore */; /* Sort NMEMB elements of BASE, of SIZE bytes each, using COMPAR to perform the comparisons. */ extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern void qsort_r (void *__base, size_t __nmemb, size_t __size, __compar_d_fn_t __compar, void *__arg) __attribute__ ((__nonnull__ (1, 4))); /* Return the absolute value of X. */ extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) /* Ignore */; extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) /* Ignore */; __extension__ extern long long int llabs (long long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) /* Ignore */; /* Return the `div_t', `ldiv_t' or `lldiv_t' representation of the value of NUMER over DENOM. */ /* GCC may have built-ins for these someday. */ extern div_t div (int __numer, int __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) /* Ignore */; extern ldiv_t ldiv (long int __numer, long int __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) /* Ignore */; __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) /* Ignore */; /* Convert floating point numbers to strings. The returned values are valid only until another call to the same function. */ /* Convert VALUE to a string with NDIGIT digits and return a pointer to this. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) /* Ignore */; /* Convert VALUE to a string rounded to NDIGIT decimal digits. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) /* Ignore */; /* If possible convert VALUE to a string with NDIGIT significant digits. Otherwise use exponential representation. The resulting string will be written to BUF. */ extern char *gcvt (double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) /* Ignore */; /* Long double versions of above functions. */ extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) /* Ignore */; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) /* Ignore */; extern char *qgcvt (long double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) /* Ignore */; /* Reentrant version of the functions above which provide their own buffers. */ extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); /* Return the length of the multibyte character in S, which is no longer than N. */ extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); /* Return the length of the given multibyte character, putting its `wchar_t' representation in *PWC. */ extern int mbtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); /* Put the multibyte character represented by WCHAR in S, returning its length. */ extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)); /* Convert a multibyte string to a wide char string. */ extern size_t mbstowcs (wchar_t *__restrict __pwcs, const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); /* Convert a wide char string to multibyte string. */ extern size_t wcstombs (char *__restrict __s, const wchar_t *__restrict __pwcs, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); /* Determine whether the string value of RESPONSE matches the affirmation or negative response expression as specified by the LC_MESSAGES category in the program's current locale. Returns 1 if affirmative, 0 if negative, and -1 if not matching. */ extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Parse comma separated suboption from *OPTIONP and match against strings in TOKENS. If found return index and set *VALUEP to optional value introduced by an equal sign. If the suboption is not part of TOKENS return in *VALUEP beginning of unknown suboption. On exit *OPTIONP is set to the beginning of the next token or at the terminating NUL character. */ extern int getsubopt (char **__restrict __optionp, char *const *__restrict __tokens, char **__restrict __valuep) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) /* Ignore */; /* Setup DES tables according KEY. */ extern void setkey (const char *__key) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* X/Open pseudo terminal handling. */ /* Return a master pseudo-terminal handle. */ extern int posix_openpt (int __oflag) /* Ignore */; /* The next four functions all take a master pseudo-tty fd and perform an operation on the associated slave: */ /* Chown the slave to the calling user. */ extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); /* Release an internal lock so the slave can be opened. Call after grantpt(). */ extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); /* Return the pathname of the pseudo terminal slave associated with the master FD is open on, or NULL on errors. The returned storage is good until the next call to this function. */ extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Store at most BUFLEN characters of the pathname of the slave pseudo terminal associated with the master FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Open a master pseudo terminal and return its file descriptor. */ extern int getpt (void); /* Put the 1 minute, 5 minute and 15 minute load averages into the first NELEM elements of LOADAVG. Return the number written (never more than three, but may be less than NELEM), or -1 if an error occurred. */ extern int getloadavg (double __loadavg[], int __nelem) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 1016 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4 /* Floating-point inline functions for stdlib.h. Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1017 "/usr/include/stdlib.h" 2 3 4 /* Define some macros helping to catch buffer overflows. */ # 68 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/stdio.h" 1 3 4 /* Define ISO C stdio on top of C++ iostreams. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.19 Input/output */ # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 2 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ # 45 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. */ /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */ /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ # 28 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 34 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 36 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h" 1 3 4 struct _IO_FILE; typedef struct _IO_FILE __FILE; # 37 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/FILE.h" 1 3 4 struct _IO_FILE; /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; # 38 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libio.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . As a special exception, if you link the code in this file with files compiled with a GNU compiler to produce an executable, that does not cause the resulting executable to be covered by the GNU Lesser General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Lesser General Public License. This exception applies to code released by its copyright holders in files containing the exception. */ # 35 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 1 3 4 /* This file is needed by libio to define various configuration parameters. These are always the same in the GNU C library. */ # 11 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 3 4 /* Define types for libio in terms of the standard internal type names. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 14 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 20 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 1 3 4 /* Integral type unchanged by default argument promotions that can hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ /* Conversion state information. */ typedef struct { int __count; union { unsigned int __wch; char __wchb[4]; } __value; /* Value so far. */ } __mbstate_t; # 22 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 2 3 4 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; # 50 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 3 4 /* These library features are always available in the GNU C library. */ /* This is defined by if `st_blksize' exists. */ # 36 "/usr/include/x86_64-linux-gnu/bits/libio.h" 2 3 4 /* ALL of these should be defined in _G_config.h */ # 51 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 /* This define avoids name pollution if we're using GNU stdarg.h */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.15 Variable arguments */ # 54 "/usr/include/x86_64-linux-gnu/bits/libio.h" 2 3 4 # 90 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 /* Magic numbers and bits for the _flags field. The magic numbers use the high-order bits of _flags; the remaining bits are available for variable flags. Note: The magic numbers must all be negative if stdio emulation is desired. */ # 129 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 /* These are "formatting flags" matching the iostream fmtflags enum values. */ # 149 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 struct _IO_jump_t; struct _IO_FILE; /* During the build of glibc itself, _IO_lock_t will already have been defined by internal headers. */ typedef void _IO_lock_t; /* A streammarker remembers a position in a buffer. */ struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; /* If _pos >= 0 it points to _buf->Gbase()+_pos. FIXME comment */ /* if _pos < 0, it points to _buf->eBptr()+_pos. FIXME comment */ int _pos; # 177 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 }; /* This is the structure from the libstdc++ codecvt class. */ enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 245 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ /* The following pointers correspond to the C++ streambuf protocol. */ /* Note: Tk uses the _IO_read_ptr and _IO_read_end fields directly. */ char* _IO_read_ptr; /* Current read pointer */ char* _IO_read_end; /* End of get area. */ char* _IO_read_base; /* Start of putback+get area. */ char* _IO_write_base; /* Start of put area. */ char* _IO_write_ptr; /* Current put pointer. */ char* _IO_write_end; /* End of put area. */ char* _IO_buf_base; /* Start of reserve area. */ char* _IO_buf_end; /* End of reserve area. */ /* The following fields are used to support backing up and undo. */ char *_IO_save_base; /* Pointer to start of non-current get area. */ char *_IO_backup_base; /* Pointer to first valid character of backup area */ char *_IO_save_end; /* Pointer to end of non-current get area. */ struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; /* This used to be _offset but it's too small. */ /* 1+column number of pbase(); 0 is unknown. */ unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; /* char* _save_gptr; char* _save_egptr; */ _IO_lock_t *_lock; # 293 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 __off64_t _offset; void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; /* Make sure we don't get into trouble again. */ char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; typedef struct _IO_FILE _IO_FILE; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; # 333 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 /* Functions to do I/O and file management for a stream. */ /* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. Return number of bytes read. */ typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); /* Write N bytes pointed to by BUF to COOKIE. Write all N bytes unless there is an error. Return number of bytes written. If there is an error, return 0 and do not write anything. If the file has been opened for append (__mode.__append set), then set the file pointer to the end of the file and then do the write; if not, just write at the current file pointer. */ typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf, size_t __n); /* Move COOKIE's file position to *POS bytes from the beginning of the file (if W is SEEK_SET), the current position (if W is SEEK_CUR), or the end of the file (if W is SEEK_END). Set *POS to the new file position. Returns zero if successful, nonzero if not. */ typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); /* Close COOKIE. */ typedef int __io_close_fn (void *__cookie); /* User-visible names for the above. */ typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; /* The structure with the cookie function pointers. */ typedef struct { __io_read_fn *read; /* Read bytes. */ __io_write_fn *write; /* Write bytes. */ __io_seek_fn *seek; /* Seek/tell file position. */ __io_close_fn *close; /* Close file. */ } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; struct _IO_cookie_file; /* Initialize one of those. */ extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns); extern int __underflow (_IO_FILE *); extern int __uflow (_IO_FILE *); extern int __overflow (_IO_FILE *, int); # 433 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 extern int _IO_getc (_IO_FILE *__fp); extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); extern int _IO_peekc_locked (_IO_FILE *__fp); /* This one is for Emacs. */ extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); # 462 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); # 42 "/usr/include/stdio.h" 2 3 4 # 76 "/usr/include/stdio.h" 3 4 /* The type of the second argument to `fgetpos' and `fsetpos'. */ typedef _G_fpos_t fpos_t; typedef _G_fpos64_t fpos64_t; /* The possibilities for the third argument to `setvbuf'. */ /* Default buffer size. */ /* End of file character. Some things throughout the library rely on this being -1. */ /* The possibilities for the third argument to `fseek'. These values should not be changed. */ # 117 "/usr/include/stdio.h" 3 4 /* Default path prefix for `tempnam' and `tmpnam'. */ /* Get the values: L_tmpnam How long an array of chars must be to be passed to `tmpnam'. TMP_MAX The minimum number of unique filenames generated by tmpnam (and tempnam when it uses tmpnam's name space), or tempnam (the two are separate). L_ctermid How long an array to pass to `ctermid'. L_cuserid How long an array to pass to `cuserid'. FOPEN_MAX Minimum number of files that can be open at once. FILENAME_MAX Maximum length of a filename. */ # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 /* Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 132 "/usr/include/stdio.h" 2 3 4 /* Standard streams. */ extern struct _IO_FILE *stdin; /* Standard input stream. */ extern struct _IO_FILE *stdout; /* Standard output stream. */ extern struct _IO_FILE *stderr; /* Standard error output stream. */ /* C89/C99 say they're macros. Make them happy. */ /* Remove file FILENAME. */ extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)); /* Rename file OLD to NEW. */ extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__)); /* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */ extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) __attribute__ ((__nothrow__ , __leaf__)); /* Create a temporary file and open it read/write. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *tmpfile (void) /* Ignore */; # 169 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile64 (void) /* Ignore */; /* Generate a temporary filename. */ extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* This is the reentrant variant of `tmpnam'. The only difference is that it does not allow S to be NULL. */ extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Generate a unique temporary filename using up to five characters of PFX if it is not NULL. The directory to put this file in is searched for as follows: First the environment variable "TMPDIR" is checked. If it contains the name of a writable directory, that directory is used. If not and if DIR is not NULL, that value is checked. If that fails, P_tmpdir is tried and finally "/tmp". The storage for the filename is allocated by `malloc'. */ extern char *tempnam (const char *__dir, const char *__pfx) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) /* Ignore */; /* Close STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fclose (FILE *__stream); /* Flush STREAM, or all streams if STREAM is NULL. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fflush (FILE *__stream); /* Faster versions when locking is not required. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fflush_unlocked (FILE *__stream); /* Close all streams. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fcloseall (void); /* Open a file and create a new stream for it. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) /* Ignore */; /* Open a file, replacing an existing stream with it. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) /* Ignore */; # 256 "/usr/include/stdio.h" 3 4 extern FILE *fopen64 (const char *__restrict __filename, const char *__restrict __modes) /* Ignore */; extern FILE *freopen64 (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) /* Ignore */; /* Create a new stream that refers to an existing system file descriptor. */ extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. */ extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Create a new stream that refers to a memory buffer. */ extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Open a stream that writes into a malloc'd buffer that is expanded as necessary. *BUFLOC and *SIZELOC are updated with the buffer's location and the number of characters written on fflush or fclose. */ extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* If BUF is NULL, make STREAM unbuffered. Else make it use buffer BUF, of size BUFSIZ. */ extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); /* Make STREAM use buffering mode MODE. If BUF is not NULL, use N bytes of it for buffering; else allocate an internal buffer N bytes long. */ extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); /* If BUF is NULL, make STREAM unbuffered. Else make it use SIZE bytes of BUF for buffering. */ extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)); /* Make STREAM line-buffered. */ extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); /* Write formatted output to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...); /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int printf (const char *__restrict __format, ...); /* Write formatted output to S. */ extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) __attribute__ ((__nothrow__)); /* Write formatted output to S from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg); /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); /* Write formatted output to S from argument list ARG. */ extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)); /* Maximum chars of output to write in MAXLEN. */ extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) /* Ignore */; extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) /* Ignore */; extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) /* Ignore */; /* Write formatted output to a file descriptor. */ extern int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); /* Read formatted input from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) /* Ignore */; /* Read formatted input from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int scanf (const char *__restrict __format, ...) /* Ignore */; /* Read formatted input from S. */ extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); # 416 "/usr/include/stdio.h" 3 4 /* Read formatted input from S into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) /* Ignore */; /* Read formatted input from stdin into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) /* Ignore */; /* Read formatted input from S into argument list ARG. */ extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); # 473 "/usr/include/stdio.h" 3 4 /* Read a character from STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); /* Read a character from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getchar (void); /* The C standard explicitly says this is a macro, so we always do the optimization for it. */ /* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fgetc_unlocked (FILE *__stream); /* Write a character to STREAM. These functions are possible cancellation points and therefore not marked with __THROW. These functions is a possible cancellation point and therefore not marked with __THROW. */ extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); /* Write a character to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int putchar (int __c); /* The C standard explicitly says this can be a macro, so we always do the optimization for it. */ /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputc_unlocked (int __c, FILE *__stream); /* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); /* Get a word (int) from STREAM. */ extern int getw (FILE *__stream); /* Write a word (int) to STREAM. */ extern int putw (int __w, FILE *__stream); /* Get a newline-terminated string of finite length from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) /* Ignore */; # 581 "/usr/include/stdio.h" 3 4 /* This function does the same as `fgets' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) /* Ignore */; /* Read up to (and including) a DELIMITER from STREAM into *LINEPTR (and null-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'd as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) /* Ignore */; extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) /* Ignore */; /* Like `getdelim', but reads up to a newline. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) /* Ignore */; /* Write a string to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fputs (const char *__restrict __s, FILE *__restrict __stream); /* Write a string, followed by a newline, to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int puts (const char *__s); /* Push a character back onto the input buffer of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int ungetc (int __c, FILE *__stream); /* Read chunks of generic data from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) /* Ignore */; /* Write chunks of generic data to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); /* This function does the same as `fputs' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputs_unlocked (const char *__restrict __s, FILE *__restrict __stream); /* Faster versions when locking is not necessary. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) /* Ignore */; extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream); /* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseek (FILE *__stream, long int __off, int __whence); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern long int ftell (FILE *__stream) /* Ignore */; /* Rewind to the beginning of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void rewind (FILE *__stream); /* The Single Unix Specification, Version 2, specifies an alternative, more adequate interface for the two functions above which deal with file offset. `long int' is not the right type. These definitions are originally defined in the Large File Support API. */ /* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseeko (FILE *__stream, __off_t __off, int __whence); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __off_t ftello (FILE *__stream) /* Ignore */; # 727 "/usr/include/stdio.h" 3 4 /* Get STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); /* Set STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fsetpos (FILE *__stream, const fpos_t *__pos); # 750 "/usr/include/stdio.h" 3 4 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) /* Ignore */; extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); /* Clear the error and EOF indicators for STREAM. */ extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); /* Return the EOF indicator for STREAM. */ extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Return the error indicator for STREAM. */ extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Faster versions when locking is not required. */ extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Print a message describing the meaning of the value of errno. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void perror (const char *__s); /* Provide the declarations for `sys_errlist' and `sys_nerr' if they are available on this system. Even if available, these variables should not be used directly. The `strerror' function provides all the necessary functionality. */ # 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4 /* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* sys_errlist and sys_nerr are deprecated. Use strerror instead. */ extern int sys_nerr; extern const char *const sys_errlist[]; extern int _sys_nerr; extern const char *const _sys_errlist[]; # 782 "/usr/include/stdio.h" 2 3 4 /* Return the system file descriptor for STREAM. */ extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Faster version when locking is not required. */ extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Create a new stream connected to a pipe running the given command. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *popen (const char *__command, const char *__modes) /* Ignore */; /* Close a stream opened by popen and return the status of its child. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int pclose (FILE *__stream); /* Return the name of the controlling terminal. */ extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); /* Return the name of the current user. */ extern char *cuserid (char *__s); struct obstack; /* See . */ /* Write formatted output to an obstack. */ extern int obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, __gnuc_va_list __args) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); /* These are defined in POSIX.1:1996. */ /* Acquire ownership of STREAM. */ extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); /* Try to acquire ownership of STREAM but do not block if it is not possible. */ extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Relinquish the ownership granted for STREAM. */ extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); # 856 "/usr/include/stdio.h" 3 4 /* If we are compiling with optimizing read this file. It contains several optimizing inline functions and macros. */ # 868 "/usr/include/stdio.h" 3 4 # 69 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/string.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.21 String handling */ # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 2 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ # 45 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. */ /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */ /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ # 27 "/usr/include/string.h" 2 3 4 /* Get size_t and NULL from . */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 34 "/usr/include/string.h" 2 3 4 /* Tell the caller that we provide correct C++ prototypes. */ /* Copy N bytes of SRC to DEST. */ extern void *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Copy N bytes of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ extern void *memmove (void *__dest, const void *__src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set N bytes of S to C. */ extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Compare N bytes of S1 and S2. */ extern int memcmp (const void *__s1, const void *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Search N bytes of S for C. */ # 90 "/usr/include/string.h" 3 4 extern void *memchr (const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* Search in S for C. This is similar to `memchr' but there is no length limit. */ extern void *rawmemchr (const void *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* Search N bytes of S for the final occurrence of C. */ extern void *memrchr (const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* Copy SRC to DEST. */ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Copy no more than N characters of SRC to DEST. */ extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Append SRC onto DEST. */ extern char *strcat (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Append no more than N characters from SRC onto DEST. */ extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Compare S1 and S2. */ extern int strcmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Compare N characters of S1 and S2. */ extern int strncmp (const char *__s1, const char *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Compare the collated forms of S1 and S2. */ extern int strcoll (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* POSIX.1-2008 extended locale interface (see locale.h). */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4 /* Definition of locale_t. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 153 "/usr/include/string.h" 2 3 4 /* Compare the collated forms of S1 and S2, using sorting rules from L. */ extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); /* Put a transformation of SRC into no more than N bytes of DEST, using sorting rules from L. */ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); /* Duplicate S, returning an identical malloc'd string. */ extern char *strdup (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); /* Return a malloc'd copy of at most N bytes of STRING. The resultant string is terminated even if no null terminator appears before STRING[N]. */ extern char *strndup (const char *__string, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); /* Duplicate S, returning an identical alloca'd string. */ # 189 "/usr/include/string.h" 3 4 /* Return an alloca'd copy of at most N bytes of string. */ # 201 "/usr/include/string.h" 3 4 /* Find the first occurrence of C in S. */ # 225 "/usr/include/string.h" 3 4 extern char *strchr (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* Find the last occurrence of C in S. */ # 252 "/usr/include/string.h" 3 4 extern char *strrchr (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* This function is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ extern char *strchrnul (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ extern size_t strcspn (const char *__s, const char *__reject) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Return the length of the initial segment of S which consists entirely of characters in ACCEPT. */ extern size_t strspn (const char *__s, const char *__accept) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Find the first occurrence in S of any character in ACCEPT. */ # 302 "/usr/include/string.h" 3 4 extern char *strpbrk (const char *__s, const char *__accept) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Find the first occurrence of NEEDLE in HAYSTACK. */ # 329 "/usr/include/string.h" 3 4 extern char *strstr (const char *__haystack, const char *__needle) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Divide S into tokens separated by characters in DELIM. */ extern char *strtok (char *__restrict __s, const char *__restrict __delim) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Divide S into tokens separated by characters in DELIM. Information passed between calls are stored in SAVE_PTR. */ extern char *__strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); /* Similar to `strstr' but this function ignores the case of both strings. */ extern char *strcasestr (const char *__haystack, const char *__needle) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ extern void *__mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Return the length of S. */ extern size_t strlen (const char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ extern size_t strnlen (const char *__string, size_t __maxlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* Return a string describing the meaning of the `errno' code in ERRNUM. */ extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__)); /* Reentrant version of `strerror'. There are 2 flavors of `strerror_r', GNU which returns the string and may or may not use the supplied temporary buffer and POSIX one which fills the string into the buffer. To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L without -D_GNU_SOURCE is needed, otherwise the GNU version is preferred. */ # 418 "/usr/include/string.h" 3 4 /* If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) /* Ignore */; /* Translate error number to string according to the locale L. */ extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/strings.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/strings.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 24 "/usr/include/strings.h" 2 3 4 /* Tell the caller that we provide correct C++ prototypes. */ /* Compare N bytes of S1 and S2 (same as memcmp). */ extern int bcmp (const void *__s1, const void *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */ extern void bcopy (const void *__src, void *__dest, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set N bytes of S to 0. */ extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Find the first occurrence of C in S (same as strchr). */ # 68 "/usr/include/strings.h" 3 4 extern char *index (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* Find the last occurrence of C in S (same as strrchr). */ # 96 "/usr/include/strings.h" 3 4 extern char *rindex (const char *__s, int __c) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); /* Return the position of the first bit set in I, or 0 if none are set. The least-significant bit is position 1, the most-significant 32. */ extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* The following two functions are non-standard but necessary for non-32 bit platforms. */ extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* Compare S1 and S2, ignoring case. */ extern int strcasecmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* POSIX.1-2008 extended locale interface (see locale.h). */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4 /* Definition of locale_t. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 126 "/usr/include/strings.h" 2 3 4 /* Compare S1 and S2, ignoring case, using collation rules from LOC. */ extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); /* Compare no more than N chars of S1 and S2, ignoring case, using collation rules from LOC. */ extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); # 432 "/usr/include/string.h" 2 3 4 /* Set N bytes of S to 0. The compiler will not delete a call to this function, even if S is dead after the call. */ extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Return a string describing the meaning of the signal number in SIG. */ extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ extern char *__stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Compare S1 and S2 as strings holding name & indices/version numbers. */ extern int strverscmp (const char *__s1, const char *__s2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Sautee STRING briskly. */ extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Frobnicate N bytes of S. */ extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return the file name within directory of FILENAME. We don't declare the function if the `basename' macro is available (defined in ) which makes the XPG version of this function available. */ extern char *basename (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 498 "/usr/include/string.h" 3 4 # 70 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/strings.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 71 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/inttypes.h" 1 3 4 /* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99: 7.8 Format conversion of integer types */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/inttypes.h" 2 3 4 /* Get the type definitions. */ /* Get a definition for wchar_t. But we must not define wchar_t itself. */ typedef int __gwchar_t; # 51 "/usr/include/inttypes.h" 3 4 /* Macros for printing format specifiers. */ /* Decimal notation. */ # 85 "/usr/include/inttypes.h" 3 4 /* Octal notation. */ # 101 "/usr/include/inttypes.h" 3 4 /* Unsigned integers. */ # 117 "/usr/include/inttypes.h" 3 4 /* lowercase hexadecimal notation. */ # 133 "/usr/include/inttypes.h" 3 4 /* UPPERCASE hexadecimal notation. */ # 150 "/usr/include/inttypes.h" 3 4 /* Macros for printing `intmax_t' and `uintmax_t'. */ # 159 "/usr/include/inttypes.h" 3 4 /* Macros for printing `intptr_t' and `uintptr_t'. */ # 168 "/usr/include/inttypes.h" 3 4 /* Macros for scanning format specifiers. */ /* Signed decimal notation. */ # 186 "/usr/include/inttypes.h" 3 4 /* Signed decimal notation. */ # 202 "/usr/include/inttypes.h" 3 4 /* Unsigned decimal notation. */ # 218 "/usr/include/inttypes.h" 3 4 /* Octal notation. */ # 234 "/usr/include/inttypes.h" 3 4 /* Hexadecimal notation. */ # 251 "/usr/include/inttypes.h" 3 4 /* Macros for scanning `intmax_t' and `uintmax_t'. */ /* Macros for scaning `intptr_t' and `uintptr_t'. */ /* We have to define the `uintmax_t' type using `ldiv_t'. */ typedef struct { long int quot; /* Quotient. */ long int rem; /* Remainder. */ } imaxdiv_t; # 289 "/usr/include/inttypes.h" 3 4 /* Compute absolute value of N. */ extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */ extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* Like `strtol' but convert to `intmax_t'. */ extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); /* Like `strtoul' but convert to `uintmax_t'. */ extern uintmax_t strtoumax (const char *__restrict __nptr, char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); /* Like `wcstol' but convert to `intmax_t'. */ extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); /* Like `wcstoul' but convert to `uintmax_t'. */ extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, __gwchar_t ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); # 432 "/usr/include/inttypes.h" 3 4 # 72 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 1 3 4 /* Copyright (C) 1992-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* This administrivia gets added to the beginning of limits.h if the system has its own version of limits.h. */ /* We use _GCC_LIMITS_H_ because we want this not to match any macros that the system's limits.h uses for its own purposes. */ /* Use "..." so that we find syslimits.h only in this same directory. */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/syslimits.h" 1 3 4 /* syslimits.h stands for the system's own limits.h file. If we can use it ok unmodified, then we install this text. If fixincludes fixes it, then the fixed version is installed instead of this text. */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 1 3 4 /* Copyright (C) 1992-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* This administrivia gets added to the beginning of limits.h if the system has its own version of limits.h. */ /* We use _GCC_LIMITS_H_ because we want this not to match any macros that the system's limits.h uses for its own purposes. */ # 194 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 3 4 # 1 "/usr/include/limits.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types */ # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 2 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ # 45 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. */ /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */ /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ # 27 "/usr/include/limits.h" 2 3 4 /* Maximum length of any multibyte character in any locale. We define this value here since the gcc header does not define the correct value. */ /* If we are not using GNU CC we have to define all the symbols ourself. Otherwise use gcc's definitions (see below). */ # 117 "/usr/include/limits.h" 3 4 /* Get the compiler's limits.h, which defines almost all the ISO constants. We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */ /* The files in some gcc versions don't define LLONG_MIN, LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for ages are available. */ # 142 "/usr/include/limits.h" 3 4 /* The integer width macros are not defined by GCC's before GCC 7, or if _GNU_SOURCE rather than __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. */ # 182 "/usr/include/limits.h" 3 4 /* POSIX adds things to . */ # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.9.2 Minimum Values Added to * * Never include this file directly; use instead. */ /* These are the standard-mandated minimum values. */ /* Minimum number of operations in one list I/O call. */ /* Minimal number of outstanding asynchronous I/O operations. */ /* Maximum length of arguments to `execve', including environment. */ /* Maximum simultaneous processes per real user ID. */ /* Minimal number of timer expiration overruns. */ /* Maximum length of a host name (not including the terminating null) as returned from the GETHOSTNAME function. */ /* Maximum link count of a file. */ /* Maximum length of login name. */ /* Number of bytes in a terminal canonical input queue. */ /* Number of bytes for which space will be available in a terminal input queue. */ /* Maximum number of message queues open for a process. */ /* Maximum number of supported message priorities. */ /* Number of bytes in a filename. */ /* Number of simultaneous supplementary group IDs per process. */ /* Number of files one process can have open at once. */ /* Number of descriptors that a process may examine with `pselect' or `select'. */ /* Number of bytes in a pathname. */ /* Number of bytes than can be written atomically to a pipe. */ /* The number of repeated occurrences of a BRE permitted by the REGEXEC and REGCOMP functions when using the interval notation. */ /* Minimal number of realtime signals reserved for the application. */ /* Number of semaphores a process can have. */ /* Maximal value of a semaphore. */ /* Number of pending realtime signals. */ /* Largest value of a `ssize_t'. */ /* Number of streams a process can have open at once. */ /* The number of bytes in a symbolic link. */ /* The number of symbolic links that can be traversed in the resolution of a pathname in the absence of a loop. */ /* Number of timer for a process. */ /* Maximum number of characters in a tty name. */ /* Maximum length of a timezone name (element of `tzname'). */ /* Maximum number of connections that can be queued on a socket. */ /* Maximum number of bytes that can be buffered on a socket for send or receive. */ /* Maximum number of elements in an `iovec' array. */ /* Maximum clock resolution in nanoseconds. */ /* Get the implementation-specific values for the above. */ # 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4 /* Minimum guaranteed maximum values for system limits. Linux version. Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A similar thing is true for OPEN_MAX: the limit can be changed at runtime and therefore the macro must not be defined. Remove this after including the header if necessary. */ # 37 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4 /* The kernel sources contain a file with all the needed information. */ # 1 "/usr/include/linux/limits.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4 /* Have to remove NR_OPEN? */ /* Have to remove LINK_MAX? */ /* Have to remove OPEN_MAX? */ /* Have to remove ARG_MAX? */ /* The number of data keys per process. */ /* This is the value this implementation supports. */ /* Controlling the iterations of destructors for thread-specific data. */ /* Number of iterations this implementation does. */ /* The number of threads per process. */ /* We have no predefined limit on the number of threads. */ /* Maximum amount by which a process can descrease its asynchronous I/O priority level. */ /* Minimum size for a thread. We are free to choose a reasonable value. */ /* Maximum number of timer expiration overruns. */ /* Maximum tty name length. */ /* Maximum login name length. This is arbitrary. */ /* Maximum host name length. */ /* Maximum message queue priority level. */ /* Maximum value the semaphore can have. */ # 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4 /* This value is a guaranteed minimum maximum. The current maximum can be got from `sysconf'. */ # 184 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; include instead. */ /* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ /* The maximum number of elements allowed in an array by the `bc' utility. */ /* The maximum `scale' value allowed by the `bc' utility. */ /* The maximum length of a string constant accepted by the `bc' utility. */ /* The maximum number of weights that can be assigned to an entry of the LC_COLLATE `order' keyword in the locale definition file. */ /* The maximum number of expressions that can be nested within parentheses by the `expr' utility. */ /* The maximum length, in bytes, of an input line. */ /* The maximum number of repeated occurrences of a regular expression permitted when using the interval notation `\{M,N\}'. */ /* The maximum number of bytes in a character class name. We have no fixed limit, 2048 is a high number. */ /* These values are implementation-specific, and may vary within the implementation. Their precise values can be obtained from sysconf. */ # 87 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 3 4 /* This value is defined like this in regex.h. */ # 188 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 1 3 4 /* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ /* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 System Interfaces and Headers, 4.16 Please note only the values which are not greater than the minimum stated in the standard document are listed. The `sysconf' functions should be used to obtain the actual value. */ /* We do not provide fixed values for ARG_MAX Maximum length of argument to the `exec' function including environment data. ATEXIT_MAX Maximum number of functions that may be registered with `atexit'. CHILD_MAX Maximum number of simultaneous processes per real user ID. OPEN_MAX Maximum number of files that one process can have open at anyone time. PAGESIZE PAGE_SIZE Size of bytes of a page. PASS_MAX Maximum number of significant bytes in a password. We only provide a fixed limit for IOV_MAX Maximum number of `iovec' structures that one process has available for use with `readv' or writev'. if this is indeed fixed by the underlying system. */ /* Maximum number of `iovec' structures that may be used in a single call to `readv', `writev', etc. */ # 1 "/usr/include/x86_64-linux-gnu/bits/uio_lim.h" 1 3 4 /* Implementation limits related to sys/uio.h - Linux version. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Maximum length of the 'struct iovec' array in a single call to readv or writev. This macro has different values in different kernel versions. The latest versions of the kernel use 1024 and this is good choice. Since the C library implementation of readv/writev is able to emulate the functionality even if the currently running kernel does not support this large value the readv/writev call will not fail because of this. */ # 65 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 2 3 4 /* Maximum value of `digit' in calls to the `printf' and `scanf' functions. We have no limit, so return a reasonable value. */ /* Maximum number of bytes in a `LANG' name. We have no limit. */ /* Maximum message number. We have no limit. */ /* Maximum number of bytes in N-to-1 collation mapping. We have no limit. */ /* Maximum set number. We have no limit. */ /* Maximum number of bytes in a message. We have no limit. */ /* Default process priority. */ /* Number of bits in a word of type `int'. */ # 124 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 3 4 /* Number of bits in a word of type `long int'. */ # 136 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 3 4 /* Safe assumption. */ # 192 "/usr/include/limits.h" 2 3 4 # 195 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 2 3 4 # 8 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/syslimits.h" 2 3 4 # 35 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 2 3 4 /* Copyright (C) 1991-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* Number of bits in a `char'. */ /* Maximum length of a multibyte character. */ /* Minimum and maximum values a `signed char' can hold. */ /* Maximum value an `unsigned char' can hold. (Minimum is 0). */ /* Minimum and maximum values a `char' can hold. */ # 102 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 3 4 /* Minimum and maximum values a `signed short int' can hold. */ /* Maximum value an `unsigned short int' can hold. (Minimum is 0). */ /* Minimum and maximum values a `signed int' can hold. */ /* Maximum value an `unsigned int' can hold. (Minimum is 0). */ /* Minimum and maximum values a `signed long int' can hold. (Same as `int'). */ /* Maximum value an `unsigned long int' can hold. (Minimum is 0). */ /* Minimum and maximum values a `signed long long int' can hold. */ /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */ /* Minimum and maximum values a `signed long long int' can hold. */ /* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */ # 188 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 3 4 /* This administrivia gets added to the end of limits.h if the system has its own version of limits.h. */ # 73 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 73 "//qemu-2.11+dfsg/include/qemu/osdep.h" /* Put unistd.h before time.h as that triggers localtime_r/gmtime_r * function availability on recentish Mingw-w64 platforms. */ # 1 "/usr/include/unistd.h" 1 3 4 # 1 "/usr/include/unistd.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.10 Symbolic Constants */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/unistd.h" 2 3 4 /* These may be used to determine what facilities are present at compile time. Their values can be obtained at run time from `sysconf'. */ /* POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. */ # 49 "/usr/include/unistd.h" 3 4 /* These are not #ifdef __USE_POSIX2 because they are in the theoretically application-owned namespace. */ /* The utilities on GNU systems also correspond to this version. */ # 66 "/usr/include/unistd.h" 3 4 /* The utilities on GNU systems also correspond to this version. */ /* This symbol was required until the 2001 edition of POSIX. */ /* If defined, the implementation supports the C Language Bindings Option. */ /* If defined, the implementation supports the C Language Development Utilities Option. */ /* If defined, the implementation supports the Software Development Utilities Option. */ /* If defined, the implementation supports the creation of locales with the localedef utility. */ /* X/Open version number to which the library conforms. It is selectable. */ # 99 "/usr/include/unistd.h" 3 4 /* Commands and utilities from XPG4 are available. */ /* We are compatible with the old published standards as well. */ /* The X/Open Unix extensions are available. */ /* Encryption is present. */ /* The enhanced internationalization capabilities according to XPG4.2 are present. */ /* The legacy interfaces are also available. */ /* Get values of POSIX options: If these symbols are defined, the corresponding features are always available. If not, they may be available sometimes. The current values can be obtained with `sysconf'. _POSIX_JOB_CONTROL Job control is supported. _POSIX_SAVED_IDS Processes have a saved set-user-ID and a saved set-group-ID. _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. _POSIX_TIMERS POSIX.4 clocks and timers are supported. _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. _POSIX_FSYNC The fsync function is present. _POSIX_MAPPED_FILES Mapping of files to memory is supported. _POSIX_MEMLOCK Locking of all memory is supported. _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. _POSIX_THREADS POSIX.1c pthreads are supported. _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. _POSIX_THREAD_PRIORITY_SCHEDULING POSIX.1c thread execution scheduling supported. _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. _POSIX_PII Protocol-independent interfaces are supported. _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. _POSIX_PII_INTERNET Internet family of protocols supported. _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. _POSIX_PII_OSI ISO/OSI family of protocols supported. _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. _POSIX_POLL Implementation supports `poll' function. _POSIX_SELECT Implementation supports `select' and `pselect'. _XOPEN_REALTIME X/Open realtime support is available. _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. _XOPEN_SHM Shared memory interface according to XPG4.2. _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit int, long, pointer, and off_t types. _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit int, long, and pointer and off_t with at least 64 bits. _XBS5_LP64_OFF64 Implementation provides environment with 32-bit int, and 64-bit long, pointer, and off_t types. _XBS5_LPBIG_OFFBIG Implementation provides environment with at least 32 bits int and long, pointer, and off_t with at least 64 bits. If any of these symbols is defined as -1, the corresponding option is not true for any file. If any is defined as other than -1, the corresponding option is true for all files. If a symbol is not defined at all, the value for a specific file can be obtained from `pathconf' and `fpathconf'. _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change the owner of a file. `chown' can only be used to change the group ID of a file to a group of which the calling process is a member. _POSIX_NO_TRUNC Pathname components longer than NAME_MAX generate an error. _POSIX_VDISABLE If defined, if the value of an element of the `c_cc' member of `struct termios' is _POSIX_VDISABLE, no character will have the effect associated with that element. _POSIX_SYNC_IO Synchronous I/O may be performed. _POSIX_ASYNC_IO Asynchronous I/O may be performed. _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. Support for the Large File Support interface is not generally available. If it is available the following constants are defined to one. _LFS64_LARGEFILE Low-level I/O supports large files. _LFS64_STDIO Standard I/O supports large files. */ # 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4 /* Define POSIX options for Linux. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ /* Job control is supported. */ /* Processes have a saved set-user-ID and a saved set-group-ID. */ /* Priority scheduling is supported. */ /* Synchronizing file data is supported. */ /* The fsync function is present. */ /* Mapping of files to memory is supported. */ /* Locking of all memory is supported. */ /* Locking of ranges of memory is supported. */ /* Setting of memory protections is supported. */ /* Some filesystems allow all users to change file ownership. */ /* `c_cc' member of 'struct termios' structure can be disabled by using the value _POSIX_VDISABLE. */ /* Filenames are not silently truncated. */ /* X/Open realtime support is available. */ /* X/Open thread realtime support is available. */ /* XPG4.2 shared memory is supported. */ /* Tell we have POSIX threads. */ /* We have the reentrant functions described in POSIX. */ /* We provide priority scheduling for threads. */ /* We support user-defined stack sizes. */ /* We support user-defined stacks. */ /* We support priority inheritence. */ /* We support priority protection, though only for non-robust mutexes. */ /* We support priority inheritence for robust mutexes. */ /* We do not support priority protection for robust mutexes. */ /* We support POSIX.1b semaphores. */ /* Real-time signals are supported. */ /* We support asynchronous I/O. */ /* Alternative name for Unix98. */ /* Support for prioritization is also available. */ /* The LFS support in asynchronous I/O is also available. */ /* The rest of the LFS is also available. */ /* POSIX shared memory objects are implemented. */ /* CPU-time clocks support needs to be checked at runtime. */ /* Clock support in threads must be also checked at runtime. */ /* GNU libc provides regular expression handling. */ /* Reader/Writer locks are available. */ /* We have a POSIX shell. */ /* We support the Timeouts option. */ /* We support spinlocks. */ /* The `spawn' function family is supported. */ /* We have POSIX timers. */ /* The barrier functions are available. */ /* POSIX message queues are available. */ /* Thread process-shared synchronization is supported. */ /* The monotonic clock might be available. */ /* The clock selection interfaces are available. */ /* Advisory information interfaces are available. */ /* IPv6 support is available. */ /* Raw socket support is available. */ /* We have at least one terminal. */ /* Neither process nor thread sporadic server interfaces is available. */ /* trace.h is not available. */ /* Typed memory objects are not available. */ # 206 "/usr/include/unistd.h" 2 3 4 /* Get the environment definitions from Unix98. */ # 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4 /* Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4 /* This header should define the following symbols under the described situations. A value `1' means that the model is always supported, `-1' means it is never supported. Undefined means it cannot be statically decided. _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard and are available only for compatibility. */ /* Environments with 32-bit wide pointers are optionally provided. Therefore following macros aren't defined: # undef _POSIX_V7_ILP32_OFF32 # undef _POSIX_V7_ILP32_OFFBIG # undef _POSIX_V6_ILP32_OFF32 # undef _POSIX_V6_ILP32_OFFBIG # undef _XBS5_ILP32_OFF32 # undef _XBS5_ILP32_OFFBIG and users need to check at runtime. */ /* We also have no use (for now) for an environment with bigger pointers and offsets. */ /* By default we have 64-bit wide `long int', pointers and `off_t'. */ # 210 "/usr/include/unistd.h" 2 3 4 /* Standard file descriptors. */ /* All functions that are not declared anywhere else. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 221 "/usr/include/unistd.h" 2 3 4 # 229 "/usr/include/unistd.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 230 "/usr/include/unistd.h" 2 3 4 /* The Single Unix specification says that some more types are available here. */ # 277 "/usr/include/unistd.h" 3 4 typedef __socklen_t socklen_t; /* Values for the second argument to access. These may be OR'd together. */ /* Test for access to NAME using the real UID and real GID. */ extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Test for access to NAME using the effective UID and GID (as normal file operations use). */ extern int euidaccess (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* An alias for `euidaccess', used by some other systems. */ extern int eaccess (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Test for access to FILE relative to the directory FD is open on. If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess', otherwise use real IDs like `access'. */ extern int faccessat (int __fd, const char *__file, int __type, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) /* Ignore */; /* Values for the WHENCE argument to lseek. */ # 324 "/usr/include/unistd.h" 3 4 /* Old BSD names for the same constants; just for compatibility. */ /* Move FD's file position to OFFSET bytes from the beginning of the file (if WHENCE is SEEK_SET), the current position (if WHENCE is SEEK_CUR), or the end of the file (if WHENCE is SEEK_END). Return the new file position. */ extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__)); # 348 "/usr/include/unistd.h" 3 4 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__)); /* Close the file descriptor FD. This function is a cancellation point and therefore not marked with __THROW. */ extern int close (int __fd); /* Read NBYTES into BUF from FD. Return the number read, -1 for errors or 0 for EOF. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t read (int __fd, void *__buf, size_t __nbytes) /* Ignore */; /* Write N bytes of BUF to FD. Return the number written, or -1. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t write (int __fd, const void *__buf, size_t __n) /* Ignore */; /* Read NBYTES into BUF from FD at the given position OFFSET without changing the file pointer. Return the number read, -1 for errors or 0 for EOF. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) /* Ignore */; /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, __off_t __offset) /* Ignore */; # 404 "/usr/include/unistd.h" 3 4 /* Read NBYTES into BUF from FD at the given position OFFSET without changing the file pointer. Return the number read, -1 for errors or 0 for EOF. */ extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) /* Ignore */; /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. */ extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, __off64_t __offset) /* Ignore */; /* Create a one-way communication channel (pipe). If successful, two file descriptors are stored in PIPEDES; bytes written on PIPEDES[1] can be read from PIPEDES[0]. Returns 0 if successful, -1 if not. */ extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Same as pipe but apply flags passed in FLAGS to the new file descriptors. */ extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM. If SECONDS is zero, any currently scheduled alarm will be cancelled. The function returns the number of seconds remaining until the last alarm scheduled would have signaled, or zero if there wasn't one. There is no return value to indicate an error, but you can set `errno' to 0 and check its value after calling `alarm', and this might tell you. The signal may come late due to processor scheduling. */ extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__)); /* Make the process sleep for SECONDS seconds, or until a signal arrives and is not ignored. The function returns the number of seconds less than SECONDS which it actually slept (thus zero if it slept the full time). If a signal handler does a `longjmp' or modifies the handling of the SIGALRM signal while inside `sleep' call, the handling of the SIGALRM signal afterwards is undefined. There is no return value to indicate error, but if `sleep' returns SECONDS, it probably didn't work. This function is a cancellation point and therefore not marked with __THROW. */ extern unsigned int sleep (unsigned int __seconds); /* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds. If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go off every INTERVAL microseconds thereafter. Returns the number of microseconds remaining before the alarm. */ extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) __attribute__ ((__nothrow__ , __leaf__)); /* Sleep USECONDS microseconds, or until a signal arrives that is not blocked or ignored. This function is a cancellation point and therefore not marked with __THROW. */ extern int usleep (__useconds_t __useconds); /* Suspend the process until a signal arrives. This always returns -1 and sets `errno' to EINTR. This function is a cancellation point and therefore not marked with __THROW. */ extern int pause (void); /* Change the owner and group of FILE. */ extern int chown (const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Change the owner and group of the file that FD is open on. */ extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Change owner and group of FILE, if it is a symbolic link the ownership of the symbolic link is changed. */ extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Change the owner and group of FILE relative to the directory FD is open on. */ extern int fchownat (int __fd, const char *__file, __uid_t __owner, __gid_t __group, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) /* Ignore */; /* Change the process's working directory to PATH. */ extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Change the process's working directory to the one FD is open on. */ extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Get the pathname of the current working directory, and put it in SIZE bytes of BUF. Returns NULL if the directory couldn't be determined or SIZE was too small. If successful, returns BUF. In GNU, if BUF is NULL, an array is allocated with `malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Return a malloc'd string containing the current directory name. If the environment variable `PWD' is set, and its value is correct, that value is used. */ extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__)); /* Put the absolute pathname of the current working directory in BUF. If successful, return BUF. If not, put an error message in BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ extern char *getwd (char *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) /* Ignore */; /* Duplicate FD, returning a new file descriptor on the same file. */ extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Duplicate FD to FD2, closing FD2 and making it open on the same file. */ extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__)); /* Duplicate FD to FD2, closing FD2 and making it open on the same file while setting flags according to FLAGS. */ extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__)); /* NULL-terminated array of "NAME=VALUE" environment variables. */ extern char **__environ; extern char **environ; /* Replace the current process, executing PATH with arguments ARGV and environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ extern int execve (const char *__path, char *const __argv[], char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Execute the file FD refers to, overlaying the running program image. ARGV and ENVP are passed to the new program, as for `execve'. */ extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Execute PATH with arguments ARGV and environment from `environ'. */ extern int execv (const char *__path, char *const __argv[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Execute PATH with all arguments after PATH until a NULL pointer, and the argument after that for environment. */ extern int execle (const char *__path, const char *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Execute PATH with all arguments after PATH until a NULL pointer and environment from `environ'. */ extern int execl (const char *__path, const char *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ extern int execvp (const char *__file, char *const __argv[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with all arguments after FILE until a NULL pointer and environment from `environ'. */ extern int execlp (const char *__file, const char *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ extern int execvpe (const char *__file, char *const __argv[], char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Add INC to priority of the current process. */ extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Terminate program execution with the low-order 8 bits of STATUS. */ extern void _exit (int __status) __attribute__ ((__noreturn__)); /* Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; the `_SC_*' symbols for the NAME argument to `sysconf'; and the `_CS_*' symbols for the NAME argument to `confstr'. */ # 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4 /* `sysconf', `pathconf', and `confstr' NAME values. Generic version. Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Values for the NAME argument to `pathconf' and `fpathconf'. */ enum { _PC_LINK_MAX, _PC_MAX_CANON, _PC_MAX_INPUT, _PC_NAME_MAX, _PC_PATH_MAX, _PC_PIPE_BUF, _PC_CHOWN_RESTRICTED, _PC_NO_TRUNC, _PC_VDISABLE, _PC_SYNC_IO, _PC_ASYNC_IO, _PC_PRIO_IO, _PC_SOCK_MAXBUF, _PC_FILESIZEBITS, _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, _PC_REC_XFER_ALIGN, _PC_ALLOC_SIZE_MIN, _PC_SYMLINK_MAX, _PC_2_SYMLINKS }; /* Values for the argument to `sysconf'. */ enum { _SC_ARG_MAX, _SC_CHILD_MAX, _SC_CLK_TCK, _SC_NGROUPS_MAX, _SC_OPEN_MAX, _SC_STREAM_MAX, _SC_TZNAME_MAX, _SC_JOB_CONTROL, _SC_SAVED_IDS, _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, _SC_AIO_LISTIO_MAX, _SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX, _SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_VERSION, _SC_PAGESIZE, _SC_RTSIG_MAX, _SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, _SC_TIMER_MAX, /* Values for the argument to `sysconf' corresponding to _POSIX2_* symbols. */ _SC_BC_BASE_MAX, _SC_BC_DIM_MAX, _SC_BC_SCALE_MAX, _SC_BC_STRING_MAX, _SC_COLL_WEIGHTS_MAX, _SC_EQUIV_CLASS_MAX, _SC_EXPR_NEST_MAX, _SC_LINE_MAX, _SC_RE_DUP_MAX, _SC_CHARCLASS_NAME_MAX, _SC_2_VERSION, _SC_2_C_BIND, _SC_2_C_DEV, _SC_2_FORT_DEV, _SC_2_FORT_RUN, _SC_2_SW_DEV, _SC_2_LOCALEDEF, _SC_PII, _SC_PII_XTI, _SC_PII_SOCKET, _SC_PII_INTERNET, _SC_PII_OSI, _SC_POLL, _SC_SELECT, _SC_UIO_MAXIOV, _SC_IOV_MAX = _SC_UIO_MAXIOV, _SC_PII_INTERNET_STREAM, _SC_PII_INTERNET_DGRAM, _SC_PII_OSI_COTS, _SC_PII_OSI_CLTS, _SC_PII_OSI_M, _SC_T_IOV_MAX, /* Values according to POSIX 1003.1c (POSIX threads). */ _SC_THREADS, _SC_THREAD_SAFE_FUNCTIONS, _SC_GETGR_R_SIZE_MAX, _SC_GETPW_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_TTY_NAME_MAX, _SC_THREAD_DESTRUCTOR_ITERATIONS, _SC_THREAD_KEYS_MAX, _SC_THREAD_STACK_MIN, _SC_THREAD_THREADS_MAX, _SC_THREAD_ATTR_STACKADDR, _SC_THREAD_ATTR_STACKSIZE, _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PRIO_INHERIT, _SC_THREAD_PRIO_PROTECT, _SC_THREAD_PROCESS_SHARED, _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES, _SC_ATEXIT_MAX, _SC_PASS_MAX, _SC_XOPEN_VERSION, _SC_XOPEN_XCU_VERSION, _SC_XOPEN_UNIX, _SC_XOPEN_CRYPT, _SC_XOPEN_ENH_I18N, _SC_XOPEN_SHM, _SC_2_CHAR_TERM, _SC_2_C_VERSION, _SC_2_UPE, _SC_XOPEN_XPG2, _SC_XOPEN_XPG3, _SC_XOPEN_XPG4, _SC_CHAR_BIT, _SC_CHAR_MAX, _SC_CHAR_MIN, _SC_INT_MAX, _SC_INT_MIN, _SC_LONG_BIT, _SC_WORD_BIT, _SC_MB_LEN_MAX, _SC_NZERO, _SC_SSIZE_MAX, _SC_SCHAR_MAX, _SC_SCHAR_MIN, _SC_SHRT_MAX, _SC_SHRT_MIN, _SC_UCHAR_MAX, _SC_UINT_MAX, _SC_ULONG_MAX, _SC_USHRT_MAX, _SC_NL_ARGMAX, _SC_NL_LANGMAX, _SC_NL_MSGMAX, _SC_NL_NMAX, _SC_NL_SETMAX, _SC_NL_TEXTMAX, _SC_XBS5_ILP32_OFF32, _SC_XBS5_ILP32_OFFBIG, _SC_XBS5_LP64_OFF64, _SC_XBS5_LPBIG_OFFBIG, _SC_XOPEN_LEGACY, _SC_XOPEN_REALTIME, _SC_XOPEN_REALTIME_THREADS, _SC_ADVISORY_INFO, _SC_BARRIERS, _SC_BASE, _SC_C_LANG_SUPPORT, _SC_C_LANG_SUPPORT_R, _SC_CLOCK_SELECTION, _SC_CPUTIME, _SC_THREAD_CPUTIME, _SC_DEVICE_IO, _SC_DEVICE_SPECIFIC, _SC_DEVICE_SPECIFIC_R, _SC_FD_MGMT, _SC_FIFO, _SC_PIPE, _SC_FILE_ATTRIBUTES, _SC_FILE_LOCKING, _SC_FILE_SYSTEM, _SC_MONOTONIC_CLOCK, _SC_MULTI_PROCESS, _SC_SINGLE_PROCESS, _SC_NETWORKING, _SC_READER_WRITER_LOCKS, _SC_SPIN_LOCKS, _SC_REGEXP, _SC_REGEX_VERSION, _SC_SHELL, _SC_SIGNALS, _SC_SPAWN, _SC_SPORADIC_SERVER, _SC_THREAD_SPORADIC_SERVER, _SC_SYSTEM_DATABASE, _SC_SYSTEM_DATABASE_R, _SC_TIMEOUTS, _SC_TYPED_MEMORY_OBJECTS, _SC_USER_GROUPS, _SC_USER_GROUPS_R, _SC_2_PBS, _SC_2_PBS_ACCOUNTING, _SC_2_PBS_LOCATE, _SC_2_PBS_MESSAGE, _SC_2_PBS_TRACK, _SC_SYMLOOP_MAX, _SC_STREAMS, _SC_2_PBS_CHECKPOINT, _SC_V6_ILP32_OFF32, _SC_V6_ILP32_OFFBIG, _SC_V6_LP64_OFF64, _SC_V6_LPBIG_OFFBIG, _SC_HOST_NAME_MAX, _SC_TRACE, _SC_TRACE_EVENT_FILTER, _SC_TRACE_INHERIT, _SC_TRACE_LOG, _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE, _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE, _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE, _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE, _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE, /* Leave room here, maybe we need a few more cache levels some day. */ _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, _SC_RAW_SOCKETS, _SC_V7_ILP32_OFF32, _SC_V7_ILP32_OFFBIG, _SC_V7_LP64_OFF64, _SC_V7_LPBIG_OFFBIG, _SC_SS_REPL_MAX, _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS, _SC_THREAD_ROBUST_PRIO_INHERIT, _SC_THREAD_ROBUST_PRIO_PROTECT }; /* Values for the NAME argument to `confstr'. */ enum { _CS_PATH, /* The default search path. */ _CS_V6_WIDTH_RESTRICTED_ENVS, _CS_GNU_LIBC_VERSION, _CS_GNU_LIBPTHREAD_VERSION, _CS_V5_WIDTH_RESTRICTED_ENVS, _CS_V7_WIDTH_RESTRICTED_ENVS, _CS_LFS_CFLAGS = 1000, _CS_LFS_LDFLAGS, _CS_LFS_LIBS, _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, _CS_LFS64_LDFLAGS, _CS_LFS64_LIBS, _CS_LFS64_LINTFLAGS, _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, _CS_XBS5_ILP32_OFF32_LDFLAGS, _CS_XBS5_ILP32_OFF32_LIBS, _CS_XBS5_ILP32_OFF32_LINTFLAGS, _CS_XBS5_ILP32_OFFBIG_CFLAGS, _CS_XBS5_ILP32_OFFBIG_LDFLAGS, _CS_XBS5_ILP32_OFFBIG_LIBS, _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, _CS_XBS5_LP64_OFF64_CFLAGS, _CS_XBS5_LP64_OFF64_LDFLAGS, _CS_XBS5_LP64_OFF64_LIBS, _CS_XBS5_LP64_OFF64_LINTFLAGS, _CS_XBS5_LPBIG_OFFBIG_CFLAGS, _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, _CS_XBS5_LPBIG_OFFBIG_LIBS, _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V7_ILP32_OFF32_CFLAGS, _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, _CS_POSIX_V7_ILP32_OFF32_LIBS, _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LIBS, _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V7_LP64_OFF64_CFLAGS, _CS_POSIX_V7_LP64_OFF64_LDFLAGS, _CS_POSIX_V7_LP64_OFF64_LIBS, _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, _CS_V6_ENV, _CS_V7_ENV }; # 613 "/usr/include/unistd.h" 2 3 4 /* Get file-specific configuration information about PATH. */ extern long int pathconf (const char *__path, int __name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get file-specific configuration about descriptor FD. */ extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__)); /* Get the value of the system variable NAME. */ extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__)); /* Get the value of the string-valued system variable NAME. */ extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); /* Get the process ID of the calling process. */ extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__)); /* Get the process ID of the calling process's parent. */ extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__)); /* Get the process group ID of the calling process. */ extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); /* Get the process group ID of process PID. */ extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); /* Set the process group ID of the process matching PID to PGID. If PID is zero, the current process's process group ID is set. If PGID is zero, the process ID of the process is used. */ extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__)); /* Both System V and BSD have `setpgrp' functions, but with different calling conventions. The BSD function is the same as POSIX.1 `setpgid' (above). The System V function takes no arguments and puts the calling process in its on group like `setpgid (0, 0)'. New programs should always use `setpgid' instead. GNU provides the POSIX.1 function. */ /* Set the process group ID of the calling process to its own PID. This is exactly the same as `setpgid (0, 0)'. */ extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); /* Create a new session with the calling process as its leader. The process group IDs of the session and the calling process are set to the process ID of the calling process, which is returned. */ extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__)); /* Return the session ID of the given process. */ extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); /* Get the real user ID of the calling process. */ extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__)); /* Get the effective user ID of the calling process. */ extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__)); /* Get the real group ID of the calling process. */ extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__)); /* Get the effective group ID of the calling process. */ extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__)); /* If SIZE is zero, return the number of supplementary groups the calling process is in. Otherwise, fill in the group IDs of its supplementary groups in LIST and return the number written. */ extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Return nonzero iff the calling process is in group GID. */ extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); /* Set the user ID of the calling process to UID. If the calling process is the super-user, set the real and effective user IDs, and the saved set-user-ID to UID; if not, the effective user ID is set to UID. */ extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Set the real user ID of the calling process to RUID, and the effective user ID of the calling process to EUID. */ extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Set the effective user ID of the calling process to UID. */ extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Set the group ID of the calling process to GID. If the calling process is the super-user, set the real and effective group IDs, and the saved set-group-ID to GID; if not, the effective group ID is set to GID. */ extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Set the real group ID of the calling process to RGID, and the effective group ID of the calling process to EGID. */ extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Set the effective group ID of the calling process to GID. */ extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Fetch the real user ID, effective user ID, and saved-set user ID, of the calling process. */ extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) __attribute__ ((__nothrow__ , __leaf__)); /* Fetch the real group ID, effective group ID, and saved-set group ID, of the calling process. */ extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) __attribute__ ((__nothrow__ , __leaf__)); /* Set the real user ID, effective user ID, and saved-set user ID, of the calling process to RUID, EUID, and SUID, respectively. */ extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Set the real group ID, effective group ID, and saved-set group ID, of the calling process to RGID, EGID, and SGID, respectively. */ extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Clone the calling process, creating an exact copy. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ extern __pid_t fork (void) __attribute__ ((__nothrow__)); /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__)); /* Return the pathname of the terminal FD is open on, or NULL on errors. The returned storage is good only until the next call to this function. */ extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__)); /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) /* Ignore */; /* Return 1 if FD is a valid descriptor associated with a terminal, zero if not. */ extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__)); /* Return the index into the active-logins file (utmp) for the controlling terminal. */ extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__)); /* Make a link to FROM named TO. */ extern int link (const char *__from, const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) /* Ignore */; /* Like link but relative paths in TO and FROM are interpreted relative to FROMFD and TOFD respectively. */ extern int linkat (int __fromfd, const char *__from, int __tofd, const char *__to, int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) /* Ignore */; /* Make a symbolic link to FROM named TO. */ extern int symlink (const char *__from, const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) /* Ignore */; /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ extern ssize_t readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) /* Ignore */; /* Like symlink but a relative path in TO is interpreted relative to TOFD. */ extern int symlinkat (const char *__from, int __tofd, const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) /* Ignore */; /* Like readlink but a relative PATH is interpreted relative to FD. */ extern ssize_t readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) /* Ignore */; /* Remove the link NAME. */ extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Remove the link NAME relative to FD. */ extern int unlinkat (int __fd, const char *__name, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Remove the directory PATH. */ extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return the foreground process group ID of FD. */ extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__)); /* Set the foreground process group ID of FD set PGRP_ID. */ extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__)); /* Return the login name of the user. This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *getlogin (void); /* Return at most NAME_LEN characters of the login name of the user in NAME. If it cannot be determined or some other error occurred, return the error code. Otherwise return 0. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); /* Set the login name returned by `getlogin'. */ extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. */ # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 1 3 4 /* Declarations for getopt (POSIX compatibility shim). Copyright (C) 1989-2018 Free Software Foundation, Inc. Unlike the bulk of the getopt implementation, this file is NOT part of gnulib. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 27 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 1 3 4 /* Declarations for getopt (basic, portable features only). Copyright (C) 1989-2018 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* This header should not be used directly; include getopt.h or unistd.h instead. Unlike most bits headers, it does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed. */ /* For communication from 'getopt' to the caller. When 'getopt' finds an option that takes an argument, the argument value is returned here. Also, when 'ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to 'getopt'. On entry to 'getopt', zero means this is the first call; initialize. When 'getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, 'optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message 'getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, 'optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in 'optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU 'getopt'. The argument '--' causes premature termination of argument scanning, explicitly telling 'getopt' that there are no more options. If OPTS begins with '-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. For standards compliance, the 'argv' argument has the type char *const *, but this is inaccurate; if argument permutation is enabled, the argv array (not the strings it points to) must be writable. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); # 28 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 2 3 4 # 49 "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h" 3 4 # 873 "/usr/include/unistd.h" 2 3 4 /* Put the name of the current host in no more than LEN bytes of NAME. The result is null-terminated if LEN is large enough for the full name and the terminator. */ extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Set the name of the current host to NAME, which is LEN bytes long. This call is restricted to the super-user. */ extern int sethostname (const char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Set the current machine's Internet number to ID. This call is restricted to the super-user. */ extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Get and set the NIS (aka YP) domain name, if any. Called just like `gethostname' and `sethostname'. The NIS domain name is usually the empty string when not using NIS. */ extern int getdomainname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; extern int setdomainname (const char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Revoke access permissions to all processes currently communicating with the control terminal, and then send a SIGHUP signal to the process group of the control terminal. */ extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__)); /* Revoke the access of all descriptors currently open on FILE. */ extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Enable statistical profiling, writing samples of the PC into at most SIZE bytes of SAMPLE_BUFFER; every processor clock tick while profiling is enabled, the system examines the user PC and increments SAMPLE_BUFFER[((PC - OFFSET) / 2) * SCALE / 65536]. If SCALE is zero, disable profiling. Returns zero on success, -1 on error. */ extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Turn accounting on if NAME is an existing file. The system will then write a record for each process as it terminates, to this file. If NAME is NULL, turn accounting off. This call is restricted to the super-user. */ extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__)); /* Successive calls return the shells listed in `/etc/shells'. */ extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__)); extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__)); /* Discard cached info. */ extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__)); /* Rewind and re-read the file. */ /* Put the program in the background, and dissociate from the controlling terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero, redirects stdin, stdout, and stderr to /dev/null. */ extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Make PATH be the root directory (the starting point for absolute paths). This call is restricted to the super-user. */ extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Prompt with PROMPT and read a string from the terminal without echoing. Uses /dev/tty if possible; otherwise stderr and stdin. */ extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); /* Make all changes done to FD actually appear on disk. This function is a cancellation point and therefore not marked with __THROW. */ extern int fsync (int __fd); /* Make all changes done to all files on the file system associated with FD actually appear on disk. */ extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__)); /* Return identifier for the current host. */ extern long int gethostid (void); /* Make all changes done to all files actually appear on disk. */ extern void sync (void) __attribute__ ((__nothrow__ , __leaf__)); /* Return the number of bytes in a page. This is the system's page size, which is not necessarily the same as the hardware page size. */ extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* Return the maximum number of file descriptors the current process could possibly have. */ extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__)); /* Truncate FILE to LENGTH bytes. */ extern int truncate (const char *__file, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; # 1006 "/usr/include/unistd.h" 3 4 extern int truncate64 (const char *__file, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) /* Ignore */; /* Truncate the file FD is open on to LENGTH bytes. */ extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; # 1027 "/usr/include/unistd.h" 3 4 extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; # 1036 "/usr/include/unistd.h" 3 4 /* Set the end of accessible data space (aka "the break") to ADDR. Returns zero on success and -1 for errors (with errno set). */ extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; /* Increase or decrease the end of accessible data space by DELTA bytes. If successful, returns the address the previous end of data space (i.e. the beginning of the new space, if DELTA > 0); returns (void *) -1 for errors (with errno set). */ extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__)); /* Invoke `system call' number SYSNO, passing it the remaining arguments. This is completely system-dependent, and not often useful. In Unix, `syscall' sets `errno' for all errors and most calls return -1 for errors; in many systems you cannot pass arguments or get return values for all system calls (`pipe', `fork', and `getppid' typically among them). In Mach, all system calls take normal arguments and always return an error code (zero for success). */ extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__)); /* NOTE: These declarations also appear in ; be sure to keep both files consistent. Some systems have them there and some here, and some software depends on the macros being defined without including both. */ /* `lockf' is a simpler interface to the locking facilities of `fcntl'. LEN is always relative to the current file position. The CMD argument is one of the following. This function is a cancellation point and therefore not marked with __THROW. */ extern int lockf (int __fd, int __cmd, __off_t __len) /* Ignore */; # 1092 "/usr/include/unistd.h" 3 4 extern int lockf64 (int __fd, int __cmd, __off64_t __len) /* Ignore */; /* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno' set to EINTR. */ # 1109 "/usr/include/unistd.h" 3 4 /* Copy LENGTH bytes from INFD to OUTFD. */ ssize_t copy_file_range (int __infd, __off64_t *__pinoff, int __outfd, __off64_t *__poutoff, size_t __length, unsigned int __flags); /* Synchronize at least the data part of a file with the underlying media. */ extern int fdatasync (int __fildes); /* XPG4.2 specifies that prototypes for the encryption functions must be defined here. */ /* Encrypt at most 8 characters from KEY using salt to perturb DES. */ extern char *crypt (const char *__key, const char *__salt) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt block in place. */ extern void encrypt (char *__glibc_block, int __edflag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Swab pairs bytes in the first N bytes of the area pointed to by FROM and copy the result to TO. The value of TO must not be in the range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM is without partner. */ extern void swab (const void *__restrict __from, void *__restrict __to, ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Prior to Issue 6, the Single Unix Specification required these prototypes to appear in this header. They are also found in . */ # 1156 "/usr/include/unistd.h" 3 4 /* Unix98 requires this function to be declared here. In other standards it is in . */ /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on success or -1 on error. */ int getentropy (void *__buffer, size_t __length) /* Ignore */; /* Define some macros helping to catch buffer overflows. */ # 76 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/time.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/time.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 30 "/usr/include/time.h" 2 3 4 /* This defines CLOCKS_PER_SEC, which is the number of processor clock ticks per second, and possibly a number of other constants. */ # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4 /* System-dependent timing definitions. Linux version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 27 "/usr/include/x86_64-linux-gnu/bits/time.h" 2 3 4 /* ISO/IEC 9899:1999 7.23.1: Components of time The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is the number per second of the value returned by the `clock' function. */ /* CAE XSH, Issue 4, Version 2: The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ # 45 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 /* Identifier for system-wide realtime clock. */ /* Monotonic system-wide clock. */ /* High-resolution timer from the CPU. */ /* Thread-specific CPU-time clock. */ /* Monotonic system-wide clock, not adjusted for frequency scaling. */ /* Identifier for system-wide realtime clock, updated only on ticks. */ /* Monotonic system-wide clock, updated only on ticks. */ /* Monotonic system-wide clock that includes time spent in suspension. */ /* Like CLOCK_REALTIME but also wakes suspended system. */ /* Like CLOCK_BOOTTIME but also wakes suspended system. */ /* Like CLOCK_REALTIME but in International Atomic Time. */ /* Flag to indicate time is absolute. */ # 1 "/usr/include/x86_64-linux-gnu/bits/timex.h" 1 3 4 /* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 22 "/usr/include/x86_64-linux-gnu/bits/timex.h" 2 3 4 /* These definitions from linux/timex.h as of 3.18. */ struct timex { unsigned int modes; /* mode selector */ __syscall_slong_t offset; /* time offset (usec) */ __syscall_slong_t freq; /* frequency offset (scaled ppm) */ __syscall_slong_t maxerror; /* maximum error (usec) */ __syscall_slong_t esterror; /* estimated error (usec) */ int status; /* clock command/status */ __syscall_slong_t constant; /* pll time constant */ __syscall_slong_t precision; /* clock precision (usec) (ro) */ __syscall_slong_t tolerance; /* clock frequency tolerance (ppm) (ro) */ struct timeval time; /* (read only, except for ADJ_SETOFFSET) */ __syscall_slong_t tick; /* (modified) usecs between clock ticks */ __syscall_slong_t ppsfreq; /* pps frequency (scaled ppm) (ro) */ __syscall_slong_t jitter; /* pps jitter (us) (ro) */ int shift; /* interval duration (s) (shift) (ro) */ __syscall_slong_t stabil; /* pps stability (scaled ppm) (ro) */ __syscall_slong_t jitcnt; /* jitter limit exceeded (ro) */ __syscall_slong_t calcnt; /* calibration intervals (ro) */ __syscall_slong_t errcnt; /* calibration errors (ro) */ __syscall_slong_t stbcnt; /* stability limit exceeded (ro) */ int tai; /* TAI offset (ro) */ /* ??? */ int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; }; /* Mode codes (timex.mode) */ # 71 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 /* xntp 3.4 compatibility names */ # 85 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 /* Status codes (timex.status) */ # 106 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 /* Read-only bits */ # 74 "/usr/include/x86_64-linux-gnu/bits/time.h" 2 3 4 /* Tune a POSIX clock. */ extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ , __leaf__)); # 34 "/usr/include/time.h" 2 3 4 /* Many of the typedefs and structs whose official home is this header may also need to be defined by other headers. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 2 3 4 /* ISO C `broken-down time' structure. */ struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ int tm_min; /* Minutes. [0-59] */ int tm_hour; /* Hours. [0-23] */ int tm_mday; /* Day. [1-31] */ int tm_mon; /* Month. [0-11] */ int tm_year; /* Year - 1900. */ int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ long int tm_gmtoff; /* Seconds east of UTC. */ const char *tm_zone; /* Timezone abbreviation. */ }; # 40 "/usr/include/time.h" 2 3 4 # 48 "/usr/include/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 2 3 4 /* POSIX.1b structure for timer start values and intervals. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; # 49 "/usr/include/time.h" 2 3 4 struct sigevent; # 60 "/usr/include/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4 /* Definition of locale_t. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 61 "/usr/include/time.h" 2 3 4 /* Time base values for timespec_get. */ /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SEC is program time in seconds. */ extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__)); /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)); extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)); /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ /* Same as above. */ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__)); extern int daylight; extern long int timezone; /* Set the system time to *WHEN. This call is restricted to the superuser. */ extern int stime (const time_t *__when) __attribute__ ((__nothrow__ , __leaf__)); /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); /* Return the number of days in YEAR. */ extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* Pause execution for a number of nanoseconds. This function is a cancellation point and therefore not marked with __THROW. */ extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__)); /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__)); /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__)); /* High-resolution sleep with the specified clock. This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__)); /* Create new per-process timer using CLOCK_ID. */ extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__)); /* Delete timer TIMERID. */ extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); /* Set timer TIMERID to VALUE, returning old value in OVALUE. */ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__)); /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __attribute__ ((__nothrow__ , __leaf__)); /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Set to one of the following values to indicate an error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, 3 failed to get file status information, 4 the template file is not a regular file, 5 an error is encountered while reading the template file, 6 memory allication failed (not enough memory available), 7 there is no line in the template that matches the input, 8 invalid input specification Example: February 31 or a time is specified that can not be represented in a time_t (representing the time in seconds since 00:00:00 UTC, January 1, 1970) */ extern int getdate_err; /* Parse the given string as a date specification and return a value representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct tm *getdate (const char *__string); /* Since `getdate' is not reentrant because of the use of `getdate_err' and the static buffer to return the result in, we provide a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); # 77 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/ctype.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard 7.4: Character handling */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/ctype.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 27 "/usr/include/ctype.h" 2 3 4 /* These are all the characteristics of characters. If there get to be more than 16 distinct characteristics, many things must be changed that use `unsigned short int's. The characteristics are stored always in network byte order (big endian). We define the bit value interpretations here dependent on the machine's byte order. */ # 1 "/usr/include/endian.h" 1 3 4 /* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 40 "/usr/include/ctype.h" 2 3 4 enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), /* UPPERCASE. */ _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), /* lowercase. */ _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), /* Alphabetic. */ _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), /* Numeric. */ _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), /* Hexadecimal numeric. */ _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), /* Whitespace. */ _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), /* Printing. */ _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), /* Graphical. */ _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), /* Blank (usually SPC and TAB). */ _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), /* Control character. */ _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), /* Punctuation. */ _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) /* Alphanumeric. */ }; /* These are defined in ctype-info.c. The declarations here must match those in localeinfo.h. In the thread-specific locale model (see `uselocale' in ) we cannot use global variables for these as was done in the past. Instead, the following accessor functions return the address of each variable, which is local to the current thread if multithreaded. These point into arrays of 384, so they can be indexed by any `unsigned char' value [0,255]; by EOF (-1); or by any `signed char' value [-128,-1). ISO C requires that the ctype functions work for `unsigned char' values and for EOF; we also support negative `signed char' values for broken old programs. The case conversion arrays are of `int's rather than `unsigned char's because tolower (EOF) must be EOF, which doesn't fit into an `unsigned char'. But today more important is that the arrays are also used for multi-byte character sets. */ extern const unsigned short int **__ctype_b_loc (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern const __int32_t **__ctype_tolower_loc (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern const __int32_t **__ctype_toupper_loc (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); # 104 "/usr/include/ctype.h" 3 4 /* The following names are all functions: int isCHARACTERISTIC(int c); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__)); extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__)); extern int islower (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__)); extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__)); extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__)); /* Return the lowercase version of C. */ extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__)); /* Return the uppercase version of C. */ extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__)); /* ISO C99 introduced one new function. */ extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__)); /* Test C for a set of character classes according to MASK. */ extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__ , __leaf__)); /* Return nonzero iff C is in the ASCII set (i.e., is no more than 7 bits wide). */ extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); /* Return the part of C that is in the ASCII set (i.e., the low-order 7 bits of C). */ extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); /* These are the same as `toupper' and `tolower' except that they do not check the argument for being in the range of a `char'. */ extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__)); extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__)); /* This code is needed for the optimized mapping functions. */ # 236 "/usr/include/ctype.h" 3 4 /* POSIX.1-2008 extended locale interface (see locale.h). */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4 /* Definition of locale_t. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 238 "/usr/include/ctype.h" 2 3 4 /* These definitions are similar to the ones above but all functions take as an argument a handle for the locale which shall be used. */ /* The following names are all functions: int isCHARACTERISTIC(int c, locale_t *locale); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ extern int isalnum_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isalpha_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int iscntrl_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int islower_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isgraph_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isprint_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int ispunct_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isspace_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isupper_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isxdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); extern int isblank_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__)); /* Return the lowercase version of C in locale L. */ extern int __tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); extern int tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); /* Return the uppercase version of C. */ extern int __toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); extern int toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); # 327 "/usr/include/ctype.h" 3 4 # 78 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/errno.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.5 Errors */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/errno.h" 2 3 4 /* The system-specific definitions of the E* constants, as macros. */ # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4 /* Error constants. Linux specific version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # 1 "/usr/include/linux/errno.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 6 "/usr/include/asm-generic/errno.h" 2 3 4 /* * This error code is special: arch syscall entry code will return * -ENOSYS if users try to call a syscall that doesn't exist. To keep * failures of syscalls that really do exist distinguishable from * failures due to attempts to use a nonexistent syscall, syscall * implementations should refrain from returning -ENOSYS. */ # 115 "/usr/include/asm-generic/errno.h" 3 4 /* for robust mutexes */ # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4 # 1 "/usr/include/linux/errno.h" 2 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4 /* Older Linux headers do not define these constants. */ # 29 "/usr/include/errno.h" 2 3 4 /* When included from assembly language, this header only provides the E* constants. */ /* The error code set by various library functions. */ extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* The full and simple forms of the name with which the program was invoked. These variables are set up automatically at startup based on the value of argv[0]. */ extern char *program_invocation_name; extern char *program_invocation_short_name; /* bits/errno.h may have defined this type. If it didn't, provide a fallback definition. */ typedef int error_t; # 79 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/fcntl.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 6.5 File Control Operations */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/fcntl.h" 2 3 4 /* This must be early so can define types winningly. */ /* Get __mode_t, __dev_t and __off_t .*/ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 32 "/usr/include/fcntl.h" 2 3 4 /* Get the definitions of O_*, F_*, FD_*: all the numbers and flag bits for `open', `fcntl', et al. */ # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 1 3 4 /* O_*, F_*, FD_* bit values for Linux/x86. Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 28 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 3 4 /* Not necessary, we always have 64-bit offsets. */ struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ __off_t l_start; /* Offset where the lock begins. */ __off_t l_len; /* Size of the locked area; zero means until EOF. */ __pid_t l_pid; /* Process holding the lock. */ }; struct flock64 { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ __pid_t l_pid; /* Process holding the lock. */ }; /* Include generic Linux declarations. */ # 1 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 1 3 4 /* O_*, F_*, FD_* bit values for Linux. Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* This file contains shared definitions between Linux architectures and is included by to declare them. The various #ifndef cases allow the architecture specific file to define those values with different values. A minimal contains just: struct flock {...} #ifdef __USE_LARGEFILE64 struct flock64 {...} #endif #include */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 1 3 4 /* Define struct iovec. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 24 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 2 3 4 /* Structure for scatter/gather I/O. */ struct iovec { void *iov_base; /* Pointer to data. */ size_t iov_len; /* Length of data. */ }; # 39 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 2 3 4 /* open/fcntl. */ # 120 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* open file description locks. Usually record locks held by a process are released on *any* close and are not inherited across a fork. These cmd values will set locks that conflict with process-associated record locks, but are "owned" by the opened file description, not the process. This means that they are inherited across fork or clone with CLONE_FILES like BSD (flock) locks, and they are only released automatically when the last reference to the the file description against which they were acquired is put. */ # 154 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* For now, Linux has no separate synchronicity options for read operations. We define O_RSYNC therefore as the same as O_SYNC since this is a superset. */ # 166 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Values for the second argument to `fcntl'. */ # 207 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Set / get write life time hints. */ # 218 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* For F_[GET|SET]FD. */ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ /* For old implementation of BSD flock. */ /* Operations for BSD flock, also used by the kernel implementation. */ # 252 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Types of directory notifications that may be requested with F_NOTIFY. */ # 264 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Owner types. */ enum __pid_type { F_OWNER_TID = 0, /* Kernel thread. */ F_OWNER_PID, /* Process. */ F_OWNER_PGRP, /* Process group. */ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ }; /* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ struct f_owner_ex { enum __pid_type type; /* Owner type of ID. */ __pid_t pid; /* ID of owner. */ }; /* Types of seals. */ /* Hint values for F_{GET,SET}_RW_HINT. */ # 299 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ # 313 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Advise to `posix_fadvise'. */ # 325 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Flags for SYNC_FILE_RANGE. */ # 336 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Flags for SPLICE and VMSPLICE. */ # 345 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Flags for fallocate. */ # 1 "/usr/include/linux/falloc.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * FALLOC_FL_COLLAPSE_RANGE is used to remove a range of a file * without leaving a hole in the file. The contents of the file beyond * the range being removed is appended to the start offset of the range * being removed (i.e. the hole that was punched is "collapsed"), * resulting in a file layout that looks like the range that was * removed never existed. As such collapsing a range of a file changes * the size of the file, reducing it by the same length of the range * that has been removed by the operation. * * Different filesystems may implement different limitations on the * granularity of the operation. Most will limit operations to * filesystem block size boundaries, but this boundary may be larger or * smaller depending on the filesystem and/or the configuration of the * filesystem or file. * * Attempting to collapse a range that crosses the end of the file is * considered an illegal operation - just use ftruncate(2) if you need * to collapse a range that crosses EOF. */ /* * FALLOC_FL_ZERO_RANGE is used to convert a range of file to zeros preferably * without issuing data IO. Blocks should be preallocated for the regions that * span holes in the file, and the entire range is preferable converted to * unwritten extents - even though file system may choose to zero out the * extent or do whatever which will result in reading zeros from the range * while the range remains allocated for the file. * * This can be also used to preallocate blocks past EOF in the same way as * with fallocate. Flag FALLOC_FL_KEEP_SIZE should cause the inode * size to remain the same. */ /* * FALLOC_FL_INSERT_RANGE is use to insert space within the file size without * overwriting any existing data. The contents of the file beyond offset are * shifted towards right by len bytes to create a hole. As such, this * operation will increase the size of the file by len bytes. * * Different filesystems may implement different limitations on the granularity * of the operation. Most will limit operations to filesystem block size * boundaries, but this boundary may be larger or smaller depending on * the filesystem and/or the configuration of the filesystem or file. * * Attempting to insert space using this flag at OR beyond the end of * the file is considered an illegal operation - just use ftruncate(2) or * fallocate(2) with mode 0 for such type of operations. */ /* * FALLOC_FL_UNSHARE_RANGE is used to unshare shared blocks within the * file size without overwriting any existing data. The purpose of this * call is to preemptively reallocate any blocks that are subject to * copy-on-write. * * Different filesystems may implement different limitations on the * granularity of the operation. Most will limit operations to filesystem * block size boundaries, but this boundary may be larger or smaller * depending on the filesystem and/or the configuration of the filesystem * or file. * * This flag can only be used with allocate-mode fallocate, which is * to say that it cannot be used with the punch, zero, collapse, or * insert range modes. */ # 347 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 2 3 4 /* File handle structure. */ struct file_handle { unsigned int handle_bytes; int handle_type; /* File identifier. */ unsigned char f_handle[0]; }; /* Maximum handle size (for now). */ /* Values for `*at' functions. */ # 380 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 /* Provide kernel hint to read ahead. */ extern __ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __attribute__ ((__nothrow__ , __leaf__)); /* Selective file content synch'ing. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); /* Splice address range into a pipe. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, __off64_t *__offout, size_t __len, unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); /* Reserve storage for the data of the file associated with FD. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # 435 "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h" 3 4 extern int fallocate64 (int __fd, int __mode, __off64_t __offset, __off64_t __len); /* Map file name to file handle. */ extern int name_to_handle_at (int __dfd, const char *__name, struct file_handle *__handle, int *__mnt_id, int __flags) __attribute__ ((__nothrow__ , __leaf__)); /* Open file using the file handle. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, int __flags); # 61 "/usr/include/x86_64-linux-gnu/bits/fcntl.h" 2 3 4 # 36 "/usr/include/fcntl.h" 2 3 4 /* Detect if open needs mode as a third argument (or for openat as a fourth argument). */ /* POSIX.1-2001 specifies that these types are defined by . Earlier POSIX standards permitted any type ending in `_t' to be defined by any POSIX header, so we don't conditionalize the definitions here. */ # 73 "/usr/include/fcntl.h" 3 4 /* For XPG all symbols from should also be available. */ # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4 /* Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 25 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4 /* Versions of the `struct stat' data structure. */ # 40 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4 /* x86-64 versions of the `xmknod' interface. */ struct stat { __dev_t st_dev; /* Device. */ __ino_t st_ino; /* File serial number. */ __nlink_t st_nlink; /* Link count. */ __mode_t st_mode; /* File mode. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ int __pad0; __dev_t st_rdev; /* Device number, if device. */ __off_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # 106 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4 __syscall_slong_t __glibc_reserved[3]; # 115 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4 }; /* Note stat64 has the same shape as stat for x86-64. */ struct stat64 { __dev_t st_dev; /* Device. */ __ino64_t st_ino; /* File serial number. */ __nlink_t st_nlink; /* Link count. */ __mode_t st_mode; /* File mode. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ int __pad0; __dev_t st_rdev; /* Device number, if device. */ __off_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # 164 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4 __syscall_slong_t __glibc_reserved[3]; }; /* Tell code we have these members. */ /* Nanosecond resolution time values are supported. */ /* Encoding of the file mode. */ /* File types. */ # 190 "/usr/include/x86_64-linux-gnu/bits/stat.h" 3 4 /* POSIX.1b objects. Note that these macros always evaluate to zero. But they do it by enforcing the correct use of the macros. */ /* Protection bits. */ # 79 "/usr/include/fcntl.h" 2 3 4 # 95 "/usr/include/fcntl.h" 3 4 /* Protection bits. */ /* Save swapped text after use (sticky bit). This is pretty well obsolete. */ /* Read, write, and execute by owner. */ /* Read, write, and execute by group. */ /* Read, write, and execute by others. */ # 135 "/usr/include/fcntl.h" 3 4 /* XPG wants the following symbols. has the same definitions. */ /* Do the file control operation described by CMD on FD. The remaining arguments are interpreted depending on CMD. This function is a cancellation point and therefore not marked with __THROW. */ extern int fcntl (int __fd, int __cmd, ...); /* Open FILE and return a new file descriptor for it, or -1 on error. OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set in OFLAG, the third argument is taken as a `mode_t', the mode of the created file. This function is a cancellation point and therefore not marked with __THROW. */ extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); # 167 "/usr/include/fcntl.h" 3 4 extern int open64 (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); /* Similar to `open' but a relative path name is interpreted relative to the directory for which FD is a descriptor. NOTE: some other `openat' implementation support additional functionality through this interface, especially using the O_XATTR flag. This is not yet supported here. This function is a cancellation point and therefore not marked with __THROW. */ extern int openat (int __fd, const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (2))); # 192 "/usr/include/fcntl.h" 3 4 extern int openat64 (int __fd, const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (2))); /* Create and open FILE, with mode MODE. This takes an `int' MODE argument because that is what `mode_t' will be widened to. This function is a cancellation point and therefore not marked with __THROW. */ extern int creat (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1))); # 213 "/usr/include/fcntl.h" 3 4 extern int creat64 (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1))); # 246 "/usr/include/fcntl.h" 3 4 /* Advice the system about the expected behaviour of the application with respect to the file associated with FD. */ extern int posix_fadvise (int __fd, off_t __offset, off_t __len, int __advise) __attribute__ ((__nothrow__ , __leaf__)); # 261 "/usr/include/fcntl.h" 3 4 extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len, int __advise) __attribute__ ((__nothrow__ , __leaf__)); /* Reserve storage for the data of the file associated with FD. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int posix_fallocate (int __fd, off_t __offset, off_t __len); # 282 "/usr/include/fcntl.h" 3 4 extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len); /* Define some inlines helping to catch common problems. */ # 80 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/stat.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 5.6 File Characteristics */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/sys/stat.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 28 "/usr/include/x86_64-linux-gnu/sys/stat.h" 2 3 4 /* The Single Unix specification says that some more types are available here. */ # 99 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stat.h" 1 3 4 /* Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 102 "/usr/include/x86_64-linux-gnu/sys/stat.h" 2 3 4 # 121 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 /* Test macros for file types. */ # 147 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 /* These are from POSIX.1b. If the objects are not implemented using separate distinct file types, the macros always will evaluate to zero. Unlike the other S_* macros the following three take a pointer to a `struct stat' object as the argument. */ /* Protection bits. */ /* Save swapped text after use (sticky bit). This is pretty well obsolete. */ /* Read, write, and execute by owner. */ # 183 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 /* Read, write, and execute by group. */ /* Read, write, and execute by others. */ /* Macros for common mode bit masks. */ # 204 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 /* Get file attributes for FILE and put them in BUF. */ extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Get file attributes for the file, device, pipe, or socket that file descriptor FD is open on and put them in BUF. */ extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); # 224 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int stat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Similar to stat, get the attributes for FILE and put them in BUF. Relative path names are interpreted relative to FD unless FD is AT_FDCWD. */ extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); # 249 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int fstatat64 (int __fd, const char *__restrict __file, struct stat64 *__restrict __buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); /* Get file attributes about FILE and put them in BUF. If FILE is a symbolic link, do not follow it. */ extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); # 272 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int lstat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set file access permissions for FILE to MODE. If FILE is a symbolic link, this affects its target instead. */ extern int chmod (const char *__file, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Set file access permissions for FILE to MODE. If FILE is a symbolic link, this affects the link itself rather than its target. */ extern int lchmod (const char *__file, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Set file access permissions of the file FD is open on to MODE. */ extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)); /* Set file access permissions of FILE relative to the directory FD is open on. */ extern int fchmodat (int __fd, const char *__file, __mode_t __mode, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) /* Ignore */; /* Set the file creation mask of the current process to MASK, and return the old creation mask. */ extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__)); /* Get the current `umask' value without changing it. This function is only available under the GNU Hurd. */ extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__)); /* Create a new directory named PATH, with permission bits MODE. */ extern int mkdir (const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Like mkdir, create a new directory with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ extern int mkdirat (int __fd, const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor device numbers with the `makedev' macro above). */ extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Like mknod, create a new device file with permission bits MODE and device number DEV. But interpret relative PATH names relative to the directory associated with FD. */ extern int mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Create a new FIFO named PATH, with permission bits MODE. */ extern int mkfifo (const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Like mkfifo, create a new FIFO with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Set file access and modification times relative to directory file descriptor. */ extern int utimensat (int __fd, const char *__path, const struct timespec __times[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Set file access and modification times of the file associated with FD. */ extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__)); /* To allow the `struct stat' structure and the file type `mode_t' bits to vary without changing shared library major version number, the `stat' family of functions and `mknod' are in fact inline wrappers around calls to `xstat', `fxstat', `lxstat', and `xmknod', which all take a leading version-number argument designating the data structure and bits used. defines _STAT_VER with the version number corresponding to `struct stat' as defined in that file; and _MKNOD_VER with the version number corresponding to the S_IF* macros defined therein. It is arranged that when not inlined these function are always statically linked; that way a dynamically-linked executable always encodes the version number corresponding to the data structures it uses, so the `x' functions in the shared library can adapt without needing to recompile all callers. */ # 393 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 /* Wrappers for stat and mknod system calls. */ extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int __xstat (int __ver, const char *__filename, struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int __lxstat (int __ver, const char *__filename, struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int __fxstatat (int __ver, int __fildes, const char *__filename, struct stat *__stat_buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))); # 428 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); extern int __xstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int __lxstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int __fxstatat64 (int __ver, int __fildes, const char *__filename, struct stat64 *__stat_buf, int __flag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))); extern int __xmknod (int __ver, const char *__path, __mode_t __mode, __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); extern int __xmknodat (int __ver, int __fd, const char *__path, __mode_t __mode, __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 5))); # 530 "/usr/include/x86_64-linux-gnu/sys/stat.h" 3 4 # 81 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/time.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 24 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4 # 32 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4 /* `fd_set' type and related macros, and `select'/`pselect' declarations. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets */ # 33 "/usr/include/x86_64-linux-gnu/sys/time.h" 2 3 4 /* Macros for converting between `struct timeval' and `struct timespec'. */ # 50 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 /* Structure crudely representing a timezone. This is obsolete and should never be used. */ struct timezone { int tz_minuteswest; /* Minutes west of GMT. */ int tz_dsttime; /* Nonzero if DST is ever in effect. */ }; typedef struct timezone *__restrict __timezone_ptr_t; /* Get the current time of day and timezone information, putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled. Returns 0 on success, -1 on errors. NOTE: This form of timezone information is obsolete. Use the functions and variables declared in instead. */ extern int gettimeofday (struct timeval *__restrict __tv, __timezone_ptr_t __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Set the current time of day and timezone information. This call is restricted to the super-user. */ extern int settimeofday (const struct timeval *__tv, const struct timezone *__tz) __attribute__ ((__nothrow__ , __leaf__)); /* Adjust the current time of day by the amount in DELTA. If OLDDELTA is not NULL, it is filled in with the amount of time adjustment remaining to be done from the last `adjtime' call. This call is restricted to the super-user. */ extern int adjtime (const struct timeval *__delta, struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__)); /* Values for the first argument to `getitimer' and `setitimer'. */ enum __itimer_which { /* Timers run in real time. */ ITIMER_REAL = 0, /* Timers run only when the process is executing. */ ITIMER_VIRTUAL = 1, /* Timers run when the process is executing and when the system is executing on behalf of the process. */ ITIMER_PROF = 2 }; /* Type of the second argument to `getitimer' and the second and third arguments `setitimer'. */ struct itimerval { /* Value to put into `it_value' when the timer expires. */ struct timeval it_interval; /* Time to the next timer expiration. */ struct timeval it_value; }; /* Use the nicer parameter type only in GNU mode and not for C++ since the strict C++ rules prevent the automatic promotion. */ typedef enum __itimer_which __itimer_which_t; /* Set *VALUE to the current setting of timer WHICH. Return 0 on success, -1 on errors. */ extern int getitimer (__itimer_which_t __which, struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__)); /* Set the timer WHICH to *NEW. If OLD is not NULL, set *OLD to the old value of timer WHICH. Returns 0 on success, -1 on errors. */ extern int setitimer (__itimer_which_t __which, const struct itimerval *__restrict __new, struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__)); /* Change the access time of FILE to TVP[0] and the modification time of FILE to TVP[1]. If TVP is a null pointer, use the current time instead. Returns 0 on success, -1 on errors. */ extern int utimes (const char *__file, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Same as `utimes', but does not follow symbolic links. */ extern int lutimes (const char *__file, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Same as `utimes', but takes an open file descriptor instead of a name. */ extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); /* Change the access time of FILE relative to FD to TVP[0] and the modification time of FILE to TVP[1]. If TVP is a null pointer, use the current time instead. Returns 0 on success, -1 on errors. */ extern int futimesat (int __fd, const char *__file, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); /* Convenience macros for operations on timevals. NOTE: `timercmp' does not work for >= or <=. */ # 186 "/usr/include/x86_64-linux-gnu/sys/time.h" 3 4 # 82 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/assert.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.2 Diagnostics */ # 35 "/usr/include/assert.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 36 "/usr/include/assert.h" 2 3 4 /* void assert (int expression); If NDEBUG is defined, do nothing. If not, and EXPRESSION is zero, print an error message and abort. */ # 66 "/usr/include/assert.h" 3 4 /* This prints an "Assertion failed" message and aborts. */ extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); /* Likewise, but prints the error text for ERRNUM. */ extern void __assert_perror_fail (int __errnum, const char *__file, unsigned int __line, const char *__function) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); /* The following is not at all used here but needed for standard compliance. */ extern void __assert (const char *__assertion, const char *__file, int __line) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); /* When possible, define assert so that it does not add extra parentheses around EXPR. Otherwise, those added parentheses would suppress warnings we'd expect to be detected by gcc's -Wparentheses. */ # 102 "/usr/include/assert.h" 3 4 /* The first occurrence of EXPR is not evaluated due to the sizeof, but will trigger any pedantic warnings masked by the __extension__ for the second occurrence. The ternary operator is required to support function pointers and bit fields in this context, and to suppress the evaluation of variable length arrays. */ # 123 "/usr/include/assert.h" 3 4 /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' which contains the name of the function currently being defined. This is broken in G++ before version 2.6. C9x has a similar variable called __func__, but prefer the GCC one since it demangles C++ function names. */ # 83 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 83 "//qemu-2.11+dfsg/include/qemu/osdep.h" /* setjmp must be declared before sysemu/os-win32.h * because it is redefined there. */ # 1 "/usr/include/setjmp.h" 1 3 4 # 1 "/usr/include/setjmp.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.13 Nonlocal jumps */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/setjmp.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4 /* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Define the machine-dependent type `jmp_buf'. x86-64 version. */ # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4 typedef long int __jmp_buf[8]; # 30 "/usr/include/setjmp.h" 2 3 4 /* Calling environment, plus possibly a saved signal mask. */ struct __jmp_buf_tag { /* NOTE: The machine-dependent definitions of `__sigsetjmp' assume that a `jmp_buf' begins with a `__jmp_buf' and that `__mask_was_saved' follows it. Do not move these members or add others before it. */ __jmp_buf __jmpbuf; /* Calling environment. */ int __mask_was_saved; /* Saved the signal mask? */ __sigset_t __saved_mask; /* Saved signal mask. */ }; typedef struct __jmp_buf_tag jmp_buf[1]; /* Store the calling environment in ENV, also saving the signal mask. Return 0. */ extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); /* Store the calling environment in ENV, also saving the signal mask if SAVEMASK is nonzero. Return 0. This is the internal name for `sigsetjmp'. */ extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); /* Store the calling environment in ENV, not saving the signal mask. Return 0. */ extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); /* Do not save the signal mask. This is equivalent to the `_setjmp' BSD function. */ /* Jump to the environment saved in ENV, making the `setjmp' call there return VAL, or 1 if VAL is 0. */ extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); /* Same. Usually `_longjmp' is used with `_setjmp', which does not save the signal mask. But it is how ENV was saved that determines whether `longjmp' restores the mask; `_longjmp' is just an alias. */ extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); /* Use the same type for `jmp_buf' and `sigjmp_buf'. The `__mask_was_saved' flag determines whether or not `longjmp' will restore the signal mask. */ typedef struct __jmp_buf_tag sigjmp_buf[1]; /* Store the calling environment in ENV, also saving the signal mask if SAVEMASK is nonzero. Return 0. */ /* Jump to the environment saved in ENV, making the sigsetjmp call there return VAL, or 1 if VAL is 0. Restore the signal mask if that sigsetjmp call saved it. This is just an alias `longjmp'. */ extern void siglongjmp (sigjmp_buf __env, int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); /* Define helper functions to catch unsafe code. */ # 86 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/signal.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.14 Signal handling */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 30 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/signum.h" 1 3 4 /* Signal number definitions. Linux version. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/signum.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 1 3 4 /* Signal number constants. Generic template. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 3 4 /* Fake signal functions. */ # 36 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 3 4 /* We define here all the signal names listed in POSIX (1003.1-2008); as of 1003.1-2013, no additional signals have been added by POSIX. We also define here signal names that historically exist in every real-world POSIX variant (e.g. SIGWINCH). Signals in the 1-15 range are defined with their historical numbers. For other signals, we use the BSD numbers. There are two unallocated signal numbers in the 1-31 range: 7 and 29. Signal number 0 is reserved for use as kill(pid, 0), to test whether a process exists without sending it a signal. */ /* ISO C99 signals. */ /* Historical signals specified by POSIX. */ # 65 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 3 4 /* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ # 81 "/usr/include/x86_64-linux-gnu/bits/signum-generic.h" 3 4 /* Nonstandard signals found in all modern POSIX systems (including both BSD and Linux). */ /* Archaic names for compatibility. */ /* Not all systems support real-time signals. bits/signum.h indicates that they are supported by overriding __SIGRTMAX to a value greater than __SIGRTMIN. These constants give the kernel-level hard limits, but some real-time signals may be used internally by glibc. Do not use these constants in application code; use SIGRTMIN and SIGRTMAX (defined in signal.h) instead. */ /* Biggest signal number + 1 (including real-time signals). */ # 27 "/usr/include/x86_64-linux-gnu/bits/signum.h" 2 3 4 /* Adjustments and additions to the signal number constants for most Linux systems. */ # 31 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h" 2 3 4 /* An integral type that can be modified atomically, without the possibility of a signal arriving in the middle of the operation. */ typedef __sig_atomic_t sig_atomic_t; # 33 "/usr/include/signal.h" 2 3 4 # 52 "/usr/include/signal.h" 3 4 /* We need `struct timespec' later on. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 6 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h" 1 3 4 /* Define __sigval_t. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Type for data associated with a signal. */ union sigval { int sival_int; void *sival_ptr; }; typedef union sigval __sigval_t; # 7 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4 # 15 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 3 4 /* Some fields of siginfo_t have architecture-specific variations. */ # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h" 1 3 4 /* Architecture-specific adjustments to siginfo_t. x86 version. */ # 17 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 2 3 4 # 36 "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h" 3 4 typedef struct { int si_signo; /* Signal number. */ int si_errno; /* If non-zero, an errno value associated with this signal, as defined in . */ int si_code; /* Signal code. */ int __pad0; /* Explicit padding. */ union { int _pad[((128 / sizeof (int)) - 4)]; /* kill(). */ struct { __pid_t si_pid; /* Sending process ID. */ __uid_t si_uid; /* Real user ID of sending process. */ } _kill; /* POSIX.1b timers. */ struct { int si_tid; /* Timer ID. */ int si_overrun; /* Overrun count. */ __sigval_t si_sigval; /* Signal value. */ } _timer; /* POSIX.1b signals. */ struct { __pid_t si_pid; /* Sending process ID. */ __uid_t si_uid; /* Real user ID of sending process. */ __sigval_t si_sigval; /* Signal value. */ } _rt; /* SIGCHLD. */ struct { __pid_t si_pid; /* Which child. */ __uid_t si_uid; /* Real user ID of sending process. */ int si_status; /* Exit value or signal. */ __clock_t si_utime; __clock_t si_stime; } _sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ struct { void *si_addr; /* Faulting insn/memory ref. */ /* nothing */ short int si_addr_lsb; /* Valid LSB of the reported address. */ union { /* used when si_code=SEGV_BNDERR */ struct { void *_lower; void *_upper; } _addr_bnd; /* used when si_code=SEGV_PKUERR */ __uint32_t _pkey; } _bounds; } _sigfault; /* SIGPOLL. */ struct { long int si_band; /* Band event for SIGPOLL. */ int si_fd; } _sigpoll; /* SIGSYS. */ struct { void *_call_addr; /* Calling user insn. */ int _syscall; /* Triggering system call number. */ unsigned int _arch; /* AUDIT_ARCH_* of syscall. */ } _sigsys; } _sifields; } siginfo_t /* nothing */; /* X/Open requires some more fields with fixed names. */ # 58 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 1 3 4 /* siginfo constants. Linux version. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4 /* Most of these constants are uniform across all architectures, but there is one exception. */ # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h" 1 3 4 /* Architecture-specific adjustments to siginfo_t. x86 version. */ # 29 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 2 3 4 /* Values for `si_code'. Positive values are reserved for kernel-generated signals. */ enum { SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ SI_TKILL = -6, /* Sent by tkill. */ SI_SIGIO, /* Sent by queued SIGIO. */ SI_ASYNCIO, /* Sent by AIO completion. */ SI_MESGQ, /* Sent by real time mesq state change. */ SI_TIMER, /* Sent by timer expiration. */ SI_QUEUE, /* Sent by sigqueue. */ SI_USER, /* Sent by kill, sigsend. */ SI_KERNEL = 0x80 /* Send by kernel. */ # 63 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 3 4 }; /* `si_code' values for SIGILL signal. */ enum { ILL_ILLOPC = 1, /* Illegal opcode. */ ILL_ILLOPN, /* Illegal operand. */ ILL_ILLADR, /* Illegal addressing mode. */ ILL_ILLTRP, /* Illegal trap. */ ILL_PRVOPC, /* Privileged opcode. */ ILL_PRVREG, /* Privileged register. */ ILL_COPROC, /* Coprocessor error. */ ILL_BADSTK /* Internal stack error. */ }; /* `si_code' values for SIGFPE signal. */ enum { FPE_INTDIV = 1, /* Integer divide by zero. */ FPE_INTOVF, /* Integer overflow. */ FPE_FLTDIV, /* Floating point divide by zero. */ FPE_FLTOVF, /* Floating point overflow. */ FPE_FLTUND, /* Floating point underflow. */ FPE_FLTRES, /* Floating point inexact result. */ FPE_FLTINV, /* Floating point invalid operation. */ FPE_FLTSUB /* Subscript out of range. */ }; /* `si_code' values for SIGSEGV signal. */ enum { SEGV_MAPERR = 1, /* Address not mapped to object. */ SEGV_ACCERR, /* Invalid permissions for mapped object. */ SEGV_BNDERR, /* Bounds checking failure. */ SEGV_PKUERR /* Protection key checking failure. */ }; /* `si_code' values for SIGBUS signal. */ enum { BUS_ADRALN = 1, /* Invalid address alignment. */ BUS_ADRERR, /* Non-existant physical address. */ BUS_OBJERR, /* Object specific hardware error. */ BUS_MCEERR_AR, /* Hardware memory error: action required. */ BUS_MCEERR_AO /* Hardware memory error: action optional. */ }; /* `si_code' values for SIGTRAP signal. */ enum { TRAP_BRKPT = 1, /* Process breakpoint. */ TRAP_TRACE /* Process trace trap. */ }; /* `si_code' values for SIGCHLD signal. */ enum { CLD_EXITED = 1, /* Child has exited. */ CLD_KILLED, /* Child was killed. */ CLD_DUMPED, /* Child terminated abnormally. */ CLD_TRAPPED, /* Traced child has trapped. */ CLD_STOPPED, /* Child has stopped. */ CLD_CONTINUED /* Stopped child has continued. */ }; /* `si_code' values for SIGPOLL signal. */ enum { POLL_IN = 1, /* Data input available. */ POLL_OUT, /* Output buffers available. */ POLL_MSG, /* Input message available. */ POLL_ERR, /* I/O error. */ POLL_PRI, /* High priority input available. */ POLL_HUP /* Device disconnected. */ }; /* Architectures might also add architecture-specific constants. These are all considered GNU extensions. */ # 1 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts-arch.h" 1 3 4 /* Architecture-specific additional siginfo constants. */ /* This architecture has no additional siginfo constants. */ # 189 "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h" 2 3 4 # 59 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h" 1 3 4 /* Define __sigval_t. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h" 2 3 4 /* To avoid sigval_t (not a standard type name) having C++ name mangling depending on whether the selected standard includes union sigval, it should not be defined at all when using a standard for which the sigval name is not reserved; in that case, headers should not include and should use only the internal __sigval_t name. */ typedef __sigval_t sigval_t; # 63 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 6 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h" 1 3 4 /* Define __sigval_t. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 7 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 2 3 4 # 15 "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h" 3 4 /* Forward declaration. */ /* Structure to transport application-defined values with signals. */ typedef struct sigevent { __sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 / sizeof (int)) - 4)]; /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the thread to receive the signal. */ __pid_t _tid; struct { void (*_function) (__sigval_t); /* Function to start. */ pthread_attr_t *_attribute; /* Thread attributes. */ } _sigev_thread; } _sigev_un; } sigevent_t; /* POSIX names to access some of the members. */ # 67 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h" 1 3 4 /* sigevent constants. Linux version. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h" 3 4 /* `sigev_notify' values. */ enum { SIGEV_SIGNAL = 0, /* Notify via signal. */ SIGEV_NONE, /* Other notification: meaningless. */ SIGEV_THREAD, /* Deliver via thread creation. */ SIGEV_THREAD_ID = 4 /* Send signal to specific thread. This is a Linux extension. */ }; # 68 "/usr/include/signal.h" 2 3 4 /* Type of a signal handler. */ typedef void (*__sighandler_t) (int); /* The X/Open definition of `signal' specifies the SVID semantic. Use the additional function `sysv_signal' when X/Open compatibility is requested. */ extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); /* Set the handler for the signal SIG to HANDLER, returning the old handler, or SIG_ERR on error. By default `signal' has the BSD semantic. */ extern __sighandler_t signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); # 108 "/usr/include/signal.h" 3 4 /* Send signal SIG to process number PID. If PID is zero, send SIG to all processes in the current process's process group. If PID is < -1, send SIG to all processes in process group - PID. */ extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__)); /* Send SIG to all processes in process group PGRP. If PGRP is zero, send SIG to all processes in the current process's process group. */ extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__)); /* Raise signal SIG, i.e., send SIG to yourself. */ extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__)); /* SVID names for the same things. */ extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__ , __leaf__)); extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); /* Print a message describing the meaning of the given signal number. */ extern void psignal (int __sig, const char *__s); /* Print a message describing the meaning of the given signal information. */ extern void psiginfo (const siginfo_t *__pinfo, const char *__s); /* The `sigpause' function in X/Open defines the argument as the signal number. This requires redirecting to another function because the default version in glibc uses an old BSD interface. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); # 161 "/usr/include/signal.h" 3 4 /* None of the following functions should be used anymore. They are here only for compatibility. A single word (`int') is not guaranteed to be enough to hold a complete signal mask and therefore these functions simply do not work in many situations. Use `sigprocmask' instead. */ /* Compute mask for signal SIG. */ /* Block signals in MASK, returning the old mask. */ extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); /* Set the mask of blocked signals to MASK, returning the old mask. */ extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); /* Return currently selected signal mask. */ extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); # 185 "/usr/include/signal.h" 3 4 typedef __sighandler_t sighandler_t; /* 4.4 BSD uses the name `sig_t' for this. */ typedef __sighandler_t sig_t; /* Clear all signals from SET. */ extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Set all signals in SET. */ extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Add SIGNO to SET. */ extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Remove SIGNO from SET. */ extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return 1 if SIGNO is in SET, 0 if not. */ extern int sigismember (const sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return non-empty value is SET is not empty. */ extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Build new signal set by combining the two inputs set using logical AND. */ extern int sigandset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); /* Build new signal set by combining the two inputs set using logical OR. */ extern int sigorset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); /* Get the system-specific definitions of `struct sigaction' and the `SA_*' and `SIG_*'. constants. */ # 1 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 1 3 4 /* The proper definitions for Linux's sigaction. Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { /* Signal handler. */ union { /* Used if SA_SIGINFO is not set. */ __sighandler_t sa_handler; /* Used if SA_SIGINFO is set. */ void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; /* Additional set of signals to be blocked. */ __sigset_t sa_mask; /* Special flags. */ int sa_flags; /* Restore handler. */ void (*sa_restorer) (void); }; /* Bits in `sa_flags'. */ # 69 "/usr/include/x86_64-linux-gnu/bits/sigaction.h" 3 4 /* Some aliases for the SA_ constants. */ /* Values for the HOW argument to `sigprocmask'. */ # 227 "/usr/include/signal.h" 2 3 4 /* Get and/or change the set of blocked signals. */ extern int sigprocmask (int __how, const sigset_t *__restrict __set, sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__)); /* Change the set of blocked signals to SET, wait until a signal arrives, and restore the set of blocked signals. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1))); /* Get and/or set the action for signal SIG. */ extern int sigaction (int __sig, const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__)); /* Put in SET all signals that are blocked and waiting to be delivered. */ extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Select any of pending signals from SET or wait for any to arrive. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) __attribute__ ((__nonnull__ (1, 2))); /* Select any of pending signals from SET and place information in INFO. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigwaitinfo (const sigset_t *__restrict __set, siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); /* Select any of pending signals from SET and place information in INFO. Wait the time specified by TIMEOUT if no signal is pending. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigtimedwait (const sigset_t *__restrict __set, siginfo_t *__restrict __info, const struct timespec *__restrict __timeout) __attribute__ ((__nonnull__ (1))); /* Send signal SIG to the process PID. Associate data in VAL with the signal. */ extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) __attribute__ ((__nothrow__ , __leaf__)); /* Names of the signals. This variable exists only for compatibility. Use `strsignal' instead (see ). */ extern const char *const _sys_siglist[(64 + 1)]; extern const char *const sys_siglist[(64 + 1)]; /* Get machine-dependent `struct sigcontext' and signal subcodes. */ # 1 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 1 3 4 /* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 25 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 26 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 2 3 4 struct _fpx_sw_bytes { __uint32_t magic1; __uint32_t extended_size; __uint64_t xstate_bv; __uint32_t xstate_size; __uint32_t __glibc_reserved1[7]; }; struct _fpreg { unsigned short significand[4]; unsigned short exponent; }; struct _fpxreg { unsigned short significand[4]; unsigned short exponent; unsigned short __glibc_reserved1[3]; }; struct _xmmreg { __uint32_t element[4]; }; # 123 "/usr/include/x86_64-linux-gnu/bits/sigcontext.h" 3 4 struct _fpstate { /* FPU environment matching the 64-bit FXSAVE layout. */ __uint16_t cwd; __uint16_t swd; __uint16_t ftw; __uint16_t fop; __uint64_t rip; __uint64_t rdp; __uint32_t mxcsr; __uint32_t mxcr_mask; struct _fpxreg _st[8]; struct _xmmreg _xmm[16]; __uint32_t __glibc_reserved1[24]; }; struct sigcontext { __uint64_t r8; __uint64_t r9; __uint64_t r10; __uint64_t r11; __uint64_t r12; __uint64_t r13; __uint64_t r14; __uint64_t r15; __uint64_t rdi; __uint64_t rsi; __uint64_t rbp; __uint64_t rbx; __uint64_t rdx; __uint64_t rax; __uint64_t rcx; __uint64_t rsp; __uint64_t rip; __uint64_t eflags; unsigned short cs; unsigned short gs; unsigned short fs; unsigned short __pad0; __uint64_t err; __uint64_t trapno; __uint64_t oldmask; __uint64_t cr2; __extension__ union { struct _fpstate * fpstate; __uint64_t __fpstate_word; }; __uint64_t __reserved1 [8]; }; struct _xsave_hdr { __uint64_t xstate_bv; __uint64_t __glibc_reserved1[2]; __uint64_t __glibc_reserved2[5]; }; struct _ymmh_state { __uint32_t ymmh_space[64]; }; struct _xstate { struct _fpstate fpstate; struct _xsave_hdr xstate_hdr; struct _ymmh_state ymmh; }; # 292 "/usr/include/signal.h" 2 3 4 /* Restore the state saved in SCP. */ extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 302 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 1 3 4 /* Define stack_t. Linux version. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 24 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 2 3 4 /* Structure describing a signal stack. */ typedef struct { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; # 304 "/usr/include/signal.h" 2 3 4 /* This will define `ucontext_t' and `mcontext_t'. */ # 1 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 1 3 4 /* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 24 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h" 1 3 4 /* Define stack_t. Linux version. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 2 3 4 # 36 "/usr/include/x86_64-linux-gnu/sys/ucontext.h" 3 4 /* Type for general register. */ __extension__ typedef long long int greg_t; /* Number of general registers. */ /* Container for all general registers. */ typedef greg_t gregset_t[23]; /* Number of each register in the `gregset_t' array. */ enum { REG_R8 = 0, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RDI, REG_RSI, REG_RBP, REG_RBX, REG_RDX, REG_RAX, REG_RCX, REG_RSP, REG_RIP, REG_EFL, REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */ REG_ERR, REG_TRAPNO, REG_OLDMASK, REG_CR2 }; struct _libc_fpxreg { unsigned short int significand[4]; unsigned short int exponent; unsigned short int __glibc_reserved1[3]; }; struct _libc_xmmreg { __uint32_t element[4]; }; struct _libc_fpstate { /* 64-bit FXSAVE format. */ __uint16_t cwd; __uint16_t swd; __uint16_t ftw; __uint16_t fop; __uint64_t rip; __uint64_t rdp; __uint32_t mxcsr; __uint32_t mxcr_mask; struct _libc_fpxreg _st[8]; struct _libc_xmmreg _xmm[16]; __uint32_t __glibc_reserved1[24]; }; /* Structure to describe FPU registers. */ typedef struct _libc_fpstate *fpregset_t; /* Context to describe whole processor state. */ typedef struct { gregset_t gregs; /* Note that fpregs is a pointer. */ fpregset_t fpregs; __extension__ unsigned long long __reserved1 [8]; } mcontext_t; /* Userlevel context. */ typedef struct ucontext_t { unsigned long int uc_flags; struct ucontext_t *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; } ucontext_t; # 307 "/usr/include/signal.h" 2 3 4 /* If INTERRUPT is nonzero, make signal SIG interrupt system calls (causing them to fail with EINTR); if INTERRUPT is zero, make system calls be restarted after signal SIG. */ extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 1 3 4 /* sigstack, sigaltstack definitions. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/sigstack.h" 3 4 /* Minimum stack size for a signal handler. */ /* System default stack size. */ # 317 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/ss_flags.h" 1 3 4 /* ss_flags values for stack_t. Linux version. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/ss_flags.h" 3 4 /* Possible values for `ss_flags'. */ enum { SS_ONSTACK = 1, SS_DISABLE }; # 318 "/usr/include/signal.h" 2 3 4 /* Alternate signal handler stack interface. This interface should always be preferred over `sigstack'. */ extern int sigaltstack (const stack_t *__restrict __ss, stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__)); # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h" 1 3 4 /* Define struct sigstack. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Structure describing a signal stack (obsolete). */ struct sigstack { void *ss_sp; /* Signal stack pointer. */ int ss_onstack; /* Nonzero if executing on this stack. */ }; # 328 "/usr/include/signal.h" 2 3 4 /* Run signals handlers on the stack specified by SS (if not NULL). If OSS is not NULL, it is filled in with the old signal stack status. This interface is obsolete and on many platform not implemented. */ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); /* Simplified interface for signal management. */ /* Add SIG to the calling process' signal mask. */ extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__)); /* Remove SIG from the calling process' signal mask. */ extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__)); /* Set the disposition of SIG to SIG_IGN. */ extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__)); /* Set the disposition of SIG. */ extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__)); /* Some of the functions for handling signals in threaded programs must be defined here. */ # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 /* Declaration of common pthread types for all architectures. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 359 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 1 3 4 /* Signal handling function for threaded programs. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/sigthread.h" 3 4 /* Functions for handling signals. */ /* Modify the signal mask for the calling thread. The arguments have the same meaning as for sigprocmask(2). */ extern int pthread_sigmask (int __how, const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__)); /* Send signal SIGNO to the given thread. */ extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__)); /* Queue signal and data to a thread. */ extern int pthread_sigqueue (pthread_t __threadid, int __signo, const union sigval __value) __attribute__ ((__nothrow__ , __leaf__)); # 360 "/usr/include/signal.h" 2 3 4 /* The following functions are used internally in the C library and in other code which need deep insights. */ /* Return number of available real-time signal with highest priority. */ extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__)); /* Return number of available real-time signal with lowest priority. */ extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__)); # 87 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/wait.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 3.2.1 Wait for Process Termination */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 30 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4 # 1 "/usr/include/signal.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.14 Signal handling */ # 37 "/usr/include/x86_64-linux-gnu/sys/wait.h" 2 3 4 # 45 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 /* These macros could also be defined in . */ # 72 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. This function is a cancellation point and therefore not marked with __THROW. */ extern __pid_t wait (int *__stat_loc); /* Special values for the PID argument to `waitpid' and `wait4'. */ /* Wait for a child matching PID to die. If PID is greater than 0, match any process whose process ID is PID. If PID is (pid_t) -1, match any process. If PID is (pid_t) 0, match any process with the same process group as the current process. If PID is less than -1, match any process whose process group is the absolute value of PID. If the WNOHANG bit is set in OPTIONS, and that child is not already dead, return (pid_t) 0. If successful, return PID and store the dead child's status in STAT_LOC. Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, return status for stopped children; otherwise don't. This function is a cancellation point and therefore not marked with __THROW. */ extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); # 110 "/usr/include/x86_64-linux-gnu/sys/wait.h" 3 4 /* Wait for a childing matching IDTYPE and ID to change the status and place appropriate information in *INFOP. If IDTYPE is P_PID, match any process whose process ID is ID. If IDTYPE is P_PGID, match any process whose process group is ID. If IDTYPE is P_ALL, match any process. If the WNOHANG bit is set in OPTIONS, and that child is not already dead, clear *INFOP and return 0. If successful, store exit code and status in *INFOP. This function is a cancellation point and therefore not marked with __THROW. */ extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, int __options); /* This being here makes the prototypes valid whether or not we have already included to define `struct rusage'. */ struct rusage; /* Wait for a child to exit. When one does, put its status in *STAT_LOC and return its process ID. For errors return (pid_t) -1. If USAGE is not nil, store information about the child's resource usage there. If the WUNTRACED bit is set in OPTIONS, return status for stopped children; otherwise don't. */ extern __pid_t wait3 (int *__stat_loc, int __options, struct rusage * __usage) __attribute__ ((__nothrow__)); /* PID is like waitpid. Other args are like wait3. */ extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options, struct rusage *__usage) __attribute__ ((__nothrow__)); # 94 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 104 "//qemu-2.11+dfsg/include/qemu/osdep.h" # 1 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 1 # 1 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" /* * posix specific declarations * * Copyright (c) 2003-2008 Fabrice Bellard * Copyright (c) 2010 Jes Sorensen * * 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. */ # 1 "/usr/include/x86_64-linux-gnu/sys/mman.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4 /* Definitions for BSD-style memory management. Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 24 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 26 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4 # 41 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mman.h" 1 3 4 /* Definitions for POSIX memory map interface. Linux/x86_64 version. Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ /* Other flags. */ /* These are Linux-specific. */ # 44 "/usr/include/x86_64-linux-gnu/bits/mman.h" 3 4 /* Include generic Linux declarations. */ # 1 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 1 3 4 /* Definitions for POSIX memory map interface. Linux generic version. Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ /* Protections are chosen from these bits, OR'd together. The implementation does not necessarily support PROT_EXEC or PROT_WRITE without PROT_READ. The only guarantees are that no writing will be allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ # 41 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 3 4 /* Sharing types (must choose one and only one of these). */ /* Other flags. */ # 58 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 3 4 /* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */ /* Flags to `msync'. */ /* Flags for `mremap'. */ /* Advice to `madvise'. */ # 97 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 3 4 /* The POSIX people had to invent similar names for the same things. */ # 106 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 3 4 /* Flags for `mlockall'. */ # 115 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mman-shared.h" 1 3 4 /* Memory-mapping-related declarations/definitions, not architecture-specific. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Flags for memfd_create. */ /* Flags for mlock2. */ /* Access rights for pkey_alloc. */ /* Create a new memory file descriptor. NAME is a name for debugging. FLAGS is a combination of the MFD_* constants. */ int memfd_create (const char *__name, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__)); /* Lock pages from ADDR (inclusive) to ADDR + LENGTH (exclusive) into memory. FLAGS is a combination of the MLOCK_* flags above. */ int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__)); /* Allocate a new protection key, with the PKEY_DISABLE_* bits specified in ACCESS_RIGHTS. The protection key mask for the current thread is updated to match the access privilege for the new key. */ int pkey_alloc (unsigned int __flags, unsigned int __access_rights) __attribute__ ((__nothrow__ , __leaf__)); /* Update the access rights for the current thread for KEY, which must have been allocated using pkey_alloc. */ int pkey_set (int __key, unsigned int __access_rights) __attribute__ ((__nothrow__ , __leaf__)); /* Return the access rights for the current thread for KEY, which must have been allocated using pkey_alloc. */ int pkey_get (int __key) __attribute__ ((__nothrow__ , __leaf__)); /* Free an allocated protection key, which must have been allocated using pkey_alloc. */ int pkey_free (int __key) __attribute__ ((__nothrow__ , __leaf__)); /* Apply memory protection flags for KEY to the specified address range. */ int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey) __attribute__ ((__nothrow__ , __leaf__)); # 115 "/usr/include/x86_64-linux-gnu/bits/mman-linux.h" 2 3 4 # 45 "/usr/include/x86_64-linux-gnu/bits/mman.h" 2 3 4 # 42 "/usr/include/x86_64-linux-gnu/sys/mman.h" 2 3 4 /* Return value of `mmap' in case of an error. */ /* Map addresses starting near ADDR and extending for LEN bytes. from OFFSET into the file FD describes according to PROT and FLAGS. If ADDR is nonzero, it is the desired mapping address. If the MAP_FIXED bit is set in FLAGS, the mapping will be at ADDR exactly (which must be page-aligned); otherwise the system chooses a convenient nearby address. The return value is the actual mapping address chosen or MAP_FAILED for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset) __attribute__ ((__nothrow__ , __leaf__)); # 70 "/usr/include/x86_64-linux-gnu/sys/mman.h" 3 4 extern void *mmap64 (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset) __attribute__ ((__nothrow__ , __leaf__)); /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__ , __leaf__)); /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. Flags are from the MS_* set. This function is a cancellation point and therefore not marked with __THROW. */ extern int msync (void *__addr, size_t __len, int __flags); /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ , __leaf__)); /* This is the POSIX name for this function. */ extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__ , __leaf__)); /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to be memory resident. */ extern int mlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); /* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */ extern int munlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); /* Cause all currently mapped pages of the process to be memory resident until unlocked by a call to the `munlockall', until the process exits, or until the process calls `execve'. */ extern int mlockall (int __flags) __attribute__ ((__nothrow__ , __leaf__)); /* All currently mapped pages of the process' address space become unlocked. */ extern int munlockall (void) __attribute__ ((__nothrow__ , __leaf__)); /* mincore returns the memory residency status of the pages in the current process's address space specified by [start, start + len). The status is returned in a vector of bytes. The least significant bit of each byte is 1 if the referenced page is in memory, otherwise it is zero. */ extern int mincore (void *__start, size_t __len, unsigned char *__vec) __attribute__ ((__nothrow__ , __leaf__)); /* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function takes another parameter which is a fixed address at which the block resides after a successful call. */ extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, int __flags, ...) __attribute__ ((__nothrow__ , __leaf__)); /* Remap arbitrary pages of a shared backing store within an existing VMA. */ extern int remap_file_pages (void *__start, size_t __size, int __prot, size_t __pgoff, int __flags) __attribute__ ((__nothrow__ , __leaf__)); /* Open shared memory segment. */ extern int shm_open (const char *__name, int __oflag, mode_t __mode); /* Remove shared memory segment. */ extern int shm_unlink (const char *__name); # 30 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4 /* Declarations of socket constants, types, and functions. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 1 3 4 /* Define struct iovec. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 27 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 29 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 /* This operating system-specific header file defines the SOCK_*, PF_*, AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', `struct msghdr', and `struct linger' types. */ # 1 "/usr/include/x86_64-linux-gnu/bits/socket.h" 1 3 4 /* System-specific socket constants and types. Linux version. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 27 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 28 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ # 30 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 /* Type for length arguments in socket calls. */ /* Get the architecture-dependent definition of enum __socket_type. */ # 1 "/usr/include/x86_64-linux-gnu/bits/socket_type.h" 1 3 4 /* Define enum __socket_type for generic Linux. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Types of sockets. */ enum __socket_type { SOCK_STREAM = 1, /* Sequenced, reliable, connection-based byte streams. */ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams of fixed maximum length. */ SOCK_RAW = 3, /* Raw protocol interface. */ SOCK_RDM = 4, /* Reliably-delivered messages. */ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, datagrams of fixed maximum length. */ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ SOCK_PACKET = 10, /* Linux specific way of getting packets at the dev level. For writing rarp and other similar things on the user level. */ /* Flags to be ORed into the type parameter of socket and socketpair and used for the flags parameter of paccept. */ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the new descriptor(s). */ SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as non-blocking. */ }; # 39 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 /* Protocol families. */ # 90 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 /* Address families. */ # 140 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 /* Socket level values. Others are defined in the appropriate headers. XXX These definitions also should go into the appropriate headers as far as they are available. */ # 168 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 /* Maximum queue length specifiable by listen. */ /* Get the definition of the macro to define the common sockaddr members. */ # 1 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 1 3 4 /* Definition of struct sockaddr_* common members and sizes, generic version. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ /* POSIX.1g specifies this type name for the `sa_family' member. */ typedef unsigned short int sa_family_t; /* This macro is used to declare the initial common members of the data types used for socket addresses, `struct sockaddr', `struct sockaddr_in', `struct sockaddr_un', etc. */ /* Size of struct sockaddr_storage. */ # 173 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 /* Structure describing a generic socket address. */ struct sockaddr { sa_family_t sa_family; /* Common data: address family and length. */ char sa_data[14]; /* Address data. */ }; /* Structure large enough to hold any socket address (with the historical exception of AF_UNIX). */ struct sockaddr_storage { sa_family_t ss_family; /* Address family, etc. */ char __ss_padding[(128 - (sizeof (unsigned short int)) - sizeof (unsigned long int))]; unsigned long int __ss_align; /* Force desired alignment. */ }; /* Bits in the FLAGS argument to `send', `recv', et al. */ enum { MSG_OOB = 0x01, /* Process out-of-band data. */ MSG_PEEK = 0x02, /* Peek at incoming messages. */ MSG_DONTROUTE = 0x04, /* Don't use local routing. */ /* DECnet uses a different name. */ MSG_TRYHARD = MSG_DONTROUTE, MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ MSG_PROXY = 0x10, /* Supply or ask second address. */ MSG_TRUNC = 0x20, MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ MSG_EOR = 0x80, /* End of record. */ MSG_WAITALL = 0x100, /* Wait for a full request. */ MSG_FIN = 0x200, MSG_SYN = 0x400, MSG_CONFIRM = 0x800, /* Confirm path validity. */ MSG_RST = 0x1000, MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ MSG_MORE = 0x8000, /* Sender will send more. */ MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ MSG_BATCH = 0x40000, /* sendmmsg: more messages coming. */ MSG_ZEROCOPY = 0x4000000, /* Use user data in kernel path. */ MSG_FASTOPEN = 0x20000000, /* Send data in TCP SYN. */ MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file descriptor received through SCM_RIGHTS. */ }; /* Structure describing messages sent by `sendmsg' and received by `recvmsg'. */ struct msghdr { void *msg_name; /* Address to send to/receive from. */ socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ size_t msg_iovlen; /* Number of elements in the vector. */ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ size_t msg_controllen; /* Ancillary data buffer length. !! The type should be socklen_t but the definition of the kernel is incompatible with this. */ int msg_flags; /* Flags on received message. */ }; /* Structure used for storage of ancillary data object information. */ struct cmsghdr { size_t cmsg_len; /* Length of data in cmsg_data plus length of cmsghdr structure. !! The type should be socklen_t but the definition of the kernel is incompatible with this. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ __extension__ unsigned char __cmsg_data []; /* Ancillary data. */ }; /* Ancillary data object manipulation macros. */ # 302 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __attribute__ ((__nothrow__ , __leaf__)); # 327 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 /* Socket level message types. This must match the definitions in . */ enum { SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ }; /* User visible structure for SCM_CREDENTIALS message */ struct ucred { pid_t pid; /* PID of sending process. */ uid_t uid; /* UID of sending process. */ gid_t gid; /* GID of sending process. */ }; /* Ugly workaround for unclean kernel headers. */ # 389 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 /* Get socket manipulation related informations from kernel headers. */ # 1 "/usr/include/x86_64-linux-gnu/asm/socket.h" 1 3 4 # 1 "/usr/include/asm-generic/socket.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 1 3 4 # 1 "/usr/include/asm-generic/sockios.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* Socket-level I/O control calls. */ # 1 "/usr/include/x86_64-linux-gnu/asm/sockios.h" 2 3 4 # 6 "/usr/include/asm-generic/socket.h" 2 3 4 /* For setsockopt(2) */ # 36 "/usr/include/asm-generic/socket.h" 3 4 /* Security levels - as per NRL IPv6 - don't actually do anything */ /* Socket filtering */ # 73 "/usr/include/asm-generic/socket.h" 3 4 /* Instruct lower device to use last 4-bytes of skb data as FCS */ # 1 "/usr/include/x86_64-linux-gnu/asm/socket.h" 2 3 4 # 391 "/usr/include/x86_64-linux-gnu/bits/socket.h" 2 3 4 # 443 "/usr/include/x86_64-linux-gnu/bits/socket.h" 3 4 /* Structure used to manipulate the SO_LINGER option. */ struct linger { int l_onoff; /* Nonzero to linger on close. */ int l_linger; /* Time to linger. */ }; # 34 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h" 1 3 4 /* This is the 4.3 BSD `struct sockaddr' format, which is used as wire format in the grotty old 4.3 `talk' protocol. */ struct osockaddr { unsigned short int sa_family; unsigned char sa_data[14]; }; # 37 "/usr/include/x86_64-linux-gnu/sys/socket.h" 2 3 4 /* The following constants should be used for the second parameter of `shutdown'. */ enum { SHUT_RD = 0, /* No more receptions. */ SHUT_WR, /* No more transmissions. */ SHUT_RDWR /* No more receptions or transmissions. */ }; /* This is the type we use for generic socket address arguments. With GCC 2.7 and later, the funky union causes redeclarations or uses with any of the listed types to be allowed without complaint. G++ 2.7 does not support transparent unions so there we want the old-style declaration, too. */ /* Add more `struct sockaddr_AF' types here as necessary. These are all the ones I found on NetBSD and Linux. */ # 79 "/usr/include/x86_64-linux-gnu/sys/socket.h" 3 4 typedef union { struct sockaddr *__restrict __sockaddr__; struct sockaddr_at *__restrict __sockaddr_at__; struct sockaddr_ax25 *__restrict __sockaddr_ax25__; struct sockaddr_dl *__restrict __sockaddr_dl__; struct sockaddr_eon *__restrict __sockaddr_eon__; struct sockaddr_in *__restrict __sockaddr_in__; struct sockaddr_in6 *__restrict __sockaddr_in6__; struct sockaddr_inarp *__restrict __sockaddr_inarp__; struct sockaddr_ipx *__restrict __sockaddr_ipx__; struct sockaddr_iso *__restrict __sockaddr_iso__; struct sockaddr_ns *__restrict __sockaddr_ns__; struct sockaddr_un *__restrict __sockaddr_un__; struct sockaddr_x25 *__restrict __sockaddr_x25__; } __SOCKADDR_ARG __attribute__ ((__transparent_union__)); typedef union { const struct sockaddr *__restrict __sockaddr__; const struct sockaddr_at *__restrict __sockaddr_at__; const struct sockaddr_ax25 *__restrict __sockaddr_ax25__; const struct sockaddr_dl *__restrict __sockaddr_dl__; const struct sockaddr_eon *__restrict __sockaddr_eon__; const struct sockaddr_in *__restrict __sockaddr_in__; const struct sockaddr_in6 *__restrict __sockaddr_in6__; const struct sockaddr_inarp *__restrict __sockaddr_inarp__; const struct sockaddr_ipx *__restrict __sockaddr_ipx__; const struct sockaddr_iso *__restrict __sockaddr_iso__; const struct sockaddr_ns *__restrict __sockaddr_ns__; const struct sockaddr_un *__restrict __sockaddr_un__; const struct sockaddr_x25 *__restrict __sockaddr_x25__; } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); /* For `recvmmsg' and `sendmmsg'. */ struct mmsghdr { struct msghdr msg_hdr; /* Actual message header. */ unsigned int msg_len; /* Number of received or sent bytes for the entry. */ }; /* Create a new socket of type TYPE in domain DOMAIN, using protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically. Returns a file descriptor for the new socket, or -1 for errors. */ extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__ , __leaf__)); /* Create two new sockets, of type TYPE in domain DOMAIN and using protocol PROTOCOL, which are connected to each other, and put file descriptors for them in FDS[0] and FDS[1]. If PROTOCOL is zero, one will be chosen automatically. Returns 0 on success, -1 for errors. */ extern int socketpair (int __domain, int __type, int __protocol, int __fds[2]) __attribute__ ((__nothrow__ , __leaf__)); /* Give the socket FD the local address ADDR (which is LEN bytes long). */ extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) __attribute__ ((__nothrow__ , __leaf__)); /* Put the local address of FD into *ADDR and its length in *LEN. */ extern int getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__)); /* Open a connection on socket FD to peer at ADDR (which LEN bytes long). For connectionless socket types, just set the default address to send to and the only address from which to accept transmissions. Return 0 on success, -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); /* Put the address of the peer connected to socket FD into *ADDR (which is *LEN bytes long), and its actual length into *LEN. */ extern int getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __attribute__ ((__nothrow__ , __leaf__)); /* Send N bytes of BUF to socket FD. Returns the number sent or -1. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags); /* Read N bytes into BUF from socket FD. Returns the number read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); /* Send N bytes of BUF on socket FD to peer at address ADDR (which is ADDR_LEN bytes long). Returns the number sent, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t sendto (int __fd, const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len); /* Read N bytes into BUF through socket FD. If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of the sender, and store the actual size of the address in *ADDR_LEN. Returns the number of bytes read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); /* Send a message described MESSAGE on socket FD. Returns the number of bytes sent, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t sendmsg (int __fd, const struct msghdr *__message, int __flags); /* Send a VLEN messages as described by VMESSAGES to socket FD. Returns the number of datagrams successfully written or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags); /* Receive a message as described by MESSAGE from socket FD. Returns the number of bytes read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); /* Receive up to VLEN messages as described by VMESSAGES from socket FD. Returns the number of messages received or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags, struct timespec *__tmo); /* Put the current value for socket FD's option OPTNAME at protocol level LEVEL into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's actual length. Returns 0 on success, -1 for errors. */ extern int getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen) __attribute__ ((__nothrow__ , __leaf__)); /* Set socket FD's option OPTNAME at protocol level LEVEL to *OPTVAL (which is OPTLEN bytes long). Returns 0 on success, -1 for errors. */ extern int setsockopt (int __fd, int __level, int __optname, const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__ , __leaf__)); /* Prepare to accept connections on socket FD. N connection requests will be queued before further requests are refused. Returns 0 on success, -1 for errors. */ extern int listen (int __fd, int __n) __attribute__ ((__nothrow__ , __leaf__)); /* Await a connection on socket FD. When a connection arrives, open a new socket to communicate with it, set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting peer and *ADDR_LEN to the address's actual length, and return the new socket's descriptor, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int accept (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); /* Similar to 'accept' but takes an additional parameter to specify flags. This function is a cancellation point and therefore not marked with __THROW. */ extern int accept4 (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len, int __flags); /* Shut down all or part of the connection open on socket FD. HOW determines what to shut down: SHUT_RD = No more receptions; SHUT_WR = No more transmissions; SHUT_RDWR = No more receptions or transmissions. Returns 0 on success, -1 for errors. */ extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__ , __leaf__)); /* Determine wheter socket is at a out-of-band mark. */ extern int sockatmark (int __fd) __attribute__ ((__nothrow__ , __leaf__)); /* FDTYPE is S_IFSOCK or another S_IF* macro defined in ; returns 1 if FD is open on an object of the indicated type, 0 if not, or -1 for errors (setting errno). */ extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__ , __leaf__)); /* Define some macros helping to catch buffer overflows. */ # 31 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 2 # 1 "/usr/include/netinet/in.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/netinet/in.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 1 3 4 /* Define uintN_t types. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/netinet/in.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4 /* Declarations of socket constants, types, and functions. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 24 "/usr/include/netinet/in.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 25 "/usr/include/netinet/in.h" 2 3 4 /* Internet address. */ typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; }; /* Get system-specific definitions. */ # 1 "/usr/include/x86_64-linux-gnu/bits/in.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Linux version. */ /* If the application has already included linux/in6.h from a linux-based kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly. Neither the linux kernel nor glibc should break this ABI without coordination. In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for maximum backwards compatibility. */ # 44 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4 /* Options for use with `getsockopt' and `setsockopt' at the IP level. The first word in the comment at the right is the data type used; "bool" means a boolean value stored in an `int'. */ /* For BSD compatibility. */ # 96 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4 /* TProxy original addresses */ # 106 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4 /* IP_MTU_DISCOVER arguments. */ /* Always use interface mtu (ignores dst pmtu) but don't set DF flag. Also incoming ICMP frag_needed notifications will be ignored on this socket to prevent accepting spoofed ones. */ /* Like IP_PMTUDISC_INTERFACE but allow packets to be fragmented. */ # 131 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4 /* To select the IP level. */ /* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. The `ip_dst' field is used for the first-hop gateway when using a source route (this gets put into the header proper). */ struct ip_opts { struct in_addr ip_dst; /* First hop; zero without source route. */ char ip_opts[40]; /* Actually variable in size. */ }; /* Like `struct ip_mreq' but including interface specification by index. */ struct ip_mreqn { struct in_addr imr_multiaddr; /* IP multicast address of group */ struct in_addr imr_address; /* local IP address of interface */ int imr_ifindex; /* Interface index */ }; /* Structure used for IP_PKTINFO. */ struct in_pktinfo { int ipi_ifindex; /* Interface index */ struct in_addr ipi_spec_dst; /* Routing destination address */ struct in_addr ipi_addr; /* Header destination address */ }; /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. The first word in the comment at the right is the data type used; "bool" means a boolean value stored in an `int'. */ # 198 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4 /* Advanced API (RFC3542) (1). */ # 214 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4 /* Advanced API (RFC3542) (2). */ /* RFC5014. */ /* RFC5082. */ # 232 "/usr/include/x86_64-linux-gnu/bits/in.h" 3 4 /* Obsolete synonyms for the above. */ /* IPV6_MTU_DISCOVER values. */ /* Socket level values for IPv6. */ /* Routing header options for IPv6. */ # 38 "/usr/include/netinet/in.h" 2 3 4 /* Standard well-defined IP protocols. */ enum { IPPROTO_IP = 0, /* Dummy protocol for TCP. */ IPPROTO_ICMP = 1, /* Internet Control Message Protocol. */ IPPROTO_IGMP = 2, /* Internet Group Management Protocol. */ IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94). */ IPPROTO_TCP = 6, /* Transmission Control Protocol. */ IPPROTO_EGP = 8, /* Exterior Gateway Protocol. */ IPPROTO_PUP = 12, /* PUP protocol. */ IPPROTO_UDP = 17, /* User Datagram Protocol. */ IPPROTO_IDP = 22, /* XNS IDP protocol. */ IPPROTO_TP = 29, /* SO Transport Protocol Class 4. */ IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol. */ IPPROTO_IPV6 = 41, /* IPv6 header. */ IPPROTO_RSVP = 46, /* Reservation Protocol. */ IPPROTO_GRE = 47, /* General Routing Encapsulation. */ IPPROTO_ESP = 50, /* encapsulating security payload. */ IPPROTO_AH = 51, /* authentication header. */ IPPROTO_MTP = 92, /* Multicast Transport Protocol. */ IPPROTO_BEETPH = 94, /* IP option pseudo header for BEET. */ IPPROTO_ENCAP = 98, /* Encapsulation Header. */ IPPROTO_PIM = 103, /* Protocol Independent Multicast. */ IPPROTO_COMP = 108, /* Compression Header Protocol. */ IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */ IPPROTO_UDPLITE = 136, /* UDP-Lite protocol. */ IPPROTO_MPLS = 137, /* MPLS in IP. */ IPPROTO_RAW = 255, /* Raw IP packets. */ IPPROTO_MAX }; /* If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel network headers first and we should use those ABI-identical definitions instead of our own, otherwise 0. */ enum { IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options. */ IPPROTO_ROUTING = 43, /* IPv6 routing header. */ IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header. */ IPPROTO_ICMPV6 = 58, /* ICMPv6. */ IPPROTO_NONE = 59, /* IPv6 no next header. */ IPPROTO_DSTOPTS = 60, /* IPv6 destination options. */ IPPROTO_MH = 135 /* IPv6 mobility header. */ }; /* Type to represent a port. */ typedef uint16_t in_port_t; /* Standard well-known ports. */ enum { IPPORT_ECHO = 7, /* Echo service. */ IPPORT_DISCARD = 9, /* Discard transmissions service. */ IPPORT_SYSTAT = 11, /* System status service. */ IPPORT_DAYTIME = 13, /* Time of day service. */ IPPORT_NETSTAT = 15, /* Network status service. */ IPPORT_FTP = 21, /* File Transfer Protocol. */ IPPORT_TELNET = 23, /* Telnet protocol. */ IPPORT_SMTP = 25, /* Simple Mail Transfer Protocol. */ IPPORT_TIMESERVER = 37, /* Timeserver service. */ IPPORT_NAMESERVER = 42, /* Domain Name Service. */ IPPORT_WHOIS = 43, /* Internet Whois service. */ IPPORT_MTP = 57, IPPORT_TFTP = 69, /* Trivial File Transfer Protocol. */ IPPORT_RJE = 77, IPPORT_FINGER = 79, /* Finger service. */ IPPORT_TTYLINK = 87, IPPORT_SUPDUP = 95, /* SUPDUP protocol. */ IPPORT_EXECSERVER = 512, /* execd service. */ IPPORT_LOGINSERVER = 513, /* rlogind service. */ IPPORT_CMDSERVER = 514, IPPORT_EFSSERVER = 520, /* UDP ports. */ IPPORT_BIFFUDP = 512, IPPORT_WHOSERVER = 513, IPPORT_ROUTESERVER = 520, /* Ports less than this value are reserved for privileged processes. */ IPPORT_RESERVED = 1024, /* Ports greater this value are reserved for (non-privileged) servers. */ IPPORT_USERRESERVED = 5000 }; /* Definitions of the bits in an Internet address integer. On subnets, host and network parts are found according to the subnet mask, not these masks. */ # 189 "/usr/include/netinet/in.h" 3 4 /* Address to accept any incoming messages. */ /* Address to send to all hosts. */ /* Address indicating an error return. */ /* Network number for local host loopback. */ /* Address to loopback in software to local host. */ /* Defines for Multicast INADDR. */ /* IPv6 address */ struct in6_addr { union { uint8_t __u6_addr8[16]; uint16_t __u6_addr16[8]; uint32_t __u6_addr32[4]; } __in6_u; }; extern const struct in6_addr in6addr_any; /* :: */ extern const struct in6_addr in6addr_loopback; /* ::1 */ /* Structure describing an Internet socket address. */ struct sockaddr_in { sa_family_t sin_family; in_port_t sin_port; /* Port number. */ struct in_addr sin_addr; /* Internet address. */ /* Pad to size of `struct sockaddr'. */ unsigned char sin_zero[sizeof (struct sockaddr) - (sizeof (unsigned short int)) - sizeof (in_port_t) - sizeof (struct in_addr)]; }; /* Ditto, for IPv6. */ struct sockaddr_in6 { sa_family_t sin6_family; in_port_t sin6_port; /* Transport layer port # */ uint32_t sin6_flowinfo; /* IPv6 flow information */ struct in6_addr sin6_addr; /* IPv6 address */ uint32_t sin6_scope_id; /* IPv6 scope-id */ }; /* IPv4 multicast request. */ struct ip_mreq { /* IP multicast address of group. */ struct in_addr imr_multiaddr; /* Local IP address of interface. */ struct in_addr imr_interface; }; struct ip_mreq_source { /* IP multicast address of group. */ struct in_addr imr_multiaddr; /* IP address of interface. */ struct in_addr imr_interface; /* IP address of source. */ struct in_addr imr_sourceaddr; }; /* Likewise, for IPv6. */ struct ipv6_mreq { /* IPv6 multicast address of group */ struct in6_addr ipv6mr_multiaddr; /* local interface */ unsigned int ipv6mr_interface; }; /* Multicast group request. */ struct group_req { /* Interface index. */ uint32_t gr_interface; /* Group address. */ struct sockaddr_storage gr_group; }; struct group_source_req { /* Interface index. */ uint32_t gsr_interface; /* Group address. */ struct sockaddr_storage gsr_group; /* Source address. */ struct sockaddr_storage gsr_source; }; /* Full-state filter operations. */ struct ip_msfilter { /* IP multicast address of group. */ struct in_addr imsf_multiaddr; /* Local IP address of interface. */ struct in_addr imsf_interface; /* Filter mode. */ uint32_t imsf_fmode; /* Number of source addresses. */ uint32_t imsf_numsrc; /* Source addresses. */ struct in_addr imsf_slist[1]; }; struct group_filter { /* Interface index. */ uint32_t gf_interface; /* Group address. */ struct sockaddr_storage gf_group; /* Filter mode. */ uint32_t gf_fmode; /* Number of source addresses. */ uint32_t gf_numsrc; /* Source addresses. */ struct sockaddr_storage gf_slist[1]; }; /* Functions to convert between host and network byte order. Please note that these functions normally take `unsigned long int' or `unsigned short int' values as arguments and also return them. But this was a short-sighted decision since on different systems the types may have different representations but the values are always the same. */ extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern uint16_t ntohs (uint16_t __netshort) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern uint32_t htonl (uint32_t __hostlong) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern uint16_t htons (uint16_t __hostshort) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); # 1 "/usr/include/endian.h" 1 3 4 /* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 383 "/usr/include/netinet/in.h" 2 3 4 /* Get machine dependent optimized versions of byte swapping functions. */ # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 /* Macros to swap the order of bytes in integer values. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 386 "/usr/include/netinet/in.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4 /* Inline functions to return unsigned integer values unchanged. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 387 "/usr/include/netinet/in.h" 2 3 4 # 501 "/usr/include/netinet/in.h" 3 4 /* Bind socket to a privileged IP port. */ extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__ , __leaf__)); /* The IPv6 version of this function. */ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) __attribute__ ((__nothrow__ , __leaf__)); # 532 "/usr/include/netinet/in.h" 3 4 struct cmsghdr; /* Forward declaration. */ /* IPv6 packet information. */ struct in6_pktinfo { struct in6_addr ipi6_addr; /* src/dst IPv6 address */ unsigned int ipi6_ifindex; /* send/recv interface index */ }; /* IPv6 MTU information. */ struct ip6_mtuinfo { struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */ uint32_t ip6m_mtu; /* path MTU in host byte order */ }; /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */ extern int inet6_option_space (int __nbytes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int inet6_option_append (struct cmsghdr *__cmsg, const uint8_t *__typep, int __multx, int __plusy) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, int __multx, int __plusy) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int inet6_option_next (const struct cmsghdr *__cmsg, uint8_t **__tptrp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); extern int inet6_option_find (const struct cmsghdr *__cmsg, uint8_t **__tptrp, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); /* Hop-by-Hop and Destination Options Processing (RFC 3542). */ extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t __len, uint8_t __align, void **__databufp) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset, uint8_t *__typep, socklen_t *__lenp, void **__databufp) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t *__lenp, void **__databufp) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __attribute__ ((__nothrow__ , __leaf__)); /* Routing Header Option (RFC 3542). */ extern socklen_t inet6_rth_space (int __type, int __segments) __attribute__ ((__nothrow__ , __leaf__)); extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, int __segments) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_rth_reverse (const void *__in, void *__out) __attribute__ ((__nothrow__ , __leaf__)); extern int inet6_rth_segments (const void *__bp) __attribute__ ((__nothrow__ , __leaf__)); extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index) __attribute__ ((__nothrow__ , __leaf__)); /* Multicast source filter support. */ /* Get IPv4 source filter. */ extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t *__fmode, uint32_t *__numsrc, struct in_addr *__slist) __attribute__ ((__nothrow__ , __leaf__)); /* Set IPv4 source filter. */ extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t __fmode, uint32_t __numsrc, const struct in_addr *__slist) __attribute__ ((__nothrow__ , __leaf__)); /* Get source filter. */ extern int getsourcefilter (int __s, uint32_t __interface_addr, const struct sockaddr *__group, socklen_t __grouplen, uint32_t *__fmode, uint32_t *__numsrc, struct sockaddr_storage *__slist) __attribute__ ((__nothrow__ , __leaf__)); /* Set source filter. */ extern int setsourcefilter (int __s, uint32_t __interface_addr, const struct sockaddr *__group, socklen_t __grouplen, uint32_t __fmode, uint32_t __numsrc, const struct sockaddr_storage *__slist) __attribute__ ((__nothrow__ , __leaf__)); # 32 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 2 # 1 "/usr/include/netinet/tcp.h" 1 3 4 /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)tcp.h 8.1 (Berkeley) 6/10/93 */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 36 "/usr/include/netinet/tcp.h" 2 3 4 /* * User-settable options (used with setsockopt). */ # 78 "/usr/include/netinet/tcp.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ # 79 "/usr/include/netinet/tcp.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/socket.h" 1 3 4 /* Declarations of socket constants, types, and functions. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 80 "/usr/include/netinet/tcp.h" 2 3 4 typedef uint32_t tcp_seq; /* * TCP header. * Per RFC 793, September, 1981. */ struct tcphdr { __extension__ union { struct { uint16_t th_sport; /* source port */ uint16_t th_dport; /* destination port */ tcp_seq th_seq; /* sequence number */ tcp_seq th_ack; /* acknowledgement number */ uint8_t th_x2:4; /* (unused) */ uint8_t th_off:4; /* data offset */ uint8_t th_flags; uint16_t th_win; /* window */ uint16_t th_sum; /* checksum */ uint16_t th_urp; /* urgent pointer */ }; struct { uint16_t source; uint16_t dest; uint32_t seq; uint32_t ack_seq; uint16_t res1:4; uint16_t doff:4; uint16_t fin:1; uint16_t syn:1; uint16_t rst:1; uint16_t psh:1; uint16_t ack:1; uint16_t urg:1; uint16_t res2:2; # 145 "/usr/include/netinet/tcp.h" 3 4 uint16_t window; uint16_t check; uint16_t urg_ptr; }; }; }; enum { TCP_ESTABLISHED = 1, TCP_SYN_SENT, TCP_SYN_RECV, TCP_FIN_WAIT1, TCP_FIN_WAIT2, TCP_TIME_WAIT, TCP_CLOSE, TCP_CLOSE_WAIT, TCP_LAST_ACK, TCP_LISTEN, TCP_CLOSING /* now a valid state */ }; # 183 "/usr/include/netinet/tcp.h" 3 4 /* * Default maximum segment size for TCP. * With an IP MSS of 576, this is 536, * but 512 is probably more convenient. * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)). */ # 205 "/usr/include/netinet/tcp.h" 3 4 /* Values for tcpi_state. */ enum tcp_ca_state { TCP_CA_Open = 0, TCP_CA_Disorder = 1, TCP_CA_CWR = 2, TCP_CA_Recovery = 3, TCP_CA_Loss = 4 }; struct tcp_info { uint8_t tcpi_state; uint8_t tcpi_ca_state; uint8_t tcpi_retransmits; uint8_t tcpi_probes; uint8_t tcpi_backoff; uint8_t tcpi_options; uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; uint32_t tcpi_rto; uint32_t tcpi_ato; uint32_t tcpi_snd_mss; uint32_t tcpi_rcv_mss; uint32_t tcpi_unacked; uint32_t tcpi_sacked; uint32_t tcpi_lost; uint32_t tcpi_retrans; uint32_t tcpi_fackets; /* Times. */ uint32_t tcpi_last_data_sent; uint32_t tcpi_last_ack_sent; /* Not remembered, sorry. */ uint32_t tcpi_last_data_recv; uint32_t tcpi_last_ack_recv; /* Metrics. */ uint32_t tcpi_pmtu; uint32_t tcpi_rcv_ssthresh; uint32_t tcpi_rtt; uint32_t tcpi_rttvar; uint32_t tcpi_snd_ssthresh; uint32_t tcpi_snd_cwnd; uint32_t tcpi_advmss; uint32_t tcpi_reordering; uint32_t tcpi_rcv_rtt; uint32_t tcpi_rcv_space; uint32_t tcpi_total_retrans; }; /* For TCP_MD5SIG socket option. */ /* tcp_md5sig extension flags for TCP_MD5SIG_EXT. */ struct tcp_md5sig { struct sockaddr_storage tcpm_addr; /* Address associated. */ uint8_t tcpm_flags; /* Extension flags. */ uint8_t tcpm_prefixlen; /* Address prefix. */ uint16_t tcpm_keylen; /* Key length. */ uint32_t __tcpm_pad; /* Zero. */ uint8_t tcpm_key[80]; /* Key (binary). */ }; /* For socket repair options. */ struct tcp_repair_opt { uint32_t opt_code; uint32_t opt_val; }; /* Queue to repair, for TCP_REPAIR_QUEUE. */ enum { TCP_NO_QUEUE, TCP_RECV_QUEUE, TCP_SEND_QUEUE, TCP_QUEUES_NR, }; /* For cookie transactions socket options. */ /* Flags for both getsockopt and setsockopt */ /* Flags for getsockopt */ struct tcp_cookie_transactions { uint16_t tcpct_flags; uint8_t __tcpct_pad1; uint8_t tcpct_cookie_desired; uint16_t tcpct_s_data_desired; uint16_t tcpct_used; uint8_t tcpct_value[536U /* IPv4 (RFC1122, RFC2581) */]; }; /* For use with TCP_REPAIR_WINDOW. */ struct tcp_repair_window { uint32_t snd_wl1; uint32_t snd_wnd; uint32_t max_window; uint32_t rcv_wnd; uint32_t rcv_wup; }; # 33 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 2 # 1 "/usr/include/arpa/inet.h" 1 3 4 /* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/arpa/inet.h" 2 3 4 # 1 "/usr/include/netinet/in.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/arpa/inet.h" 2 3 4 /* Type for length arguments in socket calls. */ /* Convert Internet host address from numbers-and-dots notation in CP into binary data in network byte order. */ extern in_addr_t inet_addr (const char *__cp) __attribute__ ((__nothrow__ , __leaf__)); /* Return the local host address part of the Internet address in IN. */ extern in_addr_t inet_lnaof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__)); /* Make Internet host address in network byte order by combining the network number NET with the local address HOST. */ extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host) __attribute__ ((__nothrow__ , __leaf__)); /* Return network number part of the Internet address IN. */ extern in_addr_t inet_netof (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__)); /* Extract the network number in network byte order from the address in numbers-and-dots natation starting at CP. */ extern in_addr_t inet_network (const char *__cp) __attribute__ ((__nothrow__ , __leaf__)); /* Convert Internet number in IN to ASCII representation. The return value is a pointer to an internal array containing the string. */ extern char *inet_ntoa (struct in_addr __in) __attribute__ ((__nothrow__ , __leaf__)); /* Convert from presentation format of an Internet number in buffer starting at CP to the binary network format and store result for interface type AF in buffer starting at BUF. */ extern int inet_pton (int __af, const char *__restrict __cp, void *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); /* Convert a Internet address in binary network format for interface type AF in buffer starting at CP to presentation form and place result in buffer of length LEN astarting at BUF. */ extern const char *inet_ntop (int __af, const void *__restrict __cp, char *__restrict __buf, socklen_t __len) __attribute__ ((__nothrow__ , __leaf__)); /* The following functions are not part of XNS 5.2. */ /* Convert Internet host address from numbers-and-dots notation in CP into binary data and store the result in the structure INP. */ extern int inet_aton (const char *__cp, struct in_addr *__inp) __attribute__ ((__nothrow__ , __leaf__)); /* Format a network number NET into presentation format and place result in buffer starting at BUF with length of LEN bytes. */ extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); /* Convert network number for interface type AF in buffer starting at CP to presentation format. The result will specifiy BITS bits of the number. */ extern char *inet_net_ntop (int __af, const void *__cp, int __bits, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); /* Convert network number for interface type AF from presentation in buffer starting at CP to network format and store result int buffer starting at BUF of size LEN. */ extern int inet_net_pton (int __af, const char *__cp, void *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); /* Convert ASCII representation in hexadecimal form of the Internet address to binary form and place result in buffer of length LEN starting at BUF. */ extern unsigned int inet_nsap_addr (const char *__cp, unsigned char *__buf, int __len) __attribute__ ((__nothrow__ , __leaf__)); /* Convert internet address in binary form in LEN bytes starting at CP a presentation form and place result in BUF. */ extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp, char *__buf) __attribute__ ((__nothrow__ , __leaf__)); # 34 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 2 # 1 "/usr/include/netdb.h" 1 3 4 /* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* All data returned by the network data base library are supplied in host order and returned in network order (suitable for use in system calls). */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/netdb.h" 2 3 4 # 1 "/usr/include/netinet/in.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 28 "/usr/include/netdb.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 1 3 4 /* Define uintN_t types. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 29 "/usr/include/netdb.h" 2 3 4 /* This is necessary to make this include file properly replace the Sun version. */ # 1 "/usr/include/rpc/netdb.h" 1 3 4 /* @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC */ /* * Copyright (c) 2010, Oracle America, Inc. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the "Oracle America, Inc." nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Cleaned up for GNU C library roland@gnu.ai.mit.edu: added multiple inclusion protection and use of . In GNU this file is #include'd by . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 40 "/usr/include/rpc/netdb.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 43 "/usr/include/rpc/netdb.h" 2 3 4 struct rpcent { char *r_name; /* Name of server for this rpc program. */ char **r_aliases; /* Alias list. */ int r_number; /* RPC program number. */ }; extern void setrpcent (int __stayopen) __attribute__ ((__nothrow__ , __leaf__)); extern void endrpcent (void) __attribute__ ((__nothrow__ , __leaf__)); extern struct rpcent *getrpcbyname (const char *__name) __attribute__ ((__nothrow__ , __leaf__)); extern struct rpcent *getrpcbynumber (int __number) __attribute__ ((__nothrow__ , __leaf__)); extern struct rpcent *getrpcent (void) __attribute__ ((__nothrow__ , __leaf__)); extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__)); extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__)); extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__ , __leaf__)); # 33 "/usr/include/netdb.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/netdb.h" 1 3 4 /* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Description of data base entry for a single network. NOTE: here a poor assumption is made. The network number is expected to fit into an unsigned long int variable. */ struct netent { char *n_name; /* Official name of network. */ char **n_aliases; /* Alias list. */ int n_addrtype; /* Net address type. */ uint32_t n_net; /* Network number. */ }; # 41 "/usr/include/netdb.h" 2 3 4 /* Absolute file name for network data base files. */ # 51 "/usr/include/netdb.h" 3 4 /* Error status for non-reentrant lookup functions. We use a macro to access always the thread-specific `h_errno' variable. */ /* Function to get address of global `h_errno' variable. */ extern int *__h_errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* Possible values left in `h_errno'. */ # 78 "/usr/include/netdb.h" 3 4 /* Highest reserved Internet port number. */ /* Scope delimiter for getaddrinfo(), getnameinfo(). */ /* Print error indicated by `h_errno' variable on standard error. STR if non-null is printed before the error string. */ extern void herror (const char *__str) __attribute__ ((__nothrow__ , __leaf__)); /* Return string associated with error ERR_NUM. */ extern const char *hstrerror (int __err_num) __attribute__ ((__nothrow__ , __leaf__)); /* Description of data base entry for a single host. */ struct hostent { char *h_name; /* Official name of host. */ char **h_aliases; /* Alias list. */ int h_addrtype; /* Host address type. */ int h_length; /* Length of address. */ char **h_addr_list; /* List of addresses from name server. */ }; /* Open host data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void sethostent (int __stay_open); /* Close host data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endhostent (void); /* Get next entry from host data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostent (void); /* Return entry from host data base which address match ADDR with length LEN and type TYPE. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len, int __type); /* Return entry from host data base for host with NAME. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostbyname (const char *__name); /* Return entry from host data base for host with NAME. AF must be set to the address type which is `AF_INET' for IPv4 or `AF_INET6' for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostbyname2 (const char *__name, int __af); /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. The last argument is a pointer to a variable which gets the value which would be stored in the global variable `herrno' by the non-reentrant functions. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int gethostent_r (struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len, int __type, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyname_r (const char *__restrict __name, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyname2_r (const char *__restrict __name, int __af, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); /* Open network data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setnetent (int __stay_open); /* Close network data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endnetent (void); /* Get next entry from network data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct netent *getnetent (void); /* Return entry from network data base which address match NET and type TYPE. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct netent *getnetbyaddr (uint32_t __net, int __type); /* Return entry from network data base for network with NAME. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct netent *getnetbyname (const char *__name); /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. The last argument is a pointer to a variable which gets the value which would be stored in the global variable `herrno' by the non-reentrant functions. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getnetent_r (struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); extern int getnetbyaddr_r (uint32_t __net, int __type, struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); extern int getnetbyname_r (const char *__restrict __name, struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); /* Description of data base entry for a single service. */ struct servent { char *s_name; /* Official service name. */ char **s_aliases; /* Alias list. */ int s_port; /* Port number. */ char *s_proto; /* Protocol to use. */ }; /* Open service data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setservent (int __stay_open); /* Close service data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endservent (void); /* Get next entry from service data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct servent *getservent (void); /* Return entry from network data base for network with NAME and protocol PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct servent *getservbyname (const char *__name, const char *__proto); /* Return entry from service data base which matches port PORT and protocol PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct servent *getservbyport (int __port, const char *__proto); /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getservent_r (struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); extern int getservbyname_r (const char *__restrict __name, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); extern int getservbyport_r (int __port, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); /* Description of data base entry for a single service. */ struct protoent { char *p_name; /* Official protocol name. */ char **p_aliases; /* Alias list. */ int p_proto; /* Protocol number. */ }; /* Open protocol data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setprotoent (int __stay_open); /* Close protocol data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endprotoent (void); /* Get next entry from protocol data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct protoent *getprotoent (void); /* Return entry from protocol data base for network with NAME. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct protoent *getprotobyname (const char *__name); /* Return entry from protocol data base which number is PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct protoent *getprotobynumber (int __proto); /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getprotoent_r (struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); extern int getprotobyname_r (const char *__restrict __name, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); extern int getprotobynumber_r (int __proto, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); /* Establish network group NETGROUP for enumeration. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int setnetgrent (const char *__netgroup); /* Free all space allocated by previous `setnetgrent' call. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern void endnetgrent (void); /* Get next member of netgroup established by last `setnetgrent' call and return pointers to elements in HOSTP, USERP, and DOMAINP. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getnetgrent (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp); /* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN). This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int innetgr (const char *__netgroup, const char *__host, const char *__user, const char *__domain); /* Reentrant version of `getnetgrent' where result is placed in BUFFER. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getnetgrent_r (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp, char *__restrict __buffer, size_t __buflen); /* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD. The local user is LOCUSER, on the remote machine the command is executed as REMUSER. In *FD2P the descriptor to the socket for the connection is returned. The caller must have the right to use a reserved port. When the function returns *AHOST contains the official host name. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rcmd (char **__restrict __ahost, unsigned short int __rport, const char *__restrict __locuser, const char *__restrict __remuser, const char *__restrict __cmd, int *__restrict __fd2p); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport, const char *__restrict __locuser, const char *__restrict __remuser, const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); /* Call `rexecd' at port RPORT on remote machine *AHOST to execute CMD. The process runs at the remote machine using the ID of user NAME whose cleartext password is PASSWD. In *FD2P the descriptor to the socket for the connection is returned. When the function returns *AHOST contains the official host name. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rexec (char **__restrict __ahost, int __rport, const char *__restrict __name, const char *__restrict __pass, const char *__restrict __cmd, int *__restrict __fd2p); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rexec_af (char **__restrict __ahost, int __rport, const char *__restrict __name, const char *__restrict __pass, const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); /* Check whether user REMUSER on system RHOST is allowed to login as LOCUSER. If SUSER is not zero the user tries to become superuser. Return 0 if it is possible. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int ruserok (const char *__rhost, int __suser, const char *__remuser, const char *__locuser); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int ruserok_af (const char *__rhost, int __suser, const char *__remuser, const char *__locuser, sa_family_t __af); /* Check whether user REMUSER on system indicated by IPv4 address RADDR is allowed to login as LOCUSER. Non-IPv4 (e.g., IPv6) are not supported. If SUSER is not zero the user tries to become superuser. Return 0 if it is possible. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int iruserok (uint32_t __raddr, int __suser, const char *__remuser, const char *__locuser); /* This is the equivalent function where the pfamiliy if the address pointed to by RADDR is determined by the value of AF. It therefore can be used for IPv6 This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int iruserok_af (const void *__raddr, int __suser, const char *__remuser, const char *__locuser, sa_family_t __af); /* Try to allocate reserved port, returning a descriptor for a socket opened at this port or -1 if unsuccessful. The search for an available port will start at ALPORT and continues with lower numbers. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rresvport (int *__alport); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rresvport_af (int *__alport, sa_family_t __af); /* Extension from POSIX.1:2001. */ /* Structure to contain information about address of a service provider. */ struct addrinfo { int ai_flags; /* Input flags. */ int ai_family; /* Protocol family for socket. */ int ai_socktype; /* Socket type. */ int ai_protocol; /* Protocol for socket. */ socklen_t ai_addrlen; /* Length of socket address. */ struct sockaddr *ai_addr; /* Socket address for socket. */ char *ai_canonname; /* Canonical name for service location. */ struct addrinfo *ai_next; /* Pointer to next in list. */ }; /* Structure used as control block for asynchronous lookup. */ struct gaicb { const char *ar_name; /* Name to look up. */ const char *ar_service; /* Service name. */ const struct addrinfo *ar_request; /* Additional request specification. */ struct addrinfo *ar_result; /* Pointer to result. */ /* The following are internal elements. */ int __return; int __glibc_reserved[5]; }; /* Lookup mode. */ /* Possible values for `ai_flags' field in `addrinfo' structure. */ # 615 "/usr/include/netdb.h" 3 4 /* Error values for `getaddrinfo' function. */ # 655 "/usr/include/netdb.h" 3 4 /* Translate name of a service location and/or a service name to set of socket addresses. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getaddrinfo (const char *__restrict __name, const char *__restrict __service, const struct addrinfo *__restrict __req, struct addrinfo **__restrict __pai); /* Free `addrinfo' structure AI including associated storage. */ extern void freeaddrinfo (struct addrinfo *__ai) __attribute__ ((__nothrow__ , __leaf__)); /* Convert error return from getaddrinfo() to a string. */ extern const char *gai_strerror (int __ecode) __attribute__ ((__nothrow__ , __leaf__)); /* Translate a socket address to a location and service name. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getnameinfo (const struct sockaddr *__restrict __sa, socklen_t __salen, char *__restrict __host, socklen_t __hostlen, char *__restrict __serv, socklen_t __servlen, int __flags); /* Enqueue ENT requests from the LIST. If MODE is GAI_WAIT wait until all requests are handled. If WAIT is GAI_NOWAIT return immediately after queueing the requests and signal completion according to SIG. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict], int __ent, struct sigevent *__restrict __sig); /* Suspend execution of the thread until at least one of the ENT requests in LIST is handled. If TIMEOUT is not a null pointer it specifies the longest time the function keeps waiting before returning with an error. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int gai_suspend (const struct gaicb *const __list[], int __ent, const struct timespec *__timeout); /* Get the error status of the request REQ. */ extern int gai_error (struct gaicb *__req) __attribute__ ((__nothrow__ , __leaf__)); /* Cancel the requests associated with GAICBP. */ extern int gai_cancel (struct gaicb *__gaicbp) __attribute__ ((__nothrow__ , __leaf__)); # 35 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/un.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 /* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/x86_64-linux-gnu/sys/un.h" 2 3 4 /* Get the definition of the macro to define the common sockaddr members. */ # 1 "/usr/include/x86_64-linux-gnu/bits/sockaddr.h" 1 3 4 /* Definition of struct sockaddr_* common members and sizes, generic version. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 25 "/usr/include/x86_64-linux-gnu/sys/un.h" 2 3 4 /* Structure describing the address of an AF_LOCAL (aka AF_UNIX) socket. */ struct sockaddr_un { sa_family_t sun_family; char sun_path[108]; /* Path name. */ }; # 1 "/usr/include/string.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.21 String handling */ # 38 "/usr/include/x86_64-linux-gnu/sys/un.h" 2 3 4 /* Evaluate to actual length of the `sockaddr_un' structure. */ # 36 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4 /* Definitions of macros to access `dev_t' values. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* If is included after , these macros will already be defined, and we need to redefine them without the deprecation warnings. (If they are included in the opposite order, the outer #ifndef will suppress this entire file and the macros will be usable without warnings.) */ /* This is the macro that must be defined to satisfy the misuse check in bits/sysmacros.h. */ # 39 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 2 # 41 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" void os_set_line_buffering(void); void os_set_proc_name(const char *s); void os_setup_signal_handling(void); void os_daemonize(void); void os_setup_post(void); int os_mlock(void); typedef struct timeval qemu_timeval; # 54 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" 3 4 _Bool # 54 "//qemu-2.11+dfsg/include/sysemu/os-posix.h" is_daemonized(void); /** * qemu_alloc_stack: * @sz: pointer to a size_t holding the requested usable stack size * * Allocate memory that can be used as a stack, for instance for * coroutines. If the memory cannot be allocated, this function * will abort (like g_malloc()). This function also inserts an * additional guard page to catch a potential stack overflow. * Note that the memory required for the guard page and alignment * and minimal stack size restrictions will increase the value of sz. * * The allocated stack must be freed with qemu_free_stack(). * * Returns: pointer to (the lowest address of) the stack memory. */ void *qemu_alloc_stack(size_t *sz); /** * qemu_free_stack: * @stack: stack to free * @sz: size of stack in bytes * * Free a stack allocated via qemu_alloc_stack(). Note that sz must * be exactly the adjusted stack size returned by qemu_alloc_stack. */ void qemu_free_stack(void *stack, size_t sz); /* POSIX and Mingw32 differ in the name of the stdio lock functions. */ static inline void qemu_flockfile(FILE *f) { flockfile(f); } static inline void qemu_funlockfile(FILE *f) { funlockfile(f); } # 105 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "//qemu-2.11+dfsg/include/glib-compat.h" 1 /* * GLIB Compatibility Functions * * Copyright IBM, Corp. 2013 * * Authors: * Anthony Liguori * Michael Tokarev * Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * */ # 1 "/usr/include/glib-2.0/glib.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 1 "/usr/include/glib-2.0/glib/galloca.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/galloca.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gtypes.h" # 1 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" 1 /* glibconfig.h * * This is a generated file. Please modify 'configure.ac' */ # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ /* This file must not include any other glib header file and must thus * not refer to variables from glibconfig.h */ # 36 "/usr/include/glib-2.0/glib/gmacros.h" /* We include stddef.h to get the system's definition of NULL */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ # 39 "/usr/include/glib-2.0/glib/gmacros.h" 2 # 49 "/usr/include/glib-2.0/glib/gmacros.h" # 49 "/usr/include/glib-2.0/glib/gmacros.h" /* Here we provide G_GNUC_EXTENSION as an alias for __extension__, * where this is valid. This allows for warningless compilation of * "long long" types even in the presence of '-ansi -pedantic'. */ /* Every compiler that we target supports inlining, but some of them may * complain about it if we don't say "__inline". If we have C99, or if * we are using C++, then we can use "inline" directly. Unfortunately * Visual Studio does not support __STDC_VERSION__, so we need to check * whether we are on Visual Studio 2013 or earlier to see that we need to * say "__inline" in C mode. * Otherwise, we say "__inline" to avoid the warning. */ # 85 "/usr/include/glib-2.0/glib/gmacros.h" /* For historical reasons we need to continue to support those who * define G_IMPLEMENT_INLINES to mean "don't implement this here". */ /* Provide macros to feature the GCC function attribute. */ # 111 "/usr/include/glib-2.0/glib/gmacros.h" /* Clang feature detection: http://clang.llvm.org/docs/LanguageExtensions.html */ # 213 "/usr/include/glib-2.0/glib/gmacros.h" /* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with * macros, so we can refer to them as strings unconditionally. * usage not-recommended since gcc-3.0 */ # 248 "/usr/include/glib-2.0/glib/gmacros.h" /* Provide a string identifying the current code position */ /* Provide a string identifying the current function, non-concatenatable */ # 266 "/usr/include/glib-2.0/glib/gmacros.h" /* Guard C code in headers, while including them from C++ */ # 275 "/usr/include/glib-2.0/glib/gmacros.h" /* Provide definitions for some commonly used macros. * Some of them are only provided if they haven't already * been defined. It is assumed that if they are already * defined then the current definition is correct. */ # 308 "/usr/include/glib-2.0/glib/gmacros.h" /* Count the number of elements in an array. The array must be defined * as such; using this with a dynamically allocated array will give * incorrect results. */ /* Macros by analogy to GINT_TO_POINTER, GPOINTER_TO_INT */ /* Provide convenience macros for handling structure * fields through their offsets. */ # 336 "/usr/include/glib-2.0/glib/gmacros.h" /* Provide simple macro statement wrappers: * G_STMT_START { statements; } G_STMT_END; * This can be used as a single statement, like: * if (x) G_STMT_START { ... } G_STMT_END; else ... * This intentionally does not use compiler extensions like GCC's '({...})' to * avoid portability issue or side effects when compiled with different compilers. * MSVC complains about "while(0)": C4127: "Conditional expression is constant", * so we use __pragma to avoid the warning since the use here is intentional. */ # 358 "/usr/include/glib-2.0/glib/gmacros.h" /* Deprecated -- do not use. */ # 367 "/usr/include/glib-2.0/glib/gmacros.h" /* * The G_LIKELY and G_UNLIKELY macros let the programmer give hints to * the compiler about the expected result of an expression. Some compilers * can use this information for optimizations. * * The _G_BOOLEAN_EXPR macro is intended to trigger a gcc warning when * putting assignments in g_return_if_fail (). */ # 420 "/usr/include/glib-2.0/glib/gmacros.h" /* These macros are used to mark deprecated functions in GLib headers, * and thus have to be exposed in installed headers. But please * do *not* use them in other projects. Instead, use G_DEPRECATED * or define your own wrappers around it. */ # 440 "/usr/include/glib-2.0/glib/gmacros.h" /* these macros are private */ # 455 "/usr/include/glib-2.0/glib/gmacros.h" /* these macros are API */ # 10 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 3 4 /* Copyright (C) 1992-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* This administrivia gets added to the beginning of limits.h if the system has its own version of limits.h. */ /* We use _GCC_LIMITS_H_ because we want this not to match any macros that the system's limits.h uses for its own purposes. */ # 12 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/float.h" 1 3 4 /* Copyright (C) 2002-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 5.2.4.2.2 Characteristics of floating types */ /* Radix of exponent representation, b. */ /* Number of base-FLT_RADIX digits in the significand, p. */ /* Number of decimal digits, q, such that any floating-point number with q decimal digits can be rounded into a floating-point number with p radix b digits and back again without change to the q decimal digits, p * log10(b) if b is a power of 10 floor((p - 1) * log10(b)) otherwise */ /* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */ /* Minimum negative integer such that 10 raised to that power is in the range of normalized floating-point numbers, ceil(log10(b) * (emin - 1)) */ /* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */ /* Maximum integer such that 10 raised to that power is in the range of representable finite floating-point numbers, floor(log10((1 - b**-p) * b**emax)) */ /* Maximum representable finite floating-point number, (1 - b**-p) * b**emax */ /* The difference between 1 and the least value greater than 1 that is representable in the given floating point type, b**1-p. */ /* Minimum normalized positive floating-point number, b**(emin - 1). */ /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */ /* ??? This is supposed to change with calls to fesetround in . */ /* The floating-point expression evaluation method. The precise definitions of these values are generalised to include support for the interchange and extended types defined in ISO/IEC TS 18661-3. Prior to this (for C99/C11) the definitions were: -1 indeterminate 0 evaluate all operations and constants just to the range and precision of the type 1 evaluate operations and constants of type float and double to the range and precision of the double type, evaluate long double operations and constants to the range and precision of the long double type 2 evaluate all operations and constants to the range and precision of the long double type The TS 18661-3 definitions are: -1 indeterminate 0 evaluate all operations and constants, whose semantic type has at most the range and precision of float, to the range and precision of float; evaluate all other operations and constants to the range and precision of the semantic type. 1 evaluate all operations and constants, whose semantic type has at most the range and precision of double, to the range and precision of double; evaluate all other operations and constants to the range and precision of the semantic type. 2 evaluate all operations and constants, whose semantic type has at most the range and precision of long double, to the range and precision of long double; evaluate all other operations and constants to the range and precision of the semantic type. N where _FloatN is a supported interchange floating type evaluate all operations and constants, whose semantic type has at most the range and precision of the _FloatN type, to the range and precision of the _FloatN type; evaluate all other operations and constants to the range and precision of the semantic type. N + 1, where _FloatNx is a supported extended floating type evaluate operations and constants, whose semantic type has at most the range and precision of the _FloatNx type, to the range and precision of the _FloatNx type; evaluate all other operations and constants to the range and precision of the semantic type. The compiler predefines two macros: __FLT_EVAL_METHOD__ Which, depending on the value given for -fpermitted-flt-eval-methods, may be limited to only those values for FLT_EVAL_METHOD defined in C99/C11. __FLT_EVAL_METHOD_TS_18661_3__ Which always permits the values for FLT_EVAL_METHOD defined in ISO/IEC TS 18661-3. Here we want to use __FLT_EVAL_METHOD__, unless __STDC_WANT_IEC_60559_TYPES_EXT__ is defined, in which case the user is specifically asking for the ISO/IEC TS 18661-3 types, so we use __FLT_EVAL_METHOD_TS_18661_3__. ??? This ought to change with the setting of the fp control word; the value provided by the compiler assumes the widest setting. */ /* Number of decimal digits, n, such that any floating-point number in the widest supported floating type with pmax radix b digits can be rounded to a floating-point number with n decimal digits and back again without change to the value, pmax * log10(b) if b is a power of 10 ceil(1 + pmax * log10(b)) otherwise */ /* Versions of DECIMAL_DIG for each floating-point type. */ /* Whether types support subnormal numbers. */ /* Minimum positive values, including subnormals. */ # 13 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" 2 # 15 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" /* Specifies that GLib's g_print*() functions wrap the * system printf functions. This is useful to know, for example, * when using glibc's register_printf_function(). */ # 37 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" typedef signed char gint8; typedef unsigned char guint8; typedef signed short gint16; typedef unsigned short guint16; typedef signed int gint32; typedef unsigned int guint32; typedef signed long gint64; typedef unsigned long guint64; # 65 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" typedef signed long gssize; typedef unsigned long gsize; # 76 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" typedef gint64 goffset; # 93 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" typedef signed long gintptr; typedef unsigned long guintptr; # 121 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" /* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi * is passed ISO vararg support is turned off, and there is no work * around to turn it on, so we unconditionally turn it off. */ # 183 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" typedef int GPid; # 199 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" # 33 "/usr/include/glib-2.0/glib/gtypes.h" 2 # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ /* This file must not include any other glib header file and must thus * not refer to variables from glibconfig.h */ # 34 "/usr/include/glib-2.0/glib/gtypes.h" 2 # 1 "/usr/include/glib-2.0/glib/gversionmacros.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gversionmacros.h" /* Version boundaries checks */ /* XXX: Every new stable minor release bump should add a macro here */ /** * GLIB_VERSION_2_26: * * A macro that evaluates to the 2.26 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.32 */ /** * GLIB_VERSION_2_28: * * A macro that evaluates to the 2.28 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.32 */ /** * GLIB_VERSION_2_30: * * A macro that evaluates to the 2.30 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.32 */ /** * GLIB_VERSION_2_32: * * A macro that evaluates to the 2.32 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.32 */ /** * GLIB_VERSION_2_34: * * A macro that evaluates to the 2.34 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.34 */ /** * GLIB_VERSION_2_36: * * A macro that evaluates to the 2.36 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.36 */ /** * GLIB_VERSION_2_38: * * A macro that evaluates to the 2.38 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.38 */ /** * GLIB_VERSION_2_40: * * A macro that evaluates to the 2.40 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.40 */ /** * GLIB_VERSION_2_42: * * A macro that evaluates to the 2.42 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.42 */ /** * GLIB_VERSION_2_44: * * A macro that evaluates to the 2.44 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.44 */ /** * GLIB_VERSION_2_46: * * A macro that evaluates to the 2.46 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.46 */ /** * GLIB_VERSION_2_48: * * A macro that evaluates to the 2.48 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.48 */ /** * GLIB_VERSION_2_50: * * A macro that evaluates to the 2.50 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.50 */ /** * GLIB_VERSION_2_52: * * A macro that evaluates to the 2.52 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.52 */ /** * GLIB_VERSION_2_54: * * A macro that evaluates to the 2.54 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.54 */ /** * GLIB_VERSION_2_56: * * A macro that evaluates to the 2.56 version of GLib, in a format * that can be used by the C pre-processor. * * Since: 2.56 */ /* evaluates to the current stable version; for development cycles, * this means the next stable target */ /* evaluates to the previous stable version */ /** * GLIB_VERSION_MIN_REQUIRED: * * A macro that should be defined by the user prior to including * the glib.h header. * The definition should be one of the predefined GLib version * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... * * This macro defines the earliest version of GLib that the package is * required to be able to compile against. * * If the compiler is configured to warn about the use of deprecated * functions, then using functions that were deprecated in version * %GLIB_VERSION_MIN_REQUIRED or earlier will cause warnings (but * using functions deprecated in later releases will not). * * Since: 2.32 */ /* If the package sets GLIB_VERSION_MIN_REQUIRED to some future * GLIB_VERSION_X_Y value that we don't know about, it will compare as * 0 in preprocessor tests. */ /** * GLIB_VERSION_MAX_ALLOWED: * * A macro that should be defined by the user prior to including * the glib.h header. * The definition should be one of the predefined GLib version * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... * * This macro defines the latest version of the GLib API that the * package is allowed to make use of. * * If the compiler is configured to warn about the use of deprecated * functions, then using functions added after version * %GLIB_VERSION_MAX_ALLOWED will cause warnings. * * Unless you are using GLIB_CHECK_VERSION() or the like to compile * different code depending on the GLib version, then this should be * set to the same value as %GLIB_VERSION_MIN_REQUIRED. * * Since: 2.32 */ /* sanity checks */ # 280 "/usr/include/glib-2.0/glib/gversionmacros.h" /* These macros are used to mark deprecated functions in GLib headers, * and thus have to be exposed in installed headers. But please * do *not* use them in other projects. Instead, use G_DEPRECATED * or define your own wrappers around it. */ /* XXX: Every new stable minor release should add a set of macros here */ # 35 "/usr/include/glib-2.0/glib/gtypes.h" 2 # 1 "/usr/include/time.h" 1 3 4 # 1 "/usr/include/time.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ # 36 "/usr/include/glib-2.0/glib/gtypes.h" 2 # 39 "/usr/include/glib-2.0/glib/gtypes.h" /* Provide type definitions for commonly used types. * These are useful because a "gint8" can be adjusted * to be 1 byte (8 bits) on all platforms. Similarly and * more importantly, "gint32" can be adjusted to be * 4 bytes (32 bits) on all platforms. */ typedef char gchar; typedef short gshort; typedef long glong; typedef int gint; typedef gint gboolean; typedef unsigned char guchar; typedef unsigned short gushort; typedef unsigned long gulong; typedef unsigned int guint; typedef float gfloat; typedef double gdouble; /* Define min and max constants for the fixed size numerical types */ # 77 "/usr/include/glib-2.0/glib/gtypes.h" typedef void* gpointer; typedef const void *gconstpointer; typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); typedef gint (*GCompareDataFunc) (gconstpointer a, gconstpointer b, gpointer user_data); typedef gboolean (*GEqualFunc) (gconstpointer a, gconstpointer b); typedef void (*GDestroyNotify) (gpointer data); typedef void (*GFunc) (gpointer data, gpointer user_data); typedef guint (*GHashFunc) (gconstpointer key); typedef void (*GHFunc) (gpointer key, gpointer value, gpointer user_data); /** * GFreeFunc: * @data: a data pointer * * Declares a type of function which takes an arbitrary * data pointer argument and has no return value. It is * not currently used in GLib or GTK+. */ typedef void (*GFreeFunc) (gpointer data); /** * GTranslateFunc: * @str: the untranslated string * @data: user data specified when installing the function, e.g. * in g_option_group_set_translate_func() * * The type of functions which are used to translate user-visible * strings, for output. * * Returns: a translation of the string for the current locale. * The returned string is owned by GLib and must not be freed. */ typedef const gchar * (*GTranslateFunc) (const gchar *str, gpointer data); /* Define some mathematical constants that aren't available * symbolically in some strict ISO C implementations. * * Note that the large number of digits used in these definitions * doesn't imply that GLib or current computers in general would be * able to handle floating point numbers with an accuracy like this. * It's mostly an exercise in futility and future proofing. For * extended precision floating point support, look somewhere else * than GLib. */ # 139 "/usr/include/glib-2.0/glib/gtypes.h" /* Portable endian checks and conversions * * glibconfig.h defines G_BYTE_ORDER which expands to one of * the below macros. */ /* Basic bit swapping functions */ # 179 "/usr/include/glib-2.0/glib/gtypes.h" /* Arch specific stuff for speed */ # 342 "/usr/include/glib-2.0/glib/gtypes.h" /* The G*_TO_?E() macros are defined in glibconfig.h. * The transformation is symmetric, so the FROM just maps to the TO. */ # 374 "/usr/include/glib-2.0/glib/gtypes.h" /* Portable versions of host-network order stuff */ /* Overflow-checked unsigned integer arithmetic */ /* https://bugzilla.gnome.org/show_bug.cgi?id=769104 */ # 414 "/usr/include/glib-2.0/glib/gtypes.h" /* The names of the following inlines are private. Use the macro * definitions above. */ static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 b) { return !__builtin_uadd_overflow(a, b, dest); } static inline gboolean _GLIB_CHECKED_MUL_U32 (guint32 *dest, guint32 a, guint32 b) { return !__builtin_umul_overflow(a, b, dest); } static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 b) { typedef char _GStaticAssertCompileTimeAssertion_0[(sizeof (unsigned long long) == sizeof (guint64)) ? 1 : -1] __attribute__((__unused__)); return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); } static inline gboolean _GLIB_CHECKED_MUL_U64 (guint64 *dest, guint64 a, guint64 b) { return !__builtin_umulll_overflow(a, b, (unsigned long long *) dest); } # 438 "/usr/include/glib-2.0/glib/gtypes.h" /* IEEE Standard 754 Single Precision Storage Format (gfloat): * * 31 30 23 22 0 * +--------+---------------+---------------+ * | s 1bit | e[30:23] 8bit | f[22:0] 23bit | * +--------+---------------+---------------+ * B0------------------->B1------->B2-->B3--> * * IEEE Standard 754 Double Precision Storage Format (gdouble): * * 63 62 52 51 32 31 0 * +--------+----------------+----------------+ +---------------+ * | s 1bit | e[62:52] 11bit | f[51:32] 20bit | | f[31:0] 32bit | * +--------+----------------+----------------+ +---------------+ * B0--------------->B1---------->B2--->B3----> B4->B5->B6->B7-> */ /* subtract from biased_exponent to form base2 exponent (normal numbers) */ typedef union _GDoubleIEEE754 GDoubleIEEE754; typedef union _GFloatIEEE754 GFloatIEEE754; /* multiply with base2 exponent to get base10 exponent (normal numbers) */ union _GFloatIEEE754 { gfloat v_float; struct { guint mantissa : 23; guint biased_exponent : 8; guint sign : 1; } mpn; }; union _GDoubleIEEE754 { gdouble v_double; struct { guint mantissa_low : 32; guint mantissa_high : 20; guint biased_exponent : 11; guint sign : 1; } mpn; }; # 505 "/usr/include/glib-2.0/glib/gtypes.h" typedef struct _GTimeVal GTimeVal; struct _GTimeVal { glong tv_sec; glong tv_usec; }; /* We prefix variable declarations so they can * properly get exported in Windows DLLs. */ # 33 "/usr/include/glib-2.0/glib/galloca.h" 2 /* GCC does the right thing */ # 60 "/usr/include/glib-2.0/glib/galloca.h" /** * g_alloca: * @size: number of bytes to allocate. * * Allocates @size bytes on the stack; these bytes will be freed when the current * stack frame is cleaned up. This macro essentially just wraps the alloca() * function present on most UNIX variants. * Thus it provides the same advantages and pitfalls as alloca(): * * - alloca() is very fast, as on most systems it's implemented by just adjusting * the stack pointer register. * * - It doesn't cause any memory fragmentation, within its scope, separate alloca() * blocks just build up and are released together at function end. * * - Allocation sizes have to fit into the current stack frame. For instance in a * threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes, * so be sparse with alloca() uses. * * - Allocation failure due to insufficient stack space is not indicated with a %NULL * return like e.g. with malloc(). Instead, most systems probably handle it the same * way as out of stack space situations from infinite function recursion, i.e. * with a segmentation fault. * * - Special care has to be taken when mixing alloca() with GNU C variable sized arrays. * Stack space allocated with alloca() in the same scope as a variable sized array * will be freed together with the variable sized array upon exit of that scope, and * not upon exit of the enclosing function scope. * * Returns: space for @size bytes, allocated on the stack */ /** * g_newa: * @struct_type: Type of memory chunks to be allocated * @n_structs: Number of chunks to be allocated * * Wraps g_alloca() in a more typesafe manner. * * Returns: Pointer to stack space for @n_structs chunks of type @struct_type */ # 31 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/garray.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/garray.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/garray.h" 2 typedef struct _GBytes GBytes; typedef struct _GArray GArray; typedef struct _GByteArray GByteArray; typedef struct _GPtrArray GPtrArray; struct _GArray { gchar *data; guint len; }; struct _GByteArray { guint8 *data; guint len; }; struct _GPtrArray { gpointer *pdata; guint len; }; /* Resizable arrays. remove fills any cleared spot and shortens the * array, while preserving the order. remove_fast will distort the * order by moving the last element to the position of the removed. */ extern GArray* g_array_new (gboolean zero_terminated, gboolean clear_, guint element_size); extern GArray* g_array_sized_new (gboolean zero_terminated, gboolean clear_, guint element_size, guint reserved_size); extern gchar* g_array_free (GArray *array, gboolean free_segment); extern GArray *g_array_ref (GArray *array); extern void g_array_unref (GArray *array); extern guint g_array_get_element_size (GArray *array); extern GArray* g_array_append_vals (GArray *array, gconstpointer data, guint len); extern GArray* g_array_prepend_vals (GArray *array, gconstpointer data, guint len); extern GArray* g_array_insert_vals (GArray *array, guint index_, gconstpointer data, guint len); extern GArray* g_array_set_size (GArray *array, guint length); extern GArray* g_array_remove_index (GArray *array, guint index_); extern GArray* g_array_remove_index_fast (GArray *array, guint index_); extern GArray* g_array_remove_range (GArray *array, guint index_, guint length); extern void g_array_sort (GArray *array, GCompareFunc compare_func); extern void g_array_sort_with_data (GArray *array, GCompareDataFunc compare_func, gpointer user_data); extern void g_array_set_clear_func (GArray *array, GDestroyNotify clear_func); /* Resizable pointer array. This interface is much less complicated * than the above. Add appends a pointer. Remove fills any cleared * spot and shortens the array. remove_fast will again distort order. */ extern GPtrArray* g_ptr_array_new (void); extern GPtrArray* g_ptr_array_new_with_free_func (GDestroyNotify element_free_func); extern GPtrArray* g_ptr_array_sized_new (guint reserved_size); extern GPtrArray* g_ptr_array_new_full (guint reserved_size, GDestroyNotify element_free_func); extern gpointer* g_ptr_array_free (GPtrArray *array, gboolean free_seg); extern GPtrArray* g_ptr_array_ref (GPtrArray *array); extern void g_ptr_array_unref (GPtrArray *array); extern void g_ptr_array_set_free_func (GPtrArray *array, GDestroyNotify element_free_func); extern void g_ptr_array_set_size (GPtrArray *array, gint length); extern gpointer g_ptr_array_remove_index (GPtrArray *array, guint index_); extern gpointer g_ptr_array_remove_index_fast (GPtrArray *array, guint index_); extern gboolean g_ptr_array_remove (GPtrArray *array, gpointer data); extern gboolean g_ptr_array_remove_fast (GPtrArray *array, gpointer data); extern GPtrArray *g_ptr_array_remove_range (GPtrArray *array, guint index_, guint length); extern void g_ptr_array_add (GPtrArray *array, gpointer data); extern void g_ptr_array_insert (GPtrArray *array, gint index_, gpointer data); extern void g_ptr_array_sort (GPtrArray *array, GCompareFunc compare_func); extern void g_ptr_array_sort_with_data (GPtrArray *array, GCompareDataFunc compare_func, gpointer user_data); extern void g_ptr_array_foreach (GPtrArray *array, GFunc func, gpointer user_data); extern gboolean g_ptr_array_find (GPtrArray *haystack, gconstpointer needle, guint *index_); extern gboolean g_ptr_array_find_with_equal_func (GPtrArray *haystack, gconstpointer needle, GEqualFunc equal_func, guint *index_); /* Byte arrays, an array of guint8. Implemented as a GArray, * but type-safe. */ extern GByteArray* g_byte_array_new (void); extern GByteArray* g_byte_array_new_take (guint8 *data, gsize len); extern GByteArray* g_byte_array_sized_new (guint reserved_size); extern guint8* g_byte_array_free (GByteArray *array, gboolean free_segment); extern GBytes* g_byte_array_free_to_bytes (GByteArray *array); extern GByteArray *g_byte_array_ref (GByteArray *array); extern void g_byte_array_unref (GByteArray *array); extern GByteArray* g_byte_array_append (GByteArray *array, const guint8 *data, guint len); extern GByteArray* g_byte_array_prepend (GByteArray *array, const guint8 *data, guint len); extern GByteArray* g_byte_array_set_size (GByteArray *array, guint length); extern GByteArray* g_byte_array_remove_index (GByteArray *array, guint index_); extern GByteArray* g_byte_array_remove_index_fast (GByteArray *array, guint index_); extern GByteArray* g_byte_array_remove_range (GByteArray *array, guint index_, guint length); extern void g_byte_array_sort (GByteArray *array, GCompareFunc compare_func); extern void g_byte_array_sort_with_data (GByteArray *array, GCompareDataFunc compare_func, gpointer user_data); # 32 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gasyncqueue.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gasyncqueue.h" # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gthread.h" # 1 "/usr/include/glib-2.0/glib/gatomic.h" 1 /* * Copyright © 2011 Ryan Lortie * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ # 27 "/usr/include/glib-2.0/glib/gatomic.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 28 "/usr/include/glib-2.0/glib/gatomic.h" 2 extern gint g_atomic_int_get (const volatile gint *atomic); extern void g_atomic_int_set (volatile gint *atomic, gint newval); extern void g_atomic_int_inc (volatile gint *atomic); extern gboolean g_atomic_int_dec_and_test (volatile gint *atomic); extern gboolean g_atomic_int_compare_and_exchange (volatile gint *atomic, gint oldval, gint newval); extern gint g_atomic_int_add (volatile gint *atomic, gint val); extern guint g_atomic_int_and (volatile guint *atomic, guint val); extern guint g_atomic_int_or (volatile guint *atomic, guint val); extern guint g_atomic_int_xor (volatile guint *atomic, guint val); extern gpointer g_atomic_pointer_get (const volatile void *atomic); extern void g_atomic_pointer_set (volatile void *atomic, gpointer newval); extern gboolean g_atomic_pointer_compare_and_exchange (volatile void *atomic, gpointer oldval, gpointer newval); extern gssize g_atomic_pointer_add (volatile void *atomic, gssize val); extern gsize g_atomic_pointer_and (volatile void *atomic, gsize val); extern gsize g_atomic_pointer_or (volatile void *atomic, gsize val); extern gsize g_atomic_pointer_xor (volatile void *atomic, gsize val); __attribute__((__deprecated__("Use '" "g_atomic_int_add" "' instead"))) extern gint g_atomic_int_exchange_and_add (volatile gint *atomic, gint val); /* We prefer the new C11-style atomic extension of GCC if available */ /* This assumes sizeof(int) is 4: gatomic.c statically * asserts that (using G_STATIC_ASSERT at top-level in a header was * problematic, see #730932) */ # 33 "/usr/include/glib-2.0/glib/gthread.h" 2 # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gerror.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.15 Variable arguments */ # 27 "/usr/include/glib-2.0/glib/gerror.h" 2 # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 # 1 "/usr/include/glib-2.0/glib/gquark.h" /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gquark.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gquark.h" 2 typedef guint32 GQuark; /* Quarks (string<->id association) */ extern GQuark g_quark_try_string (const gchar *string); extern GQuark g_quark_from_static_string (const gchar *string); extern GQuark g_quark_from_string (const gchar *string); extern const gchar * g_quark_to_string (GQuark quark) __attribute__((__const__)); # 61 "/usr/include/glib-2.0/glib/gquark.h" extern const gchar * g_intern_string (const gchar *string); extern const gchar * g_intern_static_string (const gchar *string); # 29 "/usr/include/glib-2.0/glib/gerror.h" 2 /** * GError: * @domain: error domain, e.g. #G_FILE_ERROR * @code: error code, e.g. %G_FILE_ERROR_NOENT * @message: human-readable informative error message * * The `GError` structure contains information about * an error that has occurred. */ typedef struct _GError GError; struct _GError { GQuark domain; gint code; gchar *message; }; extern GError* g_error_new (GQuark domain, gint code, const gchar *format, ...) __attribute__((__format__ (__printf__, 3, 4))); extern GError* g_error_new_literal (GQuark domain, gint code, const gchar *message); extern GError* g_error_new_valist (GQuark domain, gint code, const gchar *format, va_list args) __attribute__((__format__ (__printf__, 3, 0))); extern void g_error_free (GError *error); extern GError* g_error_copy (const GError *error); extern gboolean g_error_matches (const GError *error, GQuark domain, gint code); /* if (err) *err = g_error_new(domain, code, format, ...), also has * some sanity checks. */ extern void g_set_error (GError **err, GQuark domain, gint code, const gchar *format, ...) __attribute__((__format__ (__printf__, 4, 5))); extern void g_set_error_literal (GError **err, GQuark domain, gint code, const gchar *message); /* if (dest) *dest = src; also has some sanity checks. */ extern void g_propagate_error (GError **dest, GError *src); /* if (err && *err) { g_error_free(*err); *err = NULL; } */ extern void g_clear_error (GError **err); /* if (err) prefix the formatted string to the ->message */ extern void g_prefix_error (GError **err, const gchar *format, ...) __attribute__((__format__ (__printf__, 2, 3))); /* g_propagate_error then g_error_prefix on dest */ extern void g_propagate_prefixed_error (GError **dest, GError *src, const gchar *format, ...) __attribute__((__format__ (__printf__, 3, 4))); # 34 "/usr/include/glib-2.0/glib/gthread.h" 2 # 1 "/usr/include/glib-2.0/glib/gutils.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gutils.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gutils.h" 2 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.15 Variable arguments */ # 34 "/usr/include/glib-2.0/glib/gutils.h" 2 # 37 "/usr/include/glib-2.0/glib/gutils.h" /* Define G_VA_COPY() to do the right thing for copying va_list variables. * glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy. */ # 50 "/usr/include/glib-2.0/glib/gutils.h" extern const gchar * g_get_user_name (void); extern const gchar * g_get_real_name (void); extern const gchar * g_get_home_dir (void); extern const gchar * g_get_tmp_dir (void); extern const gchar * g_get_host_name (void); extern const gchar * g_get_prgname (void); extern void g_set_prgname (const gchar *prgname); extern const gchar * g_get_application_name (void); extern void g_set_application_name (const gchar *application_name); extern void g_reload_user_special_dirs_cache (void); extern const gchar * g_get_user_data_dir (void); extern const gchar * g_get_user_config_dir (void); extern const gchar * g_get_user_cache_dir (void); extern const gchar * const * g_get_system_data_dirs (void); # 99 "/usr/include/glib-2.0/glib/gutils.h" extern const gchar * const * g_get_system_config_dirs (void); extern const gchar * g_get_user_runtime_dir (void); /** * GUserDirectory: * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory * @G_USER_DIRECTORY_MUSIC: the user's Music directory * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory * @G_USER_N_DIRECTORIES: the number of enum values * * These are logical ids for special directories which are defined * depending on the platform used. You should use g_get_user_special_dir() * to retrieve the full path associated to the logical id. * * The #GUserDirectory enumeration can be extended at later date. Not * every platform has a directory for every logical id in this * enumeration. * * Since: 2.14 */ typedef enum { G_USER_DIRECTORY_DESKTOP, G_USER_DIRECTORY_DOCUMENTS, G_USER_DIRECTORY_DOWNLOAD, G_USER_DIRECTORY_MUSIC, G_USER_DIRECTORY_PICTURES, G_USER_DIRECTORY_PUBLIC_SHARE, G_USER_DIRECTORY_TEMPLATES, G_USER_DIRECTORY_VIDEOS, G_USER_N_DIRECTORIES } GUserDirectory; extern const gchar * g_get_user_special_dir (GUserDirectory directory); /** * GDebugKey: * @key: the string * @value: the flag * * Associates a string with a bit flag. * Used in g_parse_debug_string(). */ typedef struct _GDebugKey GDebugKey; struct _GDebugKey { const gchar *key; guint value; }; /* Miscellaneous utility functions */ extern guint g_parse_debug_string (const gchar *string, const GDebugKey *keys, guint nkeys); extern gint g_snprintf (gchar *string, gulong n, gchar const *format, ...) __attribute__((__format__ (__printf__, 3, 4))); extern gint g_vsnprintf (gchar *string, gulong n, gchar const *format, va_list args) __attribute__((__format__ (__printf__, 3, 0))); extern void g_nullify_pointer (gpointer *nullify_location); typedef enum { G_FORMAT_SIZE_DEFAULT = 0, G_FORMAT_SIZE_LONG_FORMAT = 1 << 0, G_FORMAT_SIZE_IEC_UNITS = 1 << 1, G_FORMAT_SIZE_BITS = 1 << 2 } GFormatSizeFlags; extern gchar *g_format_size_full (guint64 size, GFormatSizeFlags flags); extern gchar *g_format_size (guint64 size); __attribute__((__deprecated__("Use '" "g_format_size" "' instead"))) extern gchar *g_format_size_for_display (goffset size); /** * GVoidFunc: * * Declares a type of function which takes no arguments * and has no return value. It is used to specify the type * function passed to g_atexit(). */ typedef void (*GVoidFunc) (void); __attribute__((__deprecated__)) extern void g_atexit (GVoidFunc func); # 226 "/usr/include/glib-2.0/glib/gutils.h" /* Look for an executable in PATH, following execvp() rules */ extern gchar* g_find_program_in_path (const gchar *program); /* Bit tests * * These are defined in a convoluted way because we want the compiler to * be able to inline the code for performance reasons, but for * historical reasons, we must continue to provide non-inline versions * on our ABI. * * We define these as functions in gutils.c which are just implemented * as calls to the _impl() versions in order to preserve the ABI. */ extern gint (g_bit_nth_lsf) (gulong mask, gint nth_bit); extern gint (g_bit_nth_msf) (gulong mask, gint nth_bit); extern guint (g_bit_storage) (gulong number); static inline gint g_bit_nth_lsf_impl (gulong mask, gint nth_bit) { if ((nth_bit < -1)) nth_bit = -1; while (nth_bit < ((8 * 8) - 1)) { nth_bit++; if (mask & (1UL << nth_bit)) return nth_bit; } return -1; } static inline gint g_bit_nth_msf_impl (gulong mask, gint nth_bit) { if (nth_bit < 0 || (nth_bit > 8 * 8)) nth_bit = 8 * 8; while (nth_bit > 0) { nth_bit--; if (mask & (1UL << nth_bit)) return nth_bit; } return -1; } static inline guint g_bit_storage_impl (gulong number) { guint n_bits = 0; do { n_bits++; number >>= 1; } while (number); return n_bits; } /* Crashes the program. */ # 1 "/usr/include/stdlib.h" 1 3 4 # 1 "/usr/include/stdlib.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.20 General utilities */ # 307 "/usr/include/glib-2.0/glib/gutils.h" 2 # 316 "/usr/include/glib-2.0/glib/gutils.h" # 316 "/usr/include/glib-2.0/glib/gutils.h" /* * This macro is deprecated. This DllMain() is too complex. It is * recommended to write an explicit minimal DLlMain() that just saves * the handle to the DLL and then use that handle instead, for * instance passing it to * g_win32_get_package_installation_directory_of_module(). * * On Windows, this macro defines a DllMain function that stores the * actual DLL name that the code being compiled will be included in. * STATIC should be empty or 'static'. DLL_NAME is the name of the * (pointer to the) char array where the DLL name will be stored. If * this is used, you must also include . If you need a more complex * DLL entry point function, you cannot use this. * * On non-Windows platforms, expands to nothing. */ # 363 "/usr/include/glib-2.0/glib/gutils.h" # 35 "/usr/include/glib-2.0/glib/gthread.h" 2 extern GQuark g_thread_error_quark (void); typedef enum { G_THREAD_ERROR_AGAIN /* Resource temporarily unavailable */ } GThreadError; typedef gpointer (*GThreadFunc) (gpointer data); typedef struct _GThread GThread; typedef union _GMutex GMutex; typedef struct _GRecMutex GRecMutex; typedef struct _GRWLock GRWLock; typedef struct _GCond GCond; typedef struct _GPrivate GPrivate; typedef struct _GOnce GOnce; union _GMutex { /*< private >*/ gpointer p; guint i[2]; }; struct _GRWLock { /*< private >*/ gpointer p; guint i[2]; }; struct _GCond { /*< private >*/ gpointer p; guint i[2]; }; struct _GRecMutex { /*< private >*/ gpointer p; guint i[2]; }; struct _GPrivate { /*< private >*/ gpointer p; GDestroyNotify notify; gpointer future[2]; }; typedef enum { G_ONCE_STATUS_NOTCALLED, G_ONCE_STATUS_PROGRESS, G_ONCE_STATUS_READY } GOnceStatus; struct _GOnce { volatile GOnceStatus status; volatile gpointer retval; }; # 140 "/usr/include/glib-2.0/glib/gthread.h" extern GThread * g_thread_ref (GThread *thread); extern void g_thread_unref (GThread *thread); extern GThread * g_thread_new (const gchar *name, GThreadFunc func, gpointer data); extern GThread * g_thread_try_new (const gchar *name, GThreadFunc func, gpointer data, GError **error); extern GThread * g_thread_self (void); extern void g_thread_exit (gpointer retval); extern gpointer g_thread_join (GThread *thread); extern void g_thread_yield (void); extern void g_mutex_init (GMutex *mutex); extern void g_mutex_clear (GMutex *mutex); extern void g_mutex_lock (GMutex *mutex); extern gboolean g_mutex_trylock (GMutex *mutex); extern void g_mutex_unlock (GMutex *mutex); extern void g_rw_lock_init (GRWLock *rw_lock); extern void g_rw_lock_clear (GRWLock *rw_lock); extern void g_rw_lock_writer_lock (GRWLock *rw_lock); extern gboolean g_rw_lock_writer_trylock (GRWLock *rw_lock); extern void g_rw_lock_writer_unlock (GRWLock *rw_lock); extern void g_rw_lock_reader_lock (GRWLock *rw_lock); extern gboolean g_rw_lock_reader_trylock (GRWLock *rw_lock); extern void g_rw_lock_reader_unlock (GRWLock *rw_lock); extern void g_rec_mutex_init (GRecMutex *rec_mutex); extern void g_rec_mutex_clear (GRecMutex *rec_mutex); extern void g_rec_mutex_lock (GRecMutex *rec_mutex); extern gboolean g_rec_mutex_trylock (GRecMutex *rec_mutex); extern void g_rec_mutex_unlock (GRecMutex *rec_mutex); extern void g_cond_init (GCond *cond); extern void g_cond_clear (GCond *cond); extern void g_cond_wait (GCond *cond, GMutex *mutex); extern void g_cond_signal (GCond *cond); extern void g_cond_broadcast (GCond *cond); extern gboolean g_cond_wait_until (GCond *cond, GMutex *mutex, gint64 end_time); extern gpointer g_private_get (GPrivate *key); extern void g_private_set (GPrivate *key, gpointer value); extern void g_private_replace (GPrivate *key, gpointer value); extern gpointer g_once_impl (GOnce *once, GThreadFunc func, gpointer arg); extern gboolean g_once_init_enter (volatile void *location); extern void g_once_init_leave (volatile void *location, gsize result); # 267 "/usr/include/glib-2.0/glib/gthread.h" extern guint g_get_num_processors (void); /** * GMutexLocker: * * Opaque type. See g_mutex_locker_new() for details. * Since: 2.44 */ typedef void GMutexLocker; /** * g_mutex_locker_new: * @mutex: a mutex to lock * * Lock @mutex and return a new #GMutexLocker. Unlock with * g_mutex_locker_free(). Using g_mutex_unlock() on @mutex * while a #GMutexLocker exists can lead to undefined behaviour. * * This is intended to be used with g_autoptr(). Note that g_autoptr() * is only available when using GCC or clang, so the following example * will only work with those compilers: * |[ * typedef struct * { * ... * GMutex mutex; * ... * } MyObject; * * static void * my_object_do_stuff (MyObject *self) * { * g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&self->mutex); * * // Code with mutex locked here * * if (cond) * // No need to unlock * return; * * // Optionally early unlock * g_clear_pointer (&locker, g_mutex_locker_free); * * // Code with mutex unlocked here * } * ]| * * Returns: a #GMutexLocker * Since: 2.44 */ static inline GMutexLocker * g_mutex_locker_new (GMutex *mutex) { g_mutex_lock (mutex); return (GMutexLocker *) mutex; } /** * g_mutex_locker_free: * @locker: a GMutexLocker * * Unlock @locker's mutex. See g_mutex_locker_new() for details. * * Since: 2.44 */ static inline void g_mutex_locker_free (GMutexLocker *locker) { g_mutex_unlock ((GMutex *) locker); } # 33 "/usr/include/glib-2.0/glib/gasyncqueue.h" 2 typedef struct _GAsyncQueue GAsyncQueue; extern GAsyncQueue *g_async_queue_new (void); extern GAsyncQueue *g_async_queue_new_full (GDestroyNotify item_free_func); extern void g_async_queue_lock (GAsyncQueue *queue); extern void g_async_queue_unlock (GAsyncQueue *queue); extern GAsyncQueue *g_async_queue_ref (GAsyncQueue *queue); extern void g_async_queue_unref (GAsyncQueue *queue); __attribute__((__deprecated__("Use '" "g_async_queue_ref" "' instead"))) extern void g_async_queue_ref_unlocked (GAsyncQueue *queue); __attribute__((__deprecated__("Use '" "g_async_queue_unref" "' instead"))) extern void g_async_queue_unref_and_unlock (GAsyncQueue *queue); extern void g_async_queue_push (GAsyncQueue *queue, gpointer data); extern void g_async_queue_push_unlocked (GAsyncQueue *queue, gpointer data); extern void g_async_queue_push_sorted (GAsyncQueue *queue, gpointer data, GCompareDataFunc func, gpointer user_data); extern void g_async_queue_push_sorted_unlocked (GAsyncQueue *queue, gpointer data, GCompareDataFunc func, gpointer user_data); extern gpointer g_async_queue_pop (GAsyncQueue *queue); extern gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); extern gpointer g_async_queue_try_pop (GAsyncQueue *queue); extern gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); extern gpointer g_async_queue_timeout_pop (GAsyncQueue *queue, guint64 timeout); extern gpointer g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue, guint64 timeout); extern gint g_async_queue_length (GAsyncQueue *queue); extern gint g_async_queue_length_unlocked (GAsyncQueue *queue); extern void g_async_queue_sort (GAsyncQueue *queue, GCompareDataFunc func, gpointer user_data); extern void g_async_queue_sort_unlocked (GAsyncQueue *queue, GCompareDataFunc func, gpointer user_data); extern gboolean g_async_queue_remove (GAsyncQueue *queue, gpointer item); extern gboolean g_async_queue_remove_unlocked (GAsyncQueue *queue, gpointer item); extern void g_async_queue_push_front (GAsyncQueue *queue, gpointer item); extern void g_async_queue_push_front_unlocked (GAsyncQueue *queue, gpointer item); __attribute__((__deprecated__("Use '" "g_async_queue_timeout_pop" "' instead"))) extern gpointer g_async_queue_timed_pop (GAsyncQueue *queue, GTimeVal *end_time); __attribute__((__deprecated__("Use '" "g_async_queue_timeout_pop_unlocked" "' instead"))) extern gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, GTimeVal *end_time); # 33 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gatomic.h" 1 /* * Copyright © 2011 Ryan Lortie * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ # 34 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gbacktrace.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gbacktrace.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gbacktrace.h" 2 # 1 "/usr/include/signal.h" 1 3 4 # 1 "/usr/include/signal.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.14 Signal handling */ # 37 "/usr/include/glib-2.0/glib/gbacktrace.h" 2 # 40 "/usr/include/glib-2.0/glib/gbacktrace.h" extern void g_on_error_query (const gchar *prg_name); extern void g_on_error_stack_trace (const gchar *prg_name); /** * G_BREAKPOINT: * * Inserts a breakpoint instruction into the code. * * On x86 and alpha systems this is implemented as a soft interrupt * and on other architectures it raises a `SIGTRAP` signal. */ # 67 "/usr/include/glib-2.0/glib/gbacktrace.h" # 35 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gbase64.h" 1 /* gbase64.h - Base64 coding functions * * Copyright (C) 2005 Alexander Larsson * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gbase64.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 27 "/usr/include/glib-2.0/glib/gbase64.h" 2 extern gsize g_base64_encode_step (const guchar *in, gsize len, gboolean break_lines, gchar *out, gint *state, gint *save); extern gsize g_base64_encode_close (gboolean break_lines, gchar *out, gint *state, gint *save); extern gchar* g_base64_encode (const guchar *data, gsize len) __attribute__((__malloc__)); extern gsize g_base64_decode_step (const gchar *in, gsize len, guchar *out, gint *state, guint *save); extern guchar *g_base64_decode (const gchar *text, gsize *out_len) __attribute__((__malloc__)); extern guchar *g_base64_decode_inplace (gchar *text, gsize *out_len); # 36 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gbitlock.h" 1 /* * Copyright © 2008 Ryan Lortie * Copyright © 2010 Codethink Limited * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 25 "/usr/include/glib-2.0/glib/gbitlock.h" 2 extern void g_bit_lock (volatile gint *address, gint lock_bit); extern gboolean g_bit_trylock (volatile gint *address, gint lock_bit); extern void g_bit_unlock (volatile gint *address, gint lock_bit); extern void g_pointer_bit_lock (volatile void *address, gint lock_bit); extern gboolean g_pointer_bit_trylock (volatile void *address, gint lock_bit); extern void g_pointer_bit_unlock (volatile void *address, gint lock_bit); # 74 "/usr/include/glib-2.0/glib/gbitlock.h" # 37 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gbookmarkfile.h" 1 /* gbookmarkfile.h: parsing and building desktop bookmarks * * Copyright (C) 2005-2006 Emmanuele Bassi * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gbookmarkfile.h" # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 27 "/usr/include/glib-2.0/glib/gbookmarkfile.h" 2 # 1 "/usr/include/time.h" 1 3 4 # 1 "/usr/include/time.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ # 28 "/usr/include/glib-2.0/glib/gbookmarkfile.h" 2 # 31 "/usr/include/glib-2.0/glib/gbookmarkfile.h" /** * G_BOOKMARK_FILE_ERROR: * * Error domain for bookmark file parsing. * Errors in this domain will be from the #GBookmarkFileError * enumeration. See #GError for information on error domains. */ /** * GBookmarkFileError: * @G_BOOKMARK_FILE_ERROR_INVALID_URI: URI was ill-formed * @G_BOOKMARK_FILE_ERROR_INVALID_VALUE: a requested field was not found * @G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED: a requested application did * not register a bookmark * @G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND: a requested URI was not found * @G_BOOKMARK_FILE_ERROR_READ: document was ill formed * @G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was * in an unknown encoding * @G_BOOKMARK_FILE_ERROR_WRITE: an error occurred while writing * @G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND: requested file was not found * * Error codes returned by bookmark file parsing. */ typedef enum { G_BOOKMARK_FILE_ERROR_INVALID_URI, G_BOOKMARK_FILE_ERROR_INVALID_VALUE, G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED, G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND, G_BOOKMARK_FILE_ERROR_READ, G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING, G_BOOKMARK_FILE_ERROR_WRITE, G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND } GBookmarkFileError; extern GQuark g_bookmark_file_error_quark (void); /** * GBookmarkFile: * * The `GBookmarkFile` structure contains only * private data and should not be directly accessed. */ typedef struct _GBookmarkFile GBookmarkFile; extern GBookmarkFile *g_bookmark_file_new (void); extern void g_bookmark_file_free (GBookmarkFile *bookmark); extern gboolean g_bookmark_file_load_from_file (GBookmarkFile *bookmark, const gchar *filename, GError **error); extern gboolean g_bookmark_file_load_from_data (GBookmarkFile *bookmark, const gchar *data, gsize length, GError **error); extern gboolean g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark, const gchar *file, gchar **full_path, GError **error); extern gchar * g_bookmark_file_to_data (GBookmarkFile *bookmark, gsize *length, GError **error) __attribute__((__malloc__)); extern gboolean g_bookmark_file_to_file (GBookmarkFile *bookmark, const gchar *filename, GError **error); extern void g_bookmark_file_set_title (GBookmarkFile *bookmark, const gchar *uri, const gchar *title); extern gchar * g_bookmark_file_get_title (GBookmarkFile *bookmark, const gchar *uri, GError **error) __attribute__((__malloc__)); extern void g_bookmark_file_set_description (GBookmarkFile *bookmark, const gchar *uri, const gchar *description); extern gchar * g_bookmark_file_get_description (GBookmarkFile *bookmark, const gchar *uri, GError **error) __attribute__((__malloc__)); extern void g_bookmark_file_set_mime_type (GBookmarkFile *bookmark, const gchar *uri, const gchar *mime_type); extern gchar * g_bookmark_file_get_mime_type (GBookmarkFile *bookmark, const gchar *uri, GError **error) __attribute__((__malloc__)); extern void g_bookmark_file_set_groups (GBookmarkFile *bookmark, const gchar *uri, const gchar **groups, gsize length); extern void g_bookmark_file_add_group (GBookmarkFile *bookmark, const gchar *uri, const gchar *group); extern gboolean g_bookmark_file_has_group (GBookmarkFile *bookmark, const gchar *uri, const gchar *group, GError **error); extern gchar ** g_bookmark_file_get_groups (GBookmarkFile *bookmark, const gchar *uri, gsize *length, GError **error); extern void g_bookmark_file_add_application (GBookmarkFile *bookmark, const gchar *uri, const gchar *name, const gchar *exec); extern gboolean g_bookmark_file_has_application (GBookmarkFile *bookmark, const gchar *uri, const gchar *name, GError **error); extern gchar ** g_bookmark_file_get_applications (GBookmarkFile *bookmark, const gchar *uri, gsize *length, GError **error); extern gboolean g_bookmark_file_set_app_info (GBookmarkFile *bookmark, const gchar *uri, const gchar *name, const gchar *exec, gint count, time_t stamp, GError **error); extern gboolean g_bookmark_file_get_app_info (GBookmarkFile *bookmark, const gchar *uri, const gchar *name, gchar **exec, guint *count, time_t *stamp, GError **error); extern void g_bookmark_file_set_is_private (GBookmarkFile *bookmark, const gchar *uri, gboolean is_private); extern gboolean g_bookmark_file_get_is_private (GBookmarkFile *bookmark, const gchar *uri, GError **error); extern void g_bookmark_file_set_icon (GBookmarkFile *bookmark, const gchar *uri, const gchar *href, const gchar *mime_type); extern gboolean g_bookmark_file_get_icon (GBookmarkFile *bookmark, const gchar *uri, gchar **href, gchar **mime_type, GError **error); extern void g_bookmark_file_set_added (GBookmarkFile *bookmark, const gchar *uri, time_t added); extern time_t g_bookmark_file_get_added (GBookmarkFile *bookmark, const gchar *uri, GError **error); extern void g_bookmark_file_set_modified (GBookmarkFile *bookmark, const gchar *uri, time_t modified); extern time_t g_bookmark_file_get_modified (GBookmarkFile *bookmark, const gchar *uri, GError **error); extern void g_bookmark_file_set_visited (GBookmarkFile *bookmark, const gchar *uri, time_t visited); extern time_t g_bookmark_file_get_visited (GBookmarkFile *bookmark, const gchar *uri, GError **error); extern gboolean g_bookmark_file_has_item (GBookmarkFile *bookmark, const gchar *uri); extern gint g_bookmark_file_get_size (GBookmarkFile *bookmark); extern gchar ** g_bookmark_file_get_uris (GBookmarkFile *bookmark, gsize *length); extern gboolean g_bookmark_file_remove_group (GBookmarkFile *bookmark, const gchar *uri, const gchar *group, GError **error); extern gboolean g_bookmark_file_remove_application (GBookmarkFile *bookmark, const gchar *uri, const gchar *name, GError **error); extern gboolean g_bookmark_file_remove_item (GBookmarkFile *bookmark, const gchar *uri, GError **error); extern gboolean g_bookmark_file_move_item (GBookmarkFile *bookmark, const gchar *old_uri, const gchar *new_uri, GError **error); # 38 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 /* * Copyright © 2009, 2010 Codethink Limited * Copyright © 2011 Collabora Ltd. * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie * Stef Walter */ # 29 "/usr/include/glib-2.0/glib/gbytes.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 30 "/usr/include/glib-2.0/glib/gbytes.h" 2 # 1 "/usr/include/glib-2.0/glib/garray.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 31 "/usr/include/glib-2.0/glib/gbytes.h" 2 extern GBytes * g_bytes_new (gconstpointer data, gsize size); extern GBytes * g_bytes_new_take (gpointer data, gsize size); extern GBytes * g_bytes_new_static (gconstpointer data, gsize size); extern GBytes * g_bytes_new_with_free_func (gconstpointer data, gsize size, GDestroyNotify free_func, gpointer user_data); extern GBytes * g_bytes_new_from_bytes (GBytes *bytes, gsize offset, gsize length); extern gconstpointer g_bytes_get_data (GBytes *bytes, gsize *size); extern gsize g_bytes_get_size (GBytes *bytes); extern GBytes * g_bytes_ref (GBytes *bytes); extern void g_bytes_unref (GBytes *bytes); extern gpointer g_bytes_unref_to_data (GBytes *bytes, gsize *size); extern GByteArray * g_bytes_unref_to_array (GBytes *bytes); extern guint g_bytes_hash (gconstpointer bytes); extern gboolean g_bytes_equal (gconstpointer bytes1, gconstpointer bytes2); extern gint g_bytes_compare (gconstpointer bytes1, gconstpointer bytes2); # 39 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gcharset.h" 1 /* gcharset.h - Charset functions * * Copyright (C) 2011 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gcharset.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 27 "/usr/include/glib-2.0/glib/gcharset.h" 2 extern gboolean g_get_charset (const char **charset); extern gchar * g_get_codeset (void); extern const gchar * const * g_get_language_names (void); extern gchar ** g_get_locale_variants (const gchar *locale); # 40 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gchecksum.h" 1 /* gchecksum.h - data hashing functions * * Copyright (C) 2007 Emmanuele Bassi * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gchecksum.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 27 "/usr/include/glib-2.0/glib/gchecksum.h" 2 # 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 /* * Copyright © 2009, 2010 Codethink Limited * Copyright © 2011 Collabora Ltd. * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie * Stef Walter */ # 28 "/usr/include/glib-2.0/glib/gchecksum.h" 2 /** * GChecksumType: * @G_CHECKSUM_MD5: Use the MD5 hashing algorithm * @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm * @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm * @G_CHECKSUM_SHA384: Use the SHA-384 hashing algorithm (Since: 2.51) * @G_CHECKSUM_SHA512: Use the SHA-512 hashing algorithm (Since: 2.36) * * The hashing algorithm to be used by #GChecksum when performing the * digest of some data. * * Note that the #GChecksumType enumeration may be extended at a later * date to include new hashing algorithm types. * * Since: 2.16 */ typedef enum { G_CHECKSUM_MD5, G_CHECKSUM_SHA1, G_CHECKSUM_SHA256, G_CHECKSUM_SHA512, G_CHECKSUM_SHA384 } GChecksumType; /** * GChecksum: * * An opaque structure representing a checksumming operation. * To create a new GChecksum, use g_checksum_new(). To free * a GChecksum, use g_checksum_free(). * * Since: 2.16 */ typedef struct _GChecksum GChecksum; extern gssize g_checksum_type_get_length (GChecksumType checksum_type); extern GChecksum * g_checksum_new (GChecksumType checksum_type); extern void g_checksum_reset (GChecksum *checksum); extern GChecksum * g_checksum_copy (const GChecksum *checksum); extern void g_checksum_free (GChecksum *checksum); extern void g_checksum_update (GChecksum *checksum, const guchar *data, gssize length); extern const gchar * g_checksum_get_string (GChecksum *checksum); extern void g_checksum_get_digest (GChecksum *checksum, guint8 *buffer, gsize *digest_len); extern gchar *g_compute_checksum_for_data (GChecksumType checksum_type, const guchar *data, gsize length); extern gchar *g_compute_checksum_for_string (GChecksumType checksum_type, const gchar *str, gssize length); extern gchar *g_compute_checksum_for_bytes (GChecksumType checksum_type, GBytes *data); # 41 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gconvert.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gconvert.h" # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 33 "/usr/include/glib-2.0/glib/gconvert.h" 2 /** * GConvertError: * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character * sets is not supported. * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input; * or the character sequence could not be represented in the target * character set. * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason. * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input. * @G_CONVERT_ERROR_BAD_URI: URI is invalid. * @G_CONVERT_ERROR_NOT_ABSOLUTE_PATH: Pathname is not an absolute path. * @G_CONVERT_ERROR_NO_MEMORY: No memory available. Since: 2.40 * @G_CONVERT_ERROR_EMBEDDED_NUL: An embedded NUL character is present in * conversion output where a NUL-terminated string is expected. * Since: 2.56 * * Error codes returned by character set conversion routines. */ typedef enum { G_CONVERT_ERROR_NO_CONVERSION, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, G_CONVERT_ERROR_FAILED, G_CONVERT_ERROR_PARTIAL_INPUT, G_CONVERT_ERROR_BAD_URI, G_CONVERT_ERROR_NOT_ABSOLUTE_PATH, G_CONVERT_ERROR_NO_MEMORY, G_CONVERT_ERROR_EMBEDDED_NUL } GConvertError; /** * G_CONVERT_ERROR: * * Error domain for character set conversions. Errors in this domain will * be from the #GConvertError enumeration. See #GError for information on * error domains. */ extern GQuark g_convert_error_quark (void); /** * GIConv: (skip) * * The GIConv struct wraps an iconv() conversion descriptor. It contains * private data and should only be accessed using the following functions. */ typedef struct _GIConv *GIConv; extern GIConv g_iconv_open (const gchar *to_codeset, const gchar *from_codeset); extern gsize g_iconv (GIConv converter, gchar **inbuf, gsize *inbytes_left, gchar **outbuf, gsize *outbytes_left); extern gint g_iconv_close (GIConv converter); extern gchar* g_convert (const gchar *str, gssize len, const gchar *to_codeset, const gchar *from_codeset, gsize *bytes_read, gsize *bytes_written, GError **error) __attribute__((__malloc__)); extern gchar* g_convert_with_iconv (const gchar *str, gssize len, GIConv converter, gsize *bytes_read, gsize *bytes_written, GError **error) __attribute__((__malloc__)); extern gchar* g_convert_with_fallback (const gchar *str, gssize len, const gchar *to_codeset, const gchar *from_codeset, const gchar *fallback, gsize *bytes_read, gsize *bytes_written, GError **error) __attribute__((__malloc__)); /* Convert between libc's idea of strings and UTF-8. */ extern gchar* g_locale_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error) __attribute__((__malloc__)); extern gchar* g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error) __attribute__((__malloc__)); /* Convert between the operating system (or C runtime) * representation of file names and UTF-8. */ extern gchar* g_filename_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error) __attribute__((__malloc__)); extern gchar* g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error) __attribute__((__malloc__)); extern gchar *g_filename_from_uri (const gchar *uri, gchar **hostname, GError **error) __attribute__((__malloc__)); extern gchar *g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **error) __attribute__((__malloc__)); extern gchar *g_filename_display_name (const gchar *filename) __attribute__((__malloc__)); extern gboolean g_get_filename_charsets (const gchar ***charsets); extern gchar *g_filename_display_basename (const gchar *filename) __attribute__((__malloc__)); extern gchar **g_uri_list_extract_uris (const gchar *uri_list); # 42 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gdataset.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gdataset.h" # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gdataset.h" 2 typedef struct _GData GData; typedef void (*GDataForeachFunc) (GQuark key_id, gpointer data, gpointer user_data); /* Keyed Data List */ extern void g_datalist_init (GData **datalist); extern void g_datalist_clear (GData **datalist); extern gpointer g_datalist_id_get_data (GData **datalist, GQuark key_id); extern void g_datalist_id_set_data_full (GData **datalist, GQuark key_id, gpointer data, GDestroyNotify destroy_func); typedef gpointer (*GDuplicateFunc) (gpointer data, gpointer user_data); extern gpointer g_datalist_id_dup_data (GData **datalist, GQuark key_id, GDuplicateFunc dup_func, gpointer user_data); extern gboolean g_datalist_id_replace_data (GData **datalist, GQuark key_id, gpointer oldval, gpointer newval, GDestroyNotify destroy, GDestroyNotify *old_destroy); extern gpointer g_datalist_id_remove_no_notify (GData **datalist, GQuark key_id); extern void g_datalist_foreach (GData **datalist, GDataForeachFunc func, gpointer user_data); /** * G_DATALIST_FLAGS_MASK: * * A bitmask that restricts the possible flags passed to * g_datalist_set_flags(). Passing a flags value where * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error. */ extern void g_datalist_set_flags (GData **datalist, guint flags); extern void g_datalist_unset_flags (GData **datalist, guint flags); extern guint g_datalist_get_flags (GData **datalist); # 111 "/usr/include/glib-2.0/glib/gdataset.h" /* Location Associated Keyed Data */ extern void g_dataset_destroy (gconstpointer dataset_location); extern gpointer g_dataset_id_get_data (gconstpointer dataset_location, GQuark key_id); extern gpointer g_datalist_get_data (GData **datalist, const gchar *key); extern void g_dataset_id_set_data_full (gconstpointer dataset_location, GQuark key_id, gpointer data, GDestroyNotify destroy_func); extern gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, GQuark key_id); extern void g_dataset_foreach (gconstpointer dataset_location, GDataForeachFunc func, gpointer user_data); # 148 "/usr/include/glib-2.0/glib/gdataset.h" # 43 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gdate.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gdate.h" # 1 "/usr/include/time.h" 1 3 4 # 1 "/usr/include/time.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ # 33 "/usr/include/glib-2.0/glib/gdate.h" 2 # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 # 1 "/usr/include/glib-2.0/glib/gtypes.h" /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 35 "/usr/include/glib-2.0/glib/gdate.h" 2 # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 36 "/usr/include/glib-2.0/glib/gdate.h" 2 /* GDate * * Date calculations (not time for now, to be resolved). These are a * mutant combination of Steffen Beyer's DateCalc routines * (http://www.perl.com/CPAN/authors/id/STBEY/) and Jon Trowbridge's * date routines (written for in-house software). Written by Havoc * Pennington */ typedef gint32 GTime; typedef guint16 GDateYear; typedef guint8 GDateDay; /* day of the month */ typedef struct _GDate GDate; /* enum used to specify order of appearance in parsed date strings */ typedef enum { G_DATE_DAY = 0, G_DATE_MONTH = 1, G_DATE_YEAR = 2 } GDateDMY; /* actual week and month values */ typedef enum { G_DATE_BAD_WEEKDAY = 0, G_DATE_MONDAY = 1, G_DATE_TUESDAY = 2, G_DATE_WEDNESDAY = 3, G_DATE_THURSDAY = 4, G_DATE_FRIDAY = 5, G_DATE_SATURDAY = 6, G_DATE_SUNDAY = 7 } GDateWeekday; typedef enum { G_DATE_BAD_MONTH = 0, G_DATE_JANUARY = 1, G_DATE_FEBRUARY = 2, G_DATE_MARCH = 3, G_DATE_APRIL = 4, G_DATE_MAY = 5, G_DATE_JUNE = 6, G_DATE_JULY = 7, G_DATE_AUGUST = 8, G_DATE_SEPTEMBER = 9, G_DATE_OCTOBER = 10, G_DATE_NOVEMBER = 11, G_DATE_DECEMBER = 12 } GDateMonth; /* Note: directly manipulating structs is generally a bad idea, but * in this case it's an *incredibly* bad idea, because all or part * of this struct can be invalid at any given time. Use the functions, * or you will get hosed, I promise. */ struct _GDate { guint julian_days : 32; /* julian days representation - we use a * bitfield hoping that 64 bit platforms * will pack this whole struct in one big * int */ guint julian : 1; /* julian is valid */ guint dmy : 1; /* dmy is valid */ /* DMY representation */ guint day : 6; guint month : 4; guint year : 16; }; /* g_date_new() returns an invalid date, you then have to _set() stuff * to get a usable object. You can also allocate a GDate statically, * then call g_date_clear() to initialize. */ extern GDate* g_date_new (void); extern GDate* g_date_new_dmy (GDateDay day, GDateMonth month, GDateYear year); extern GDate* g_date_new_julian (guint32 julian_day); extern void g_date_free (GDate *date); extern GDate* g_date_copy (const GDate *date); /* check g_date_valid() after doing an operation that might fail, like * _parse. Almost all g_date operations are undefined on invalid * dates (the exceptions are the mutators, since you need those to * return to validity). */ extern gboolean g_date_valid (const GDate *date); extern gboolean g_date_valid_day (GDateDay day) __attribute__((__const__)); extern gboolean g_date_valid_month (GDateMonth month) __attribute__((__const__)); extern gboolean g_date_valid_year (GDateYear year) __attribute__((__const__)); extern gboolean g_date_valid_weekday (GDateWeekday weekday) __attribute__((__const__)); extern gboolean g_date_valid_julian (guint32 julian_date) __attribute__((__const__)); extern gboolean g_date_valid_dmy (GDateDay day, GDateMonth month, GDateYear year) __attribute__((__const__)); extern GDateWeekday g_date_get_weekday (const GDate *date); extern GDateMonth g_date_get_month (const GDate *date); extern GDateYear g_date_get_year (const GDate *date); extern GDateDay g_date_get_day (const GDate *date); extern guint32 g_date_get_julian (const GDate *date); extern guint g_date_get_day_of_year (const GDate *date); /* First monday/sunday is the start of week 1; if we haven't reached * that day, return 0. These are not ISO weeks of the year; that * routine needs to be added. * these functions return the number of weeks, starting on the * corrsponding day */ extern guint g_date_get_monday_week_of_year (const GDate *date); extern guint g_date_get_sunday_week_of_year (const GDate *date); extern guint g_date_get_iso8601_week_of_year (const GDate *date); /* If you create a static date struct you need to clear it to get it * in a sane state before use. You can clear a whole array at * once with the ndates argument. */ extern void g_date_clear (GDate *date, guint n_dates); /* The parse routine is meant for dates typed in by a user, so it * permits many formats but tries to catch common typos. If your data * needs to be strictly validated, it is not an appropriate function. */ extern void g_date_set_parse (GDate *date, const gchar *str); extern void g_date_set_time_t (GDate *date, time_t timet); extern void g_date_set_time_val (GDate *date, GTimeVal *timeval); __attribute__((__deprecated__("Use '" "g_date_set_time_t" "' instead"))) extern void g_date_set_time (GDate *date, GTime time_); extern void g_date_set_month (GDate *date, GDateMonth month); extern void g_date_set_day (GDate *date, GDateDay day); extern void g_date_set_year (GDate *date, GDateYear year); extern void g_date_set_dmy (GDate *date, GDateDay day, GDateMonth month, GDateYear y); extern void g_date_set_julian (GDate *date, guint32 julian_date); extern gboolean g_date_is_first_of_month (const GDate *date); extern gboolean g_date_is_last_of_month (const GDate *date); /* To go forward by some number of weeks just go forward weeks*7 days */ extern void g_date_add_days (GDate *date, guint n_days); extern void g_date_subtract_days (GDate *date, guint n_days); /* If you add/sub months while day > 28, the day might change */ extern void g_date_add_months (GDate *date, guint n_months); extern void g_date_subtract_months (GDate *date, guint n_months); /* If it's feb 29, changing years can move you to the 28th */ extern void g_date_add_years (GDate *date, guint n_years); extern void g_date_subtract_years (GDate *date, guint n_years); extern gboolean g_date_is_leap_year (GDateYear year) __attribute__((__const__)); extern guint8 g_date_get_days_in_month (GDateMonth month, GDateYear year) __attribute__((__const__)); extern guint8 g_date_get_monday_weeks_in_year (GDateYear year) __attribute__((__const__)); extern guint8 g_date_get_sunday_weeks_in_year (GDateYear year) __attribute__((__const__)); /* Returns the number of days between the two dates. If date2 comes before date1, a negative value is return. */ extern gint g_date_days_between (const GDate *date1, const GDate *date2); /* qsort-friendly (with a cast...) */ extern gint g_date_compare (const GDate *lhs, const GDate *rhs); extern void g_date_to_struct_tm (const GDate *date, struct tm *tm); extern void g_date_clamp (GDate *date, const GDate *min_date, const GDate *max_date); /* Swap date1 and date2's values if date1 > date2. */ extern void g_date_order (GDate *date1, GDate *date2); /* Just like strftime() except you can only use date-related formats. * Using a time format is undefined. */ extern gsize g_date_strftime (gchar *s, gsize slen, const gchar *format, const GDate *date); # 309 "/usr/include/glib-2.0/glib/gdate.h" # 44 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gdatetime.h" 1 /* * Copyright (C) 2009-2010 Christian Hergert * Copyright © 2010 Codethink Limited * * 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 * licence, or (at your option) any later version. * * This 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 License * along with this library; if not, see . * * Authors: Christian Hergert * Thiago Santos * Emmanuele Bassi * Ryan Lortie */ # 31 "/usr/include/glib-2.0/glib/gdatetime.h" # 1 "/usr/include/glib-2.0/glib/gtimezone.h" 1 /* * Copyright © 2010 Codethink Limited * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ # 27 "/usr/include/glib-2.0/glib/gtimezone.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 28 "/usr/include/glib-2.0/glib/gtimezone.h" 2 typedef struct _GTimeZone GTimeZone; /** * GTimeType: * @G_TIME_TYPE_STANDARD: the time is in local standard time * @G_TIME_TYPE_DAYLIGHT: the time is in local daylight time * @G_TIME_TYPE_UNIVERSAL: the time is in UTC * * Disambiguates a given time in two ways. * * First, specifies if the given time is in universal or local time. * * Second, if the time is in local time, specifies if it is local * standard time or local daylight time. This is important for the case * where the same local time occurs twice (during daylight savings time * transitions, for example). */ typedef enum { G_TIME_TYPE_STANDARD, G_TIME_TYPE_DAYLIGHT, G_TIME_TYPE_UNIVERSAL } GTimeType; extern GTimeZone * g_time_zone_new (const gchar *identifier); extern GTimeZone * g_time_zone_new_utc (void); extern GTimeZone * g_time_zone_new_local (void); extern GTimeZone * g_time_zone_ref (GTimeZone *tz); extern void g_time_zone_unref (GTimeZone *tz); extern gint g_time_zone_find_interval (GTimeZone *tz, GTimeType type, gint64 time_); extern gint g_time_zone_adjust_time (GTimeZone *tz, GTimeType type, gint64 *time_); extern const gchar * g_time_zone_get_abbreviation (GTimeZone *tz, gint interval); extern gint32 g_time_zone_get_offset (GTimeZone *tz, gint interval); extern gboolean g_time_zone_is_dst (GTimeZone *tz, gint interval); # 32 "/usr/include/glib-2.0/glib/gdatetime.h" 2 /** * G_TIME_SPAN_DAY: * * Evaluates to a time span of one day. * * Since: 2.26 */ /** * G_TIME_SPAN_HOUR: * * Evaluates to a time span of one hour. * * Since: 2.26 */ /** * G_TIME_SPAN_MINUTE: * * Evaluates to a time span of one minute. * * Since: 2.26 */ /** * G_TIME_SPAN_SECOND: * * Evaluates to a time span of one second. * * Since: 2.26 */ /** * G_TIME_SPAN_MILLISECOND: * * Evaluates to a time span of one millisecond. * * Since: 2.26 */ /** * GTimeSpan: * * A value representing an interval of time, in microseconds. * * Since: 2.26 */ typedef gint64 GTimeSpan; /** * GDateTime: * * `GDateTime` is an opaque structure whose members * cannot be accessed directly. * * Since: 2.26 */ typedef struct _GDateTime GDateTime; extern void g_date_time_unref (GDateTime *datetime); extern GDateTime * g_date_time_ref (GDateTime *datetime); extern GDateTime * g_date_time_new_now (GTimeZone *tz); extern GDateTime * g_date_time_new_now_local (void); extern GDateTime * g_date_time_new_now_utc (void); extern GDateTime * g_date_time_new_from_unix_local (gint64 t); extern GDateTime * g_date_time_new_from_unix_utc (gint64 t); extern GDateTime * g_date_time_new_from_timeval_local (const GTimeVal *tv); extern GDateTime * g_date_time_new_from_timeval_utc (const GTimeVal *tv); extern GDateTime * g_date_time_new_from_iso8601 (const gchar *text, GTimeZone *default_tz); extern GDateTime * g_date_time_new (GTimeZone *tz, gint year, gint month, gint day, gint hour, gint minute, gdouble seconds); extern GDateTime * g_date_time_new_local (gint year, gint month, gint day, gint hour, gint minute, gdouble seconds); extern GDateTime * g_date_time_new_utc (gint year, gint month, gint day, gint hour, gint minute, gdouble seconds); extern __attribute__((warn_unused_result)) GDateTime * g_date_time_add (GDateTime *datetime, GTimeSpan timespan); extern __attribute__((warn_unused_result)) GDateTime * g_date_time_add_years (GDateTime *datetime, gint years); extern __attribute__((warn_unused_result)) GDateTime * g_date_time_add_months (GDateTime *datetime, gint months); extern __attribute__((warn_unused_result)) GDateTime * g_date_time_add_weeks (GDateTime *datetime, gint weeks); extern __attribute__((warn_unused_result)) GDateTime * g_date_time_add_days (GDateTime *datetime, gint days); extern __attribute__((warn_unused_result)) GDateTime * g_date_time_add_hours (GDateTime *datetime, gint hours); extern __attribute__((warn_unused_result)) GDateTime * g_date_time_add_minutes (GDateTime *datetime, gint minutes); extern __attribute__((warn_unused_result)) GDateTime * g_date_time_add_seconds (GDateTime *datetime, gdouble seconds); extern __attribute__((warn_unused_result)) GDateTime * g_date_time_add_full (GDateTime *datetime, gint years, gint months, gint days, gint hours, gint minutes, gdouble seconds); extern gint g_date_time_compare (gconstpointer dt1, gconstpointer dt2); extern GTimeSpan g_date_time_difference (GDateTime *end, GDateTime *begin); extern guint g_date_time_hash (gconstpointer datetime); extern gboolean g_date_time_equal (gconstpointer dt1, gconstpointer dt2); extern void g_date_time_get_ymd (GDateTime *datetime, gint *year, gint *month, gint *day); extern gint g_date_time_get_year (GDateTime *datetime); extern gint g_date_time_get_month (GDateTime *datetime); extern gint g_date_time_get_day_of_month (GDateTime *datetime); extern gint g_date_time_get_week_numbering_year (GDateTime *datetime); extern gint g_date_time_get_week_of_year (GDateTime *datetime); extern gint g_date_time_get_day_of_week (GDateTime *datetime); extern gint g_date_time_get_day_of_year (GDateTime *datetime); extern gint g_date_time_get_hour (GDateTime *datetime); extern gint g_date_time_get_minute (GDateTime *datetime); extern gint g_date_time_get_second (GDateTime *datetime); extern gint g_date_time_get_microsecond (GDateTime *datetime); extern gdouble g_date_time_get_seconds (GDateTime *datetime); extern gint64 g_date_time_to_unix (GDateTime *datetime); extern gboolean g_date_time_to_timeval (GDateTime *datetime, GTimeVal *tv); extern GTimeSpan g_date_time_get_utc_offset (GDateTime *datetime); extern const gchar * g_date_time_get_timezone_abbreviation (GDateTime *datetime); extern gboolean g_date_time_is_daylight_savings (GDateTime *datetime); extern GDateTime * g_date_time_to_timezone (GDateTime *datetime, GTimeZone *tz); extern GDateTime * g_date_time_to_local (GDateTime *datetime); extern GDateTime * g_date_time_to_utc (GDateTime *datetime); extern gchar * g_date_time_format (GDateTime *datetime, const gchar *format) __attribute__((__malloc__)); # 45 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gdir.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * gdir.c: Simplified wrapper around the DIRENT functions. * * Copyright 2001 Hans Breuer * * 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 * License along with this library; if not, see . */ # 29 "/usr/include/glib-2.0/glib/gdir.h" # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 30 "/usr/include/glib-2.0/glib/gdir.h" 2 # 1 "/usr/include/dirent.h" 1 3 4 # 1 "/usr/include/dirent.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 5.1.2 Directory Operations */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/dirent.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 30 "/usr/include/dirent.h" 2 3 4 # 46 "/usr/include/dirent.h" 3 4 /* This file defines `struct dirent'. It defines the macro `_DIRENT_HAVE_D_NAMLEN' iff there is a `d_namlen' member that gives the length of `d_name'. It defines the macro `_DIRENT_HAVE_D_RECLEN' iff there is a `d_reclen' member that gives the size of the entire directory entry. It defines the macro `_DIRENT_HAVE_D_OFF' iff there is a `d_off' member that gives the file offset of the next directory entry. It defines the macro `_DIRENT_HAVE_D_TYPE' iff there is a `d_type' member that gives the type of the file. */ # 1 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 1 3 4 /* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ struct dirent { __ino_t d_ino; __off_t d_off; unsigned short int d_reclen; unsigned char d_type; char d_name[256]; /* We must not include limits.h! */ }; struct dirent64 { __ino64_t d_ino; __off64_t d_off; unsigned short int d_reclen; unsigned char d_type; char d_name[256]; /* We must not include limits.h! */ }; # 55 "/usr/include/x86_64-linux-gnu/bits/dirent.h" 3 4 /* Inform libc code that these two types are effectively identical. */ # 62 "/usr/include/dirent.h" 2 3 4 /* These macros extract size information from a `struct dirent *'. They may evaluate their argument multiple times, so it must not have side effects. Each of these may involve a relatively costly call to `strlen' on some systems, so these values should be cached. _D_EXACT_NAMLEN (DP) returns the length of DP->d_name, not including its terminating null character. _D_ALLOC_NAMLEN (DP) returns a size at least (_D_EXACT_NAMLEN (DP) + 1); that is, the allocation size needed to hold the DP->d_name string. Use this macro when you don't need the exact length, just an upper bound. This macro is less likely to require calling `strlen' than _D_EXACT_NAMLEN. */ # 96 "/usr/include/dirent.h" 3 4 /* File types for `d_type'. */ enum { DT_UNKNOWN = 0, DT_FIFO = 1, DT_CHR = 2, DT_DIR = 4, DT_BLK = 6, DT_REG = 8, DT_LNK = 10, DT_SOCK = 12, DT_WHT = 14 }; /* Convert between stat structure types and directory types. */ /* This is the data type of directory stream objects. The actual structure is opaque to users. */ typedef struct __dirstream DIR; /* Open a directory stream on NAME. Return a DIR stream on the directory, or NULL if it could not be opened. This function is a possible cancellation point and therefore not marked with __THROW. */ extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1))); /* Same as opendir, but open the stream on the file descriptor FD. This function is a possible cancellation point and therefore not marked with __THROW. */ extern DIR *fdopendir (int __fd); /* Close the directory stream DIRP. Return 0 if successful, -1 if not. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); /* Read a directory entry from DIRP. Return a pointer to a `struct dirent' describing the entry, or NULL for EOF or error. The storage returned may be overwritten by a later readdir call on the same DIR stream. If the Large File Support API is selected we have to use the appropriate interface. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); # 173 "/usr/include/dirent.h" 3 4 extern struct dirent64 *readdir64 (DIR *__dirp) __attribute__ ((__nonnull__ (1))); /* Reentrant version of `readdir'. Return in RESULT a pointer to the next entry. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int readdir_r (DIR *__restrict __dirp, struct dirent *__restrict __entry, struct dirent **__restrict __result) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__deprecated__)); # 201 "/usr/include/dirent.h" 3 4 extern int readdir64_r (DIR *__restrict __dirp, struct dirent64 *__restrict __entry, struct dirent64 **__restrict __result) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__deprecated__)); /* Rewind DIRP to the beginning of the directory. */ extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 213 "/usr/include/dirent.h" 2 3 4 /* Seek to position POS on DIRP. */ extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return the current position of DIRP. */ extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return the file descriptor used by DIRP. */ extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get the definitions of the POSIX.1 limits. */ # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.9.2 Minimum Values Added to * * Never include this file directly; use instead. */ # 234 "/usr/include/dirent.h" 2 3 4 /* `MAXNAMLEN' is the BSD name for what POSIX calls `NAME_MAX'. */ # 245 "/usr/include/dirent.h" 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 246 "/usr/include/dirent.h" 2 3 4 /* Scan the directory DIR, calling SELECTOR on each directory entry. Entries for which SELECT returns nonzero are individually malloc'd, sorted using qsort with CMP, and collected in a malloc'd array in *NAMELIST. Returns the number of entries selected, or -1 on error. This function is a cancellation point and therefore not marked with __THROW. */ extern int scandir (const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (const struct dirent *), int (*__cmp) (const struct dirent **, const struct dirent **)) __attribute__ ((__nonnull__ (1, 2))); # 276 "/usr/include/dirent.h" 3 4 /* This function is like `scandir' but it uses the 64bit dirent structure. Please note that the CMP function must now work with struct dirent64 **. */ extern int scandir64 (const char *__restrict __dir, struct dirent64 ***__restrict __namelist, int (*__selector) (const struct dirent64 *), int (*__cmp) (const struct dirent64 **, const struct dirent64 **)) __attribute__ ((__nonnull__ (1, 2))); /* Similar to `scandir' but a relative DIR name is interpreted relative to the directory for which DFD is a descriptor. This function is a cancellation point and therefore not marked with __THROW. */ extern int scandirat (int __dfd, const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (const struct dirent *), int (*__cmp) (const struct dirent **, const struct dirent **)) __attribute__ ((__nonnull__ (2, 3))); # 313 "/usr/include/dirent.h" 3 4 /* This function is like `scandir' but it uses the 64bit dirent structure. Please note that the CMP function must now work with struct dirent64 **. */ extern int scandirat64 (int __dfd, const char *__restrict __dir, struct dirent64 ***__restrict __namelist, int (*__selector) (const struct dirent64 *), int (*__cmp) (const struct dirent64 **, const struct dirent64 **)) __attribute__ ((__nonnull__ (2, 3))); /* Function to compare two `struct dirent's alphabetically. */ extern int alphasort (const struct dirent **__e1, const struct dirent **__e2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 340 "/usr/include/dirent.h" 3 4 extern int alphasort64 (const struct dirent64 **__e1, const struct dirent64 **__e2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Read directory entries from FD into BUF, reading at most NBYTES. Reading starts at offset *BASEP, and *BASEP is updated with the new position after reading. Returns the number of bytes read; zero when at end of directory; or -1 for errors. */ extern __ssize_t getdirentries (int __fd, char *__restrict __buf, size_t __nbytes, __off_t *__restrict __basep) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); # 370 "/usr/include/dirent.h" 3 4 extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, size_t __nbytes, __off64_t *__restrict __basep) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); /* Function to compare two `struct dirent's by name & version. */ extern int versionsort (const struct dirent **__e1, const struct dirent **__e2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 396 "/usr/include/dirent.h" 3 4 extern int versionsort64 (const struct dirent64 **__e1, const struct dirent64 **__e2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 33 "/usr/include/glib-2.0/glib/gdir.h" 2 # 37 "/usr/include/glib-2.0/glib/gdir.h" typedef struct _GDir GDir; extern GDir * g_dir_open (const gchar *path, guint flags, GError **error); extern const gchar * g_dir_read_name (GDir *dir); extern void g_dir_rewind (GDir *dir); extern void g_dir_close (GDir *dir); # 46 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/genviron.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/genviron.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/genviron.h" 2 extern const gchar * g_getenv (const gchar *variable); extern gboolean g_setenv (const gchar *variable, const gchar *value, gboolean overwrite); extern void g_unsetenv (const gchar *variable); extern gchar ** g_listenv (void); extern gchar ** g_get_environ (void); extern const gchar * g_environ_getenv (gchar **envp, const gchar *variable); extern gchar ** g_environ_setenv (gchar **envp, const gchar *variable, const gchar *value, gboolean overwrite) __attribute__((warn_unused_result)); extern gchar ** g_environ_unsetenv (gchar **envp, const gchar *variable) __attribute__((warn_unused_result)); # 47 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 48 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gfileutils.h" 1 /* gfileutils.h - File utility functions * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gfileutils.h" # 1 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" 1 /* glibconfig.h * * This is a generated file. Please modify 'configure.ac' */ # 27 "/usr/include/glib-2.0/glib/gfileutils.h" 2 # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 28 "/usr/include/glib-2.0/glib/gfileutils.h" 2 typedef enum { G_FILE_ERROR_EXIST, G_FILE_ERROR_ISDIR, G_FILE_ERROR_ACCES, G_FILE_ERROR_NAMETOOLONG, G_FILE_ERROR_NOENT, G_FILE_ERROR_NOTDIR, G_FILE_ERROR_NXIO, G_FILE_ERROR_NODEV, G_FILE_ERROR_ROFS, G_FILE_ERROR_TXTBSY, G_FILE_ERROR_FAULT, G_FILE_ERROR_LOOP, G_FILE_ERROR_NOSPC, G_FILE_ERROR_NOMEM, G_FILE_ERROR_MFILE, G_FILE_ERROR_NFILE, G_FILE_ERROR_BADF, G_FILE_ERROR_INVAL, G_FILE_ERROR_PIPE, G_FILE_ERROR_AGAIN, G_FILE_ERROR_INTR, G_FILE_ERROR_IO, G_FILE_ERROR_PERM, G_FILE_ERROR_NOSYS, G_FILE_ERROR_FAILED } GFileError; /* For backward-compat reasons, these are synced to an old * anonymous enum in libgnome. But don't use that enum * in new code. */ typedef enum { G_FILE_TEST_IS_REGULAR = 1 << 0, G_FILE_TEST_IS_SYMLINK = 1 << 1, G_FILE_TEST_IS_DIR = 1 << 2, G_FILE_TEST_IS_EXECUTABLE = 1 << 3, G_FILE_TEST_EXISTS = 1 << 4 } GFileTest; extern GQuark g_file_error_quark (void); /* So other code can generate a GFileError */ extern GFileError g_file_error_from_errno (gint err_no); extern gboolean g_file_test (const gchar *filename, GFileTest test); extern gboolean g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GError **error); extern gboolean g_file_set_contents (const gchar *filename, const gchar *contents, gssize length, GError **error); extern gchar *g_file_read_link (const gchar *filename, GError **error); /* Wrapper / workalike for mkdtemp() */ extern gchar *g_mkdtemp (gchar *tmpl); extern gchar *g_mkdtemp_full (gchar *tmpl, gint mode); /* Wrapper / workalike for mkstemp() */ extern gint g_mkstemp (gchar *tmpl); extern gint g_mkstemp_full (gchar *tmpl, gint flags, gint mode); /* Wrappers for g_mkstemp and g_mkdtemp() */ extern gint g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error); extern gchar *g_dir_make_tmp (const gchar *tmpl, GError **error); extern gchar *g_build_path (const gchar *separator, const gchar *first_element, ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); extern gchar *g_build_pathv (const gchar *separator, gchar **args) __attribute__((__malloc__)); extern gchar *g_build_filename (const gchar *first_element, ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); extern gchar *g_build_filenamev (gchar **args) __attribute__((__malloc__)); extern gchar *g_build_filename_valist (const gchar *first_element, va_list *args) __attribute__((__malloc__)); extern gint g_mkdir_with_parents (const gchar *pathname, gint mode); # 157 "/usr/include/glib-2.0/glib/gfileutils.h" extern gboolean g_path_is_absolute (const gchar *file_name); extern const gchar *g_path_skip_root (const gchar *file_name); __attribute__((__deprecated__("Use '" "g_path_get_basename" "' instead"))) extern const gchar *g_basename (const gchar *file_name); extern gchar *g_get_current_dir (void); extern gchar *g_path_get_basename (const gchar *file_name) __attribute__((__malloc__)); extern gchar *g_path_get_dirname (const gchar *file_name) __attribute__((__malloc__)); # 49 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/ggettext.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/ggettext.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/ggettext.h" 2 extern const gchar *g_strip_context (const gchar *msgid, const gchar *msgval) __attribute__((__format_arg__ (1))); extern const gchar *g_dgettext (const gchar *domain, const gchar *msgid) __attribute__((__format_arg__ (2))); extern const gchar *g_dcgettext (const gchar *domain, const gchar *msgid, gint category) __attribute__((__format_arg__ (2))); extern const gchar *g_dngettext (const gchar *domain, const gchar *msgid, const gchar *msgid_plural, gulong n) __attribute__((__format_arg__ (3))); extern const gchar *g_dpgettext (const gchar *domain, const gchar *msgctxtid, gsize msgidoffset) __attribute__((__format_arg__ (2))); extern const gchar *g_dpgettext2 (const gchar *domain, const gchar *context, const gchar *msgid) __attribute__((__format_arg__ (3))); # 50 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/ghash.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/ghash.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/ghash.h" 2 # 1 "/usr/include/glib-2.0/glib/glist.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/glist.h" # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gmem.h" # 1 "/usr/include/glib-2.0/glib/gutils.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gmem.h" 2 /** * GMemVTable: * @malloc: function to use for allocating memory. * @realloc: function to use for reallocating memory. * @free: function to use to free memory. * @calloc: function to use for allocating zero-filled memory. * @try_malloc: function to use for allocating memory without a default error handler. * @try_realloc: function to use for reallocating memory without a default error handler. * * A set of functions used to perform memory allocation. The same #GMemVTable must * be used for all allocations in the same program; a call to g_mem_set_vtable(), * if it exists, should be prior to any use of GLib. * * This functions related to this has been deprecated in 2.46, and no longer work. */ typedef struct _GMemVTable GMemVTable; # 67 "/usr/include/glib-2.0/glib/gmem.h" /* Memory allocation functions */ extern void g_free (gpointer mem); extern void g_clear_pointer (gpointer *pp, GDestroyNotify destroy); extern gpointer g_malloc (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); extern gpointer g_malloc0 (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); extern gpointer g_realloc (gpointer mem, gsize n_bytes) __attribute__((warn_unused_result)); extern gpointer g_try_malloc (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); extern gpointer g_try_malloc0 (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); extern gpointer g_try_realloc (gpointer mem, gsize n_bytes) __attribute__((warn_unused_result)); extern gpointer g_malloc_n (gsize n_blocks, gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); extern gpointer g_malloc0_n (gsize n_blocks, gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); extern gpointer g_realloc_n (gpointer mem, gsize n_blocks, gsize n_block_bytes) __attribute__((warn_unused_result)); extern gpointer g_try_malloc_n (gsize n_blocks, gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); extern gpointer g_try_malloc0_n (gsize n_blocks, gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); extern gpointer g_try_realloc_n (gpointer mem, gsize n_blocks, gsize n_block_bytes) __attribute__((warn_unused_result)); # 131 "/usr/include/glib-2.0/glib/gmem.h" /** * g_steal_pointer: * @pp: (not nullable): a pointer to a pointer * * Sets @pp to %NULL, returning the value that was there before. * * Conceptually, this transfers the ownership of the pointer from the * referenced variable to the "caller" of the macro (ie: "steals" the * reference). * * The return value will be properly typed, according to the type of * @pp. * * This can be very useful when combined with g_autoptr() to prevent the * return value of a function from being automatically freed. Consider * the following example (which only works on GCC and clang): * * |[ * GObject * * create_object (void) * { * g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); * * if (early_error_case) * return NULL; * * return g_steal_pointer (&obj); * } * ]| * * It can also be used in similar ways for 'out' parameters and is * particularly useful for dealing with optional out parameters: * * |[ * gboolean * get_object (GObject **obj_out) * { * g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); * * if (early_error_case) * return FALSE; * * if (obj_out) * *obj_out = g_steal_pointer (&obj); * * return TRUE; * } * ]| * * In the above example, the object will be automatically freed in the * early error case and also in the case that %NULL was given for * @obj_out. * * Since: 2.44 */ static inline gpointer g_steal_pointer (gpointer pp) { gpointer *ptr = (gpointer *) pp; gpointer ref; ref = *ptr; *ptr = # 193 "/usr/include/glib-2.0/glib/gmem.h" 3 4 ((void *)0) # 193 "/usr/include/glib-2.0/glib/gmem.h" ; return ref; } /* type safety */ /* Optimise: avoid the call to the (slower) _n function if we can * determine at compile-time that no overflow happens. */ # 237 "/usr/include/glib-2.0/glib/gmem.h" /* Unoptimised version: always call the _n() function. */ # 246 "/usr/include/glib-2.0/glib/gmem.h" /** * g_new: * @struct_type: the type of the elements to allocate * @n_structs: the number of elements to allocate * * Allocates @n_structs elements of type @struct_type. * The returned pointer is cast to a pointer to the given type. * If @n_structs is 0 it returns %NULL. * Care is taken to avoid overflow when calculating the size of the allocated block. * * Since the returned pointer is already casted to the right type, * it is normally unnecessary to cast it explicitly, and doing * so might hide memory allocation errors. * * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type */ /** * g_new0: * @struct_type: the type of the elements to allocate. * @n_structs: the number of elements to allocate. * * Allocates @n_structs elements of type @struct_type, initialized to 0's. * The returned pointer is cast to a pointer to the given type. * If @n_structs is 0 it returns %NULL. * Care is taken to avoid overflow when calculating the size of the allocated block. * * Since the returned pointer is already casted to the right type, * it is normally unnecessary to cast it explicitly, and doing * so might hide memory allocation errors. * * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type. */ /** * g_renew: * @struct_type: the type of the elements to allocate * @mem: the currently allocated memory * @n_structs: the number of elements to allocate * * Reallocates the memory pointed to by @mem, so that it now has space for * @n_structs elements of type @struct_type. It returns the new address of * the memory, which may have been moved. * Care is taken to avoid overflow when calculating the size of the allocated block. * * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type */ /** * g_try_new: * @struct_type: the type of the elements to allocate * @n_structs: the number of elements to allocate * * Attempts to allocate @n_structs elements of type @struct_type, and returns * %NULL on failure. Contrast with g_new(), which aborts the program on failure. * The returned pointer is cast to a pointer to the given type. * The function returns %NULL when @n_structs is 0 of if an overflow occurs. * * Since: 2.8 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type */ /** * g_try_new0: * @struct_type: the type of the elements to allocate * @n_structs: the number of elements to allocate * * Attempts to allocate @n_structs elements of type @struct_type, initialized * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts * the program on failure. * The returned pointer is cast to a pointer to the given type. * The function returns %NULL when @n_structs is 0 or if an overflow occurs. * * Since: 2.8 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type */ /** * g_try_renew: * @struct_type: the type of the elements to allocate * @mem: the currently allocated memory * @n_structs: the number of elements to allocate * * Attempts to reallocate the memory pointed to by @mem, so that it now has * space for @n_structs elements of type @struct_type, and returns %NULL on * failure. Contrast with g_renew(), which aborts the program on failure. * It returns the new address of the memory, which may have been moved. * The function returns %NULL if an overflow occurs. * * Since: 2.8 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type */ /* Memory allocation virtualization for debugging purposes * g_mem_set_vtable() has to be the very first GLib function called * if being used */ struct _GMemVTable { gpointer (*malloc) (gsize n_bytes); gpointer (*realloc) (gpointer mem, gsize n_bytes); void (*free) (gpointer mem); /* optional; set to NULL if not used ! */ gpointer (*calloc) (gsize n_blocks, gsize n_block_bytes); gpointer (*try_malloc) (gsize n_bytes); gpointer (*try_realloc) (gpointer mem, gsize n_bytes); }; __attribute__((__deprecated__)) extern void g_mem_set_vtable (GMemVTable *vtable); __attribute__((__deprecated__)) extern gboolean g_mem_is_system_malloc (void); extern gboolean g_mem_gc_friendly; /* Memory profiler and checker, has to be enabled via g_mem_set_vtable() */ extern GMemVTable *glib_mem_profiler_table; __attribute__((__deprecated__)) extern void g_mem_profile (void); # 33 "/usr/include/glib-2.0/glib/glist.h" 2 # 1 "/usr/include/glib-2.0/glib/gnode.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gnode.h" # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gnode.h" 2 typedef struct _GNode GNode; /* Tree traverse flags */ typedef enum { G_TRAVERSE_LEAVES = 1 << 0, G_TRAVERSE_NON_LEAVES = 1 << 1, G_TRAVERSE_ALL = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES, G_TRAVERSE_MASK = 0x03, G_TRAVERSE_LEAFS = G_TRAVERSE_LEAVES, G_TRAVERSE_NON_LEAFS = G_TRAVERSE_NON_LEAVES } GTraverseFlags; /* Tree traverse orders */ typedef enum { G_IN_ORDER, G_PRE_ORDER, G_POST_ORDER, G_LEVEL_ORDER } GTraverseType; typedef gboolean (*GNodeTraverseFunc) (GNode *node, gpointer data); typedef void (*GNodeForeachFunc) (GNode *node, gpointer data); /** * GCopyFunc: * @src: (not nullable): A pointer to the data which should be copied * @data: Additional data * * A function of this signature is used to copy the node data * when doing a deep-copy of a tree. * * Returns: (not nullable): A pointer to the copy * * Since: 2.4 */ typedef gpointer (*GCopyFunc) (gconstpointer src, gpointer data); /* N-way tree implementation */ struct _GNode { gpointer data; GNode *next; GNode *prev; GNode *parent; GNode *children; }; /** * G_NODE_IS_ROOT: * @node: a #GNode * * Returns %TRUE if a #GNode is the root of a tree. * * Returns: %TRUE if the #GNode is the root of a tree * (i.e. it has no parent or siblings) */ /** * G_NODE_IS_LEAF: * @node: a #GNode * * Returns %TRUE if a #GNode is a leaf node. * * Returns: %TRUE if the #GNode is a leaf node * (i.e. it has no children) */ extern GNode* g_node_new (gpointer data); extern void g_node_destroy (GNode *root); extern void g_node_unlink (GNode *node); extern GNode* g_node_copy_deep (GNode *node, GCopyFunc copy_func, gpointer data); extern GNode* g_node_copy (GNode *node); extern GNode* g_node_insert (GNode *parent, gint position, GNode *node); extern GNode* g_node_insert_before (GNode *parent, GNode *sibling, GNode *node); extern GNode* g_node_insert_after (GNode *parent, GNode *sibling, GNode *node); extern GNode* g_node_prepend (GNode *parent, GNode *node); extern guint g_node_n_nodes (GNode *root, GTraverseFlags flags); extern GNode* g_node_get_root (GNode *node); extern gboolean g_node_is_ancestor (GNode *node, GNode *descendant); extern guint g_node_depth (GNode *node); extern GNode* g_node_find (GNode *root, GTraverseType order, GTraverseFlags flags, gpointer data); /* convenience macros */ /** * g_node_append: * @parent: the #GNode to place the new #GNode under * @node: the #GNode to insert * * Inserts a #GNode as the last child of the given parent. * * Returns: the inserted #GNode */ /** * g_node_insert_data: * @parent: the #GNode to place the new #GNode under * @position: the position to place the new #GNode at. If position is -1, * the new #GNode is inserted as the last child of @parent * @data: the data for the new #GNode * * Inserts a new #GNode at the given position. * * Returns: the new #GNode */ /** * g_node_insert_data_after: * @parent: the #GNode to place the new #GNode under * @sibling: the sibling #GNode to place the new #GNode after * @data: the data for the new #GNode * * Inserts a new #GNode after the given sibling. * * Returns: the new #GNode */ /** * g_node_insert_data_before: * @parent: the #GNode to place the new #GNode under * @sibling: the sibling #GNode to place the new #GNode before * @data: the data for the new #GNode * * Inserts a new #GNode before the given sibling. * * Returns: the new #GNode */ /** * g_node_prepend_data: * @parent: the #GNode to place the new #GNode under * @data: the data for the new #GNode * * Inserts a new #GNode as the first child of the given parent. * * Returns: the new #GNode */ /** * g_node_append_data: * @parent: the #GNode to place the new #GNode under * @data: the data for the new #GNode * * Inserts a new #GNode as the last child of the given parent. * * Returns: the new #GNode */ /* traversal function, assumes that 'node' is root * (only traverses 'node' and its subtree). * this function is just a high level interface to * low level traversal functions, optimized for speed. */ extern void g_node_traverse (GNode *root, GTraverseType order, GTraverseFlags flags, gint max_depth, GNodeTraverseFunc func, gpointer data); /* return the maximum tree height starting with 'node', this is an expensive * operation, since we need to visit all nodes. this could be shortened by * adding 'guint height' to struct _GNode, but then again, this is not very * often needed, and would make g_node_insert() more time consuming. */ extern guint g_node_max_height (GNode *root); extern void g_node_children_foreach (GNode *node, GTraverseFlags flags, GNodeForeachFunc func, gpointer data); extern void g_node_reverse_children (GNode *node); extern guint g_node_n_children (GNode *node); extern GNode* g_node_nth_child (GNode *node, guint n); extern GNode* g_node_last_child (GNode *node); extern GNode* g_node_find_child (GNode *node, GTraverseFlags flags, gpointer data); extern gint g_node_child_position (GNode *node, GNode *child); extern gint g_node_child_index (GNode *node, gpointer data); extern GNode* g_node_first_sibling (GNode *node); extern GNode* g_node_last_sibling (GNode *node); /** * g_node_prev_sibling: * @node: a #GNode * * Gets the previous sibling of a #GNode. * * Returns: the previous sibling of @node, or %NULL if @node is the first * node or %NULL */ /** * g_node_next_sibling: * @node: a #GNode * * Gets the next sibling of a #GNode. * * Returns: the next sibling of @node, or %NULL if @node is the last node * or %NULL */ /** * g_node_first_child: * @node: a #GNode * * Gets the first child of a #GNode. * * Returns: the first child of @node, or %NULL if @node is %NULL * or has no children */ # 34 "/usr/include/glib-2.0/glib/glist.h" 2 typedef struct _GList GList; struct _GList { gpointer data; GList *next; GList *prev; }; /* Doubly linked lists */ extern GList* g_list_alloc (void) __attribute__((warn_unused_result)); extern void g_list_free (GList *list); extern void g_list_free_1 (GList *list); extern void g_list_free_full (GList *list, GDestroyNotify free_func); extern GList* g_list_append (GList *list, gpointer data) __attribute__((warn_unused_result)); extern GList* g_list_prepend (GList *list, gpointer data) __attribute__((warn_unused_result)); extern GList* g_list_insert (GList *list, gpointer data, gint position) __attribute__((warn_unused_result)); extern GList* g_list_insert_sorted (GList *list, gpointer data, GCompareFunc func) __attribute__((warn_unused_result)); extern GList* g_list_insert_sorted_with_data (GList *list, gpointer data, GCompareDataFunc func, gpointer user_data) __attribute__((warn_unused_result)); extern GList* g_list_insert_before (GList *list, GList *sibling, gpointer data) __attribute__((warn_unused_result)); extern GList* g_list_concat (GList *list1, GList *list2) __attribute__((warn_unused_result)); extern GList* g_list_remove (GList *list, gconstpointer data) __attribute__((warn_unused_result)); extern GList* g_list_remove_all (GList *list, gconstpointer data) __attribute__((warn_unused_result)); extern GList* g_list_remove_link (GList *list, GList *llink) __attribute__((warn_unused_result)); extern GList* g_list_delete_link (GList *list, GList *link_) __attribute__((warn_unused_result)); extern GList* g_list_reverse (GList *list) __attribute__((warn_unused_result)); extern GList* g_list_copy (GList *list) __attribute__((warn_unused_result)); extern GList* g_list_copy_deep (GList *list, GCopyFunc func, gpointer user_data) __attribute__((warn_unused_result)); extern GList* g_list_nth (GList *list, guint n); extern GList* g_list_nth_prev (GList *list, guint n); extern GList* g_list_find (GList *list, gconstpointer data); extern GList* g_list_find_custom (GList *list, gconstpointer data, GCompareFunc func); extern gint g_list_position (GList *list, GList *llink); extern gint g_list_index (GList *list, gconstpointer data); extern GList* g_list_last (GList *list); extern GList* g_list_first (GList *list); extern guint g_list_length (GList *list); extern void g_list_foreach (GList *list, GFunc func, gpointer user_data); extern GList* g_list_sort (GList *list, GCompareFunc compare_func) __attribute__((warn_unused_result)); extern GList* g_list_sort_with_data (GList *list, GCompareDataFunc compare_func, gpointer user_data) __attribute__((warn_unused_result)); extern gpointer g_list_nth_data (GList *list, guint n); # 34 "/usr/include/glib-2.0/glib/ghash.h" 2 typedef struct _GHashTable GHashTable; typedef gboolean (*GHRFunc) (gpointer key, gpointer value, gpointer user_data); typedef struct _GHashTableIter GHashTableIter; struct _GHashTableIter { /*< private >*/ gpointer dummy1; gpointer dummy2; gpointer dummy3; int dummy4; gboolean dummy5; gpointer dummy6; }; extern GHashTable* g_hash_table_new (GHashFunc hash_func, GEqualFunc key_equal_func); extern GHashTable* g_hash_table_new_full (GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func); extern void g_hash_table_destroy (GHashTable *hash_table); extern gboolean g_hash_table_insert (GHashTable *hash_table, gpointer key, gpointer value); extern gboolean g_hash_table_replace (GHashTable *hash_table, gpointer key, gpointer value); extern gboolean g_hash_table_add (GHashTable *hash_table, gpointer key); extern gboolean g_hash_table_remove (GHashTable *hash_table, gconstpointer key); extern void g_hash_table_remove_all (GHashTable *hash_table); extern gboolean g_hash_table_steal (GHashTable *hash_table, gconstpointer key); extern void g_hash_table_steal_all (GHashTable *hash_table); extern gpointer g_hash_table_lookup (GHashTable *hash_table, gconstpointer key); extern gboolean g_hash_table_contains (GHashTable *hash_table, gconstpointer key); extern gboolean g_hash_table_lookup_extended (GHashTable *hash_table, gconstpointer lookup_key, gpointer *orig_key, gpointer *value); extern void g_hash_table_foreach (GHashTable *hash_table, GHFunc func, gpointer user_data); extern gpointer g_hash_table_find (GHashTable *hash_table, GHRFunc predicate, gpointer user_data); extern guint g_hash_table_foreach_remove (GHashTable *hash_table, GHRFunc func, gpointer user_data); extern guint g_hash_table_foreach_steal (GHashTable *hash_table, GHRFunc func, gpointer user_data); extern guint g_hash_table_size (GHashTable *hash_table); extern GList * g_hash_table_get_keys (GHashTable *hash_table); extern GList * g_hash_table_get_values (GHashTable *hash_table); extern gpointer * g_hash_table_get_keys_as_array (GHashTable *hash_table, guint *length); extern void g_hash_table_iter_init (GHashTableIter *iter, GHashTable *hash_table); extern gboolean g_hash_table_iter_next (GHashTableIter *iter, gpointer *key, gpointer *value); extern GHashTable* g_hash_table_iter_get_hash_table (GHashTableIter *iter); extern void g_hash_table_iter_remove (GHashTableIter *iter); extern void g_hash_table_iter_replace (GHashTableIter *iter, gpointer value); extern void g_hash_table_iter_steal (GHashTableIter *iter); extern GHashTable* g_hash_table_ref (GHashTable *hash_table); extern void g_hash_table_unref (GHashTable *hash_table); /* Hash Functions */ extern gboolean g_str_equal (gconstpointer v1, gconstpointer v2); extern guint g_str_hash (gconstpointer v); extern gboolean g_int_equal (gconstpointer v1, gconstpointer v2); extern guint g_int_hash (gconstpointer v); extern gboolean g_int64_equal (gconstpointer v1, gconstpointer v2); extern guint g_int64_hash (gconstpointer v); extern gboolean g_double_equal (gconstpointer v1, gconstpointer v2); extern guint g_double_hash (gconstpointer v); extern guint g_direct_hash (gconstpointer v) __attribute__((__const__)); extern gboolean g_direct_equal (gconstpointer v1, gconstpointer v2) __attribute__((__const__)); # 51 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/ghmac.h" 1 /* ghmac.h - secure data hashing * * Copyright (C) 2011 Stef Walter * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/ghmac.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 27 "/usr/include/glib-2.0/glib/ghmac.h" 2 # 1 "/usr/include/glib-2.0/glib/gchecksum.h" 1 /* gchecksum.h - data hashing functions * * Copyright (C) 2007 Emmanuele Bassi * * 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 License * along with this library; if not, see . */ # 28 "/usr/include/glib-2.0/glib/ghmac.h" 2 /** * GHmac: * * An opaque structure representing a HMAC operation. * To create a new GHmac, use g_hmac_new(). To free * a GHmac, use g_hmac_unref(). * * Since: 2.30 */ typedef struct _GHmac GHmac; extern GHmac * g_hmac_new (GChecksumType digest_type, const guchar *key, gsize key_len); extern GHmac * g_hmac_copy (const GHmac *hmac); extern GHmac * g_hmac_ref (GHmac *hmac); extern void g_hmac_unref (GHmac *hmac); extern void g_hmac_update (GHmac *hmac, const guchar *data, gssize length); extern const gchar * g_hmac_get_string (GHmac *hmac); extern void g_hmac_get_digest (GHmac *hmac, guint8 *buffer, gsize *digest_len); extern gchar *g_compute_hmac_for_data (GChecksumType digest_type, const guchar *key, gsize key_len, const guchar *data, gsize length); extern gchar *g_compute_hmac_for_string (GChecksumType digest_type, const guchar *key, gsize key_len, const gchar *str, gssize length); extern gchar *g_compute_hmac_for_bytes (GChecksumType digest_type, GBytes *key, GBytes *data); # 52 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/ghook.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/ghook.h" # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/ghook.h" 2 /* --- typedefs --- */ typedef struct _GHook GHook; typedef struct _GHookList GHookList; typedef gint (*GHookCompareFunc) (GHook *new_hook, GHook *sibling); typedef gboolean (*GHookFindFunc) (GHook *hook, gpointer data); typedef void (*GHookMarshaller) (GHook *hook, gpointer marshal_data); typedef gboolean (*GHookCheckMarshaller) (GHook *hook, gpointer marshal_data); typedef void (*GHookFunc) (gpointer data); typedef gboolean (*GHookCheckFunc) (gpointer data); typedef void (*GHookFinalizeFunc) (GHookList *hook_list, GHook *hook); typedef enum { G_HOOK_FLAG_ACTIVE = 1 << 0, G_HOOK_FLAG_IN_CALL = 1 << 1, G_HOOK_FLAG_MASK = 0x0f } GHookFlagMask; /* --- structures --- */ struct _GHookList { gulong seq_id; guint hook_size : 16; guint is_setup : 1; GHook *hooks; gpointer dummy3; GHookFinalizeFunc finalize_hook; gpointer dummy[2]; }; struct _GHook { gpointer data; GHook *next; GHook *prev; guint ref_count; gulong hook_id; guint flags; gpointer func; GDestroyNotify destroy; }; /* --- macros --- */ # 102 "/usr/include/glib-2.0/glib/ghook.h" /* --- prototypes --- */ /* callback maintenance functions */ extern void g_hook_list_init (GHookList *hook_list, guint hook_size); extern void g_hook_list_clear (GHookList *hook_list); extern GHook* g_hook_alloc (GHookList *hook_list); extern void g_hook_free (GHookList *hook_list, GHook *hook); extern GHook * g_hook_ref (GHookList *hook_list, GHook *hook); extern void g_hook_unref (GHookList *hook_list, GHook *hook); extern gboolean g_hook_destroy (GHookList *hook_list, gulong hook_id); extern void g_hook_destroy_link (GHookList *hook_list, GHook *hook); extern void g_hook_prepend (GHookList *hook_list, GHook *hook); extern void g_hook_insert_before (GHookList *hook_list, GHook *sibling, GHook *hook); extern void g_hook_insert_sorted (GHookList *hook_list, GHook *hook, GHookCompareFunc func); extern GHook* g_hook_get (GHookList *hook_list, gulong hook_id); extern GHook* g_hook_find (GHookList *hook_list, gboolean need_valids, GHookFindFunc func, gpointer data); extern GHook* g_hook_find_data (GHookList *hook_list, gboolean need_valids, gpointer data); extern GHook* g_hook_find_func (GHookList *hook_list, gboolean need_valids, gpointer func); extern GHook* g_hook_find_func_data (GHookList *hook_list, gboolean need_valids, gpointer func, gpointer data); /* return the first valid hook, and increment its reference count */ extern GHook* g_hook_first_valid (GHookList *hook_list, gboolean may_be_in_call); /* return the next valid hook with incremented reference count, and * decrement the reference count of the original hook */ extern GHook* g_hook_next_valid (GHookList *hook_list, GHook *hook, gboolean may_be_in_call); /* GHookCompareFunc implementation to insert hooks sorted by their id */ extern gint g_hook_compare_ids (GHook *new_hook, GHook *sibling); /* convenience macros */ /* invoke all valid hooks with the (*GHookFunc) signature. */ extern void g_hook_list_invoke (GHookList *hook_list, gboolean may_recurse); /* invoke all valid hooks with the (*GHookCheckFunc) signature, * and destroy the hook if FALSE is returned. */ extern void g_hook_list_invoke_check (GHookList *hook_list, gboolean may_recurse); /* invoke a marshaller on all valid hooks. */ extern void g_hook_list_marshal (GHookList *hook_list, gboolean may_recurse, GHookMarshaller marshaller, gpointer marshal_data); extern void g_hook_list_marshal_check (GHookList *hook_list, gboolean may_recurse, GHookCheckMarshaller marshaller, gpointer marshal_data); # 53 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/ghostutils.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 2008 Red Hat, Inc. * * 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 License along with this library; if not, see . */ # 25 "/usr/include/glib-2.0/glib/ghostutils.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 26 "/usr/include/glib-2.0/glib/ghostutils.h" 2 extern gboolean g_hostname_is_non_ascii (const gchar *hostname); extern gboolean g_hostname_is_ascii_encoded (const gchar *hostname); extern gboolean g_hostname_is_ip_address (const gchar *hostname); extern gchar *g_hostname_to_ascii (const gchar *hostname); extern gchar *g_hostname_to_unicode (const gchar *hostname); # 54 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/giochannel.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/giochannel.h" # 1 "/usr/include/glib-2.0/glib/gconvert.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/giochannel.h" 2 # 1 "/usr/include/glib-2.0/glib/gmain.h" 1 /* gmain.h - the GLib Main loop * Copyright (C) 1998-2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 25 "/usr/include/glib-2.0/glib/gmain.h" # 1 "/usr/include/glib-2.0/glib/gpoll.h" 1 /* gpoll.h - poll(2) support * Copyright (C) 2008 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 25 "/usr/include/glib-2.0/glib/gpoll.h" # 1 "/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h" 1 /* glibconfig.h * * This is a generated file. Please modify 'configure.ac' */ # 26 "/usr/include/glib-2.0/glib/gpoll.h" 2 # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 27 "/usr/include/glib-2.0/glib/gpoll.h" 2 /* Any definitions using GPollFD or GPollFunc are primarily * for Unix and not guaranteed to be the compatible on all * operating systems on which GLib runs. Right now, the * GLib does use these functions on Win32 as well, but interprets * them in a fairly different way than on Unix. If you use * these definitions, you are should be prepared to recode * for different operating systems. * * Note that on systems with a working poll(2), that function is used * in place of g_poll(). Thus g_poll() must have the same signature as * poll(), meaning GPollFD must have the same layout as struct pollfd. * * On Win32, the fd in a GPollFD should be Win32 HANDLE (*not* a file * descriptor as provided by the C runtime) that can be used by * MsgWaitForMultipleObjects. This does *not* include file handles * from CreateFile, SOCKETs, nor pipe handles. (But you can use * WSAEventSelect to signal events when a SOCKET is readable). * * On Win32, fd can also be the special value G_WIN32_MSG_HANDLE to * indicate polling for messages. * * But note that G_WIN32_MSG_HANDLE GPollFDs should not be used by GDK * (GTK) programs, as GDK itself wants to read messages and convert them * to GDK events. * * So, unless you really know what you are doing, it's best not to try * to use the main loop polling stuff for your own needs on * Windows. */ typedef struct _GPollFD GPollFD; /** * GPollFunc: * @ufds: an array of #GPollFD elements * @nfsd: the number of elements in @ufds * @timeout_: the maximum time to wait for an event of the file descriptors. * A negative value indicates an infinite timeout. * * Specifies the type of function passed to g_main_context_set_poll_func(). * The semantics of the function should match those of the poll() system call. * * Returns: the number of #GPollFD elements which have events or errors * reported, or -1 if an error occurred. */ typedef gint (*GPollFunc) (GPollFD *ufds, guint nfsd, gint timeout_); /** * GPollFD: * @fd: the file descriptor to poll (or a HANDLE on Win32) * @events: a bitwise combination from #GIOCondition, specifying which * events should be polled for. Typically for reading from a file * descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and * for writing you would use %G_IO_OUT | %G_IO_ERR. * @revents: a bitwise combination of flags from #GIOCondition, returned * from the poll() function to indicate which events occurred. * * Represents a file descriptor, which events to poll for, and which events * occurred. */ struct _GPollFD { gint fd; gushort events; gushort revents; }; /** * G_POLLFD_FORMAT: * * A format specifier that can be used in printf()-style format strings * when printing the @fd member of a #GPollFD. */ /* defined in glibconfig.h */ extern gint g_poll (GPollFD *fds, guint nfds, gint timeout); # 26 "/usr/include/glib-2.0/glib/gmain.h" 2 # 1 "/usr/include/glib-2.0/glib/gslist.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gslist.h" # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gslist.h" 2 # 1 "/usr/include/glib-2.0/glib/gnode.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 34 "/usr/include/glib-2.0/glib/gslist.h" 2 typedef struct _GSList GSList; struct _GSList { gpointer data; GSList *next; }; /* Singly linked lists */ extern GSList* g_slist_alloc (void) __attribute__((warn_unused_result)); extern void g_slist_free (GSList *list); extern void g_slist_free_1 (GSList *list); extern void g_slist_free_full (GSList *list, GDestroyNotify free_func); extern GSList* g_slist_append (GSList *list, gpointer data) __attribute__((warn_unused_result)); extern GSList* g_slist_prepend (GSList *list, gpointer data) __attribute__((warn_unused_result)); extern GSList* g_slist_insert (GSList *list, gpointer data, gint position) __attribute__((warn_unused_result)); extern GSList* g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func) __attribute__((warn_unused_result)); extern GSList* g_slist_insert_sorted_with_data (GSList *list, gpointer data, GCompareDataFunc func, gpointer user_data) __attribute__((warn_unused_result)); extern GSList* g_slist_insert_before (GSList *slist, GSList *sibling, gpointer data) __attribute__((warn_unused_result)); extern GSList* g_slist_concat (GSList *list1, GSList *list2) __attribute__((warn_unused_result)); extern GSList* g_slist_remove (GSList *list, gconstpointer data) __attribute__((warn_unused_result)); extern GSList* g_slist_remove_all (GSList *list, gconstpointer data) __attribute__((warn_unused_result)); extern GSList* g_slist_remove_link (GSList *list, GSList *link_) __attribute__((warn_unused_result)); extern GSList* g_slist_delete_link (GSList *list, GSList *link_) __attribute__((warn_unused_result)); extern GSList* g_slist_reverse (GSList *list) __attribute__((warn_unused_result)); extern GSList* g_slist_copy (GSList *list) __attribute__((warn_unused_result)); extern GSList* g_slist_copy_deep (GSList *list, GCopyFunc func, gpointer user_data) __attribute__((warn_unused_result)); extern GSList* g_slist_nth (GSList *list, guint n); extern GSList* g_slist_find (GSList *list, gconstpointer data); extern GSList* g_slist_find_custom (GSList *list, gconstpointer data, GCompareFunc func); extern gint g_slist_position (GSList *list, GSList *llink); extern gint g_slist_index (GSList *list, gconstpointer data); extern GSList* g_slist_last (GSList *list); extern guint g_slist_length (GSList *list); extern void g_slist_foreach (GSList *list, GFunc func, gpointer user_data); extern GSList* g_slist_sort (GSList *list, GCompareFunc compare_func) __attribute__((warn_unused_result)); extern GSList* g_slist_sort_with_data (GSList *list, GCompareDataFunc compare_func, gpointer user_data) __attribute__((warn_unused_result)); extern gpointer g_slist_nth_data (GSList *list, guint n); # 27 "/usr/include/glib-2.0/glib/gmain.h" 2 # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 28 "/usr/include/glib-2.0/glib/gmain.h" 2 typedef enum /*< flags >*/ { G_IO_IN =1, G_IO_OUT =4, G_IO_PRI =2, G_IO_ERR =8, G_IO_HUP =16, G_IO_NVAL =32 } GIOCondition; /** * GMainContext: * * The `GMainContext` struct is an opaque data * type representing a set of sources to be handled in a main loop. */ typedef struct _GMainContext GMainContext; /** * GMainLoop: * * The `GMainLoop` struct is an opaque data type * representing the main event loop of a GLib or GTK+ application. */ typedef struct _GMainLoop GMainLoop; /** * GSource: * * The `GSource` struct is an opaque data type * representing an event source. */ typedef struct _GSource GSource; typedef struct _GSourcePrivate GSourcePrivate; /** * GSourceCallbackFuncs: * @ref: Called when a reference is added to the callback object * @unref: Called when a reference to the callback object is dropped * @get: Called to extract the callback function and data from the * callback object. * * The `GSourceCallbackFuncs` struct contains * functions for managing callback objects. */ typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs; /** * GSourceFuncs: * @prepare: Called before all the file descriptors are polled. If the * source can determine that it is ready here (without waiting for the * results of the poll() call) it should return %TRUE. It can also return * a @timeout_ value which should be the maximum timeout (in milliseconds) * which should be passed to the poll() call. The actual timeout used will * be -1 if all sources returned -1, or it will be the minimum of all * the @timeout_ values returned which were >= 0. Since 2.36 this may * be %NULL, in which case the effect is as if the function always returns * %FALSE with a timeout of -1. If @prepare returns a * timeout and the source also has a ready time set, then the * lower of the two will be used. * @check: Called after all the file descriptors are polled. The source * should return %TRUE if it is ready to be dispatched. Note that some * time may have passed since the previous prepare function was called, * so the source should be checked again here. Since 2.36 this may * be %NULL, in which case the effect is as if the function always returns * %FALSE. * @dispatch: Called to dispatch the event source, after it has returned * %TRUE in either its @prepare or its @check function, or if a ready time * has been reached. The @dispatch function receives a callback function and * user data. The callback function may be %NULL if the source was never * connected to a callback using g_source_set_callback(). The @dispatch * function should call the callback function with @user_data and whatever * additional parameters are needed for this type of event source. The * return value of the @dispatch function should be #G_SOURCE_REMOVE if the * source should be removed or #G_SOURCE_CONTINUE to keep it. * @finalize: Called when the source is finalized. At this point, the source * will have been destroyed, had its callback cleared, and have been removed * from its #GMainContext, but it will still have its final reference count, * so methods can be called on it from within this function. * * The `GSourceFuncs` struct contains a table of * functions used to handle event sources in a generic manner. * * For idle sources, the prepare and check functions always return %TRUE * to indicate that the source is always ready to be processed. The prepare * function also returns a timeout value of 0 to ensure that the poll() call * doesn't block (since that would be time wasted which could have been spent * running the idle function). * * For timeout sources, the prepare and check functions both return %TRUE * if the timeout interval has expired. The prepare function also returns * a timeout value to ensure that the poll() call doesn't block too long * and miss the next timeout. * * For file descriptor sources, the prepare function typically returns %FALSE, * since it must wait until poll() has been called before it knows whether * any events need to be processed. It sets the returned timeout to -1 to * indicate that it doesn't mind how long the poll() call blocks. In the * check function, it tests the results of the poll() call to see if the * required condition has been met, and returns %TRUE if so. */ typedef struct _GSourceFuncs GSourceFuncs; /** * GPid: * * A type which is used to hold a process identification. * * On UNIX, processes are identified by a process id (an integer), * while Windows uses process handles (which are pointers). * * GPid is used in GLib only for descendant processes spawned with * the g_spawn functions. */ /* defined in glibconfig.h */ /** * G_PID_FORMAT: * * A format specifier that can be used in printf()-style format strings * when printing a #GPid. * * Since: 2.50 */ /* defined in glibconfig.h */ /** * GSourceFunc: * @user_data: data passed to the function, set when the source was * created with one of the above functions * * Specifies the type of function passed to g_timeout_add(), * g_timeout_add_full(), g_idle_add(), and g_idle_add_full(). * * Returns: %FALSE if the source should be removed. #G_SOURCE_CONTINUE and * #G_SOURCE_REMOVE are more memorable names for the return value. */ typedef gboolean (*GSourceFunc) (gpointer user_data); /** * GChildWatchFunc: * @pid: the process id of the child process * @status: Status information about the child process, encoded * in a platform-specific manner * @user_data: user data passed to g_child_watch_add() * * Prototype of a #GChildWatchSource callback, called when a child * process has exited. To interpret @status, see the documentation * for g_spawn_check_exit_status(). */ typedef void (*GChildWatchFunc) (GPid pid, gint status, gpointer user_data); struct _GSource { /*< private >*/ gpointer callback_data; GSourceCallbackFuncs *callback_funcs; const GSourceFuncs *source_funcs; guint ref_count; GMainContext *context; gint priority; guint flags; guint source_id; GSList *poll_fds; GSource *prev; GSource *next; char *name; GSourcePrivate *priv; }; struct _GSourceCallbackFuncs { void (*ref) (gpointer cb_data); void (*unref) (gpointer cb_data); void (*get) (gpointer cb_data, GSource *source, GSourceFunc *func, gpointer *data); }; /** * GSourceDummyMarshal: * * This is just a placeholder for #GClosureMarshal, * which cannot be used here for dependency reasons. */ typedef void (*GSourceDummyMarshal) (void); struct _GSourceFuncs { gboolean (*prepare) (GSource *source, gint *timeout_); gboolean (*check) (GSource *source); gboolean (*dispatch) (GSource *source, GSourceFunc callback, gpointer user_data); void (*finalize) (GSource *source); /* Can be NULL */ /*< private >*/ /* For use by g_source_set_closure */ GSourceFunc closure_callback; GSourceDummyMarshal closure_marshal; /* Really is of type GClosureMarshal */ }; /* Standard priorities */ /** * G_PRIORITY_HIGH: * * Use this for high priority event sources. * * It is not used within GLib or GTK+. */ /** * G_PRIORITY_DEFAULT: * * Use this for default priority event sources. * * In GLib this priority is used when adding timeout functions * with g_timeout_add(). In GDK this priority is used for events * from the X server. */ /** * G_PRIORITY_HIGH_IDLE: * * Use this for high priority idle functions. * * GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations, * and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is * done to ensure that any pending resizes are processed before any * pending redraws, so that widgets are not redrawn twice unnecessarily.) */ /** * G_PRIORITY_DEFAULT_IDLE: * * Use this for default priority idle functions. * * In GLib this priority is used when adding idle functions with * g_idle_add(). */ /** * G_PRIORITY_LOW: * * Use this for very low priority background tasks. * * It is not used within GLib or GTK+. */ /** * G_SOURCE_REMOVE: * * Use this macro as the return value of a #GSourceFunc to remove * the #GSource from the main loop. * * Since: 2.32 */ /** * G_SOURCE_CONTINUE: * * Use this macro as the return value of a #GSourceFunc to leave * the #GSource in the main loop. * * Since: 2.32 */ /* GMainContext: */ extern GMainContext *g_main_context_new (void); extern GMainContext *g_main_context_ref (GMainContext *context); extern void g_main_context_unref (GMainContext *context); extern GMainContext *g_main_context_default (void); extern gboolean g_main_context_iteration (GMainContext *context, gboolean may_block); extern gboolean g_main_context_pending (GMainContext *context); /* For implementation of legacy interfaces */ extern GSource *g_main_context_find_source_by_id (GMainContext *context, guint source_id); extern GSource *g_main_context_find_source_by_user_data (GMainContext *context, gpointer user_data); extern GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *context, GSourceFuncs *funcs, gpointer user_data); /* Low level functions for implementing custom main loops. */ extern void g_main_context_wakeup (GMainContext *context); extern gboolean g_main_context_acquire (GMainContext *context); extern void g_main_context_release (GMainContext *context); extern gboolean g_main_context_is_owner (GMainContext *context); extern gboolean g_main_context_wait (GMainContext *context, GCond *cond, GMutex *mutex); extern gboolean g_main_context_prepare (GMainContext *context, gint *priority); extern gint g_main_context_query (GMainContext *context, gint max_priority, gint *timeout_, GPollFD *fds, gint n_fds); extern gboolean g_main_context_check (GMainContext *context, gint max_priority, GPollFD *fds, gint n_fds); extern void g_main_context_dispatch (GMainContext *context); extern void g_main_context_set_poll_func (GMainContext *context, GPollFunc func); extern GPollFunc g_main_context_get_poll_func (GMainContext *context); /* Low level functions for use by source implementations */ extern void g_main_context_add_poll (GMainContext *context, GPollFD *fd, gint priority); extern void g_main_context_remove_poll (GMainContext *context, GPollFD *fd); extern gint g_main_depth (void); extern GSource *g_main_current_source (void); /* GMainContexts for other threads */ extern void g_main_context_push_thread_default (GMainContext *context); extern void g_main_context_pop_thread_default (GMainContext *context); extern GMainContext *g_main_context_get_thread_default (void); extern GMainContext *g_main_context_ref_thread_default (void); /* GMainLoop: */ extern GMainLoop *g_main_loop_new (GMainContext *context, gboolean is_running); extern void g_main_loop_run (GMainLoop *loop); extern void g_main_loop_quit (GMainLoop *loop); extern GMainLoop *g_main_loop_ref (GMainLoop *loop); extern void g_main_loop_unref (GMainLoop *loop); extern gboolean g_main_loop_is_running (GMainLoop *loop); extern GMainContext *g_main_loop_get_context (GMainLoop *loop); /* GSource: */ extern GSource *g_source_new (GSourceFuncs *source_funcs, guint struct_size); extern GSource *g_source_ref (GSource *source); extern void g_source_unref (GSource *source); extern guint g_source_attach (GSource *source, GMainContext *context); extern void g_source_destroy (GSource *source); extern void g_source_set_priority (GSource *source, gint priority); extern gint g_source_get_priority (GSource *source); extern void g_source_set_can_recurse (GSource *source, gboolean can_recurse); extern gboolean g_source_get_can_recurse (GSource *source); extern guint g_source_get_id (GSource *source); extern GMainContext *g_source_get_context (GSource *source); extern void g_source_set_callback (GSource *source, GSourceFunc func, gpointer data, GDestroyNotify notify); extern void g_source_set_funcs (GSource *source, GSourceFuncs *funcs); extern gboolean g_source_is_destroyed (GSource *source); extern void g_source_set_name (GSource *source, const char *name); extern const char * g_source_get_name (GSource *source); extern void g_source_set_name_by_id (guint tag, const char *name); extern void g_source_set_ready_time (GSource *source, gint64 ready_time); extern gint64 g_source_get_ready_time (GSource *source); extern gpointer g_source_add_unix_fd (GSource *source, gint fd, GIOCondition events); extern void g_source_modify_unix_fd (GSource *source, gpointer tag, GIOCondition new_events); extern void g_source_remove_unix_fd (GSource *source, gpointer tag); extern GIOCondition g_source_query_unix_fd (GSource *source, gpointer tag); /* Used to implement g_source_connect_closure and internally*/ extern void g_source_set_callback_indirect (GSource *source, gpointer callback_data, GSourceCallbackFuncs *callback_funcs); extern void g_source_add_poll (GSource *source, GPollFD *fd); extern void g_source_remove_poll (GSource *source, GPollFD *fd); extern void g_source_add_child_source (GSource *source, GSource *child_source); extern void g_source_remove_child_source (GSource *source, GSource *child_source); __attribute__((__deprecated__("Use '" "g_source_get_time" "' instead"))) extern void g_source_get_current_time (GSource *source, GTimeVal *timeval); extern gint64 g_source_get_time (GSource *source); /* void g_source_connect_closure (GSource *source, GClosure *closure); */ /* Specific source types */ extern GSource *g_idle_source_new (void); extern GSource *g_child_watch_source_new (GPid pid); extern GSource *g_timeout_source_new (guint interval); extern GSource *g_timeout_source_new_seconds (guint interval); /* Miscellaneous functions */ extern void g_get_current_time (GTimeVal *result); extern gint64 g_get_monotonic_time (void); extern gint64 g_get_real_time (void); /* Source manipulation by ID */ extern gboolean g_source_remove (guint tag); extern gboolean g_source_remove_by_user_data (gpointer user_data); extern gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, gpointer user_data); /** * GClearHandleFunc: * @handle_id: the handle ID to clear * * Specifies the type of function passed to g_clear_handle_id(). * The implementation is expected to free the resource identified * by @handle_id; for instance, if @handle_id is a #GSource ID, * g_source_remove() can be used. * * Since: 2.56 */ typedef void (* GClearHandleFunc) (guint handle_id); extern void g_clear_handle_id (guint *tag_ptr, GClearHandleFunc clear_func); # 597 "/usr/include/glib-2.0/glib/gmain.h" /* Idles, child watchers and timeouts */ extern guint g_timeout_add_full (gint priority, guint interval, GSourceFunc function, gpointer data, GDestroyNotify notify); extern guint g_timeout_add (guint interval, GSourceFunc function, gpointer data); extern guint g_timeout_add_seconds_full (gint priority, guint interval, GSourceFunc function, gpointer data, GDestroyNotify notify); extern guint g_timeout_add_seconds (guint interval, GSourceFunc function, gpointer data); extern guint g_child_watch_add_full (gint priority, GPid pid, GChildWatchFunc function, gpointer data, GDestroyNotify notify); extern guint g_child_watch_add (GPid pid, GChildWatchFunc function, gpointer data); extern guint g_idle_add (GSourceFunc function, gpointer data); extern guint g_idle_add_full (gint priority, GSourceFunc function, gpointer data, GDestroyNotify notify); extern gboolean g_idle_remove_by_data (gpointer data); extern void g_main_context_invoke_full (GMainContext *context, gint priority, GSourceFunc function, gpointer data, GDestroyNotify notify); extern void g_main_context_invoke (GMainContext *context, GSourceFunc function, gpointer data); /* Hook for GClosure / GSource integration. Don't touch */ extern GSourceFuncs g_timeout_funcs; extern GSourceFuncs g_child_watch_funcs; extern GSourceFuncs g_idle_funcs; extern GSourceFuncs g_unix_signal_funcs; extern GSourceFuncs g_unix_fd_source_funcs; # 34 "/usr/include/glib-2.0/glib/giochannel.h" 2 # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gstring.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gstring.h" 2 # 1 "/usr/include/glib-2.0/glib/gunicode.h" 1 /* gunicode.h - Unicode manipulation functions * * Copyright (C) 1999, 2000 Tom Tromey * Copyright 2000, 2005 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 27 "/usr/include/glib-2.0/glib/gunicode.h" # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 28 "/usr/include/glib-2.0/glib/gunicode.h" 2 # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 29 "/usr/include/glib-2.0/glib/gunicode.h" 2 /** * gunichar: * * A type which can hold any UTF-32 or UCS-4 character code, * also known as a Unicode code point. * * If you want to produce the UTF-8 representation of a #gunichar, * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse * process. * * To print/scan values of this type as integer, use * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT. * * The notation to express a Unicode code point in running text is * as a hexadecimal number with four to six digits and uppercase * letters, prefixed by the string "U+". Leading zeros are omitted, * unless the code point would have fewer than four hexadecimal digits. * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X". * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X". * * |[ * gunichar c; * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &c) * g_print ("Read U+%04"G_GINT32_FORMAT"X", c); * ]| */ typedef guint32 gunichar; /** * gunichar2: * * A type which can hold any UTF-16 code * pointUTF-16 also has so called * surrogate pairs to encode characters beyond * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored * in a single gunichar2 field, but all GLib functions accepting gunichar2 * arrays will correctly interpret surrogate pairs.. * * To print/scan values of this type to/from text you need to convert * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16(). * * To print/scan values of this type as integer, use * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT. */ typedef guint16 gunichar2; /** * GUnicodeType: * @G_UNICODE_CONTROL: General category "Other, Control" (Cc) * @G_UNICODE_FORMAT: General category "Other, Format" (Cf) * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn) * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co) * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs) * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll) * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm) * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo) * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt) * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu) * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc) * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me) * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn) * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd) * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl) * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No) * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc) * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd) * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe) * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf) * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi) * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po) * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps) * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc) * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk) * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm) * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So) * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl) * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp) * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs) * * These are the possible character classifications from the * Unicode specification. * See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values). */ typedef enum { G_UNICODE_CONTROL, G_UNICODE_FORMAT, G_UNICODE_UNASSIGNED, G_UNICODE_PRIVATE_USE, G_UNICODE_SURROGATE, G_UNICODE_LOWERCASE_LETTER, G_UNICODE_MODIFIER_LETTER, G_UNICODE_OTHER_LETTER, G_UNICODE_TITLECASE_LETTER, G_UNICODE_UPPERCASE_LETTER, G_UNICODE_SPACING_MARK, G_UNICODE_ENCLOSING_MARK, G_UNICODE_NON_SPACING_MARK, G_UNICODE_DECIMAL_NUMBER, G_UNICODE_LETTER_NUMBER, G_UNICODE_OTHER_NUMBER, G_UNICODE_CONNECT_PUNCTUATION, G_UNICODE_DASH_PUNCTUATION, G_UNICODE_CLOSE_PUNCTUATION, G_UNICODE_FINAL_PUNCTUATION, G_UNICODE_INITIAL_PUNCTUATION, G_UNICODE_OTHER_PUNCTUATION, G_UNICODE_OPEN_PUNCTUATION, G_UNICODE_CURRENCY_SYMBOL, G_UNICODE_MODIFIER_SYMBOL, G_UNICODE_MATH_SYMBOL, G_UNICODE_OTHER_SYMBOL, G_UNICODE_LINE_SEPARATOR, G_UNICODE_PARAGRAPH_SEPARATOR, G_UNICODE_SPACE_SEPARATOR } GUnicodeType; /** * G_UNICODE_COMBINING_MARK: * * Older name for %G_UNICODE_SPACING_MARK. * * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK. */ /** * GUnicodeBreakType: * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK) * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR) * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF) * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM) * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG) * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW) * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN) * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL) * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB) * @G_UNICODE_BREAK_SPACE: Space (SP) * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA) * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB) * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2) * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY) * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS) * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP) * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL) * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU) * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX) * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID) * @G_UNICODE_BREAK_NUMERIC: Numeric (NU) * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS) * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY) * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL) * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR) * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO) * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA) * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI) * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX) * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL) * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ) * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL) * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV) * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT) * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2) * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3) * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28 * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32 * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32 * @G_UNICODE_BREAK_REGIONAL_INDICATOR: Regional Indicator (RI). Since: 2.36 * @G_UNICODE_BREAK_EMOJI_BASE: Emoji Base (EB). Since: 2.50 * @G_UNICODE_BREAK_EMOJI_MODIFIER: Emoji Modifier (EM). Since: 2.50 * @G_UNICODE_BREAK_ZERO_WIDTH_JOINER: Zero Width Joiner (ZWJ). Since: 2.50 * * These are the possible line break classifications. * * Since new unicode versions may add new types here, applications should be ready * to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN. * * See [Unicode Line Breaking Algorithm](http://www.unicode.org/unicode/reports/tr14/). */ typedef enum { G_UNICODE_BREAK_MANDATORY, G_UNICODE_BREAK_CARRIAGE_RETURN, G_UNICODE_BREAK_LINE_FEED, G_UNICODE_BREAK_COMBINING_MARK, G_UNICODE_BREAK_SURROGATE, G_UNICODE_BREAK_ZERO_WIDTH_SPACE, G_UNICODE_BREAK_INSEPARABLE, G_UNICODE_BREAK_NON_BREAKING_GLUE, G_UNICODE_BREAK_CONTINGENT, G_UNICODE_BREAK_SPACE, G_UNICODE_BREAK_AFTER, G_UNICODE_BREAK_BEFORE, G_UNICODE_BREAK_BEFORE_AND_AFTER, G_UNICODE_BREAK_HYPHEN, G_UNICODE_BREAK_NON_STARTER, G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PUNCTUATION, G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_EXCLAMATION, G_UNICODE_BREAK_IDEOGRAPHIC, G_UNICODE_BREAK_NUMERIC, G_UNICODE_BREAK_INFIX_SEPARATOR, G_UNICODE_BREAK_SYMBOL, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_POSTFIX, G_UNICODE_BREAK_COMPLEX_CONTEXT, G_UNICODE_BREAK_AMBIGUOUS, G_UNICODE_BREAK_UNKNOWN, G_UNICODE_BREAK_NEXT_LINE, G_UNICODE_BREAK_WORD_JOINER, G_UNICODE_BREAK_HANGUL_L_JAMO, G_UNICODE_BREAK_HANGUL_V_JAMO, G_UNICODE_BREAK_HANGUL_T_JAMO, G_UNICODE_BREAK_HANGUL_LV_SYLLABLE, G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE, G_UNICODE_BREAK_CLOSE_PARANTHESIS, G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER, G_UNICODE_BREAK_HEBREW_LETTER, G_UNICODE_BREAK_REGIONAL_INDICATOR, G_UNICODE_BREAK_EMOJI_BASE, G_UNICODE_BREAK_EMOJI_MODIFIER, G_UNICODE_BREAK_ZERO_WIDTH_JOINER } GUnicodeBreakType; /** * GUnicodeScript: * @G_UNICODE_SCRIPT_INVALID_CODE: * a value never returned from g_unichar_get_script() * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the * base glyph to which it is attached * @G_UNICODE_SCRIPT_ARABIC: Arabic * @G_UNICODE_SCRIPT_ARMENIAN: Armenian * @G_UNICODE_SCRIPT_BENGALI: Bengali * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee * @G_UNICODE_SCRIPT_COPTIC: Coptic * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic * @G_UNICODE_SCRIPT_DESERET: Deseret * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic * @G_UNICODE_SCRIPT_GEORGIAN: Georgian * @G_UNICODE_SCRIPT_GOTHIC: Gothic * @G_UNICODE_SCRIPT_GREEK: Greek * @G_UNICODE_SCRIPT_GUJARATI: Gujarati * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi * @G_UNICODE_SCRIPT_HAN: Han * @G_UNICODE_SCRIPT_HANGUL: Hangul * @G_UNICODE_SCRIPT_HEBREW: Hebrew * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana * @G_UNICODE_SCRIPT_KANNADA: Kannada * @G_UNICODE_SCRIPT_KATAKANA: Katakana * @G_UNICODE_SCRIPT_KHMER: Khmer * @G_UNICODE_SCRIPT_LAO: Lao * @G_UNICODE_SCRIPT_LATIN: Latin * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian * @G_UNICODE_SCRIPT_MYANMAR: Myanmar * @G_UNICODE_SCRIPT_OGHAM: Ogham * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic * @G_UNICODE_SCRIPT_ORIYA: Oriya * @G_UNICODE_SCRIPT_RUNIC: Runic * @G_UNICODE_SCRIPT_SINHALA: Sinhala * @G_UNICODE_SCRIPT_SYRIAC: Syriac * @G_UNICODE_SCRIPT_TAMIL: Tamil * @G_UNICODE_SCRIPT_TELUGU: Telugu * @G_UNICODE_SCRIPT_THAANA: Thaana * @G_UNICODE_SCRIPT_THAI: Thai * @G_UNICODE_SCRIPT_TIBETAN: Tibetan * @G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL: * Canadian Aboriginal * @G_UNICODE_SCRIPT_YI: Yi * @G_UNICODE_SCRIPT_TAGALOG: Tagalog * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo * @G_UNICODE_SCRIPT_BUHID: Buhid * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa * @G_UNICODE_SCRIPT_BRAILLE: Braille * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot * @G_UNICODE_SCRIPT_LIMBU: Limbu * @G_UNICODE_SCRIPT_OSMANYA: Osmanya * @G_UNICODE_SCRIPT_SHAVIAN: Shavian * @G_UNICODE_SCRIPT_LINEAR_B: Linear B * @G_UNICODE_SCRIPT_TAI_LE: Tai Le * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic * @G_UNICODE_SCRIPT_NEW_TAI_LUE: * New Tai Lue * @G_UNICODE_SCRIPT_BUGINESE: Buginese * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh * @G_UNICODE_SCRIPT_SYLOTI_NAGRI: * Syloti Nagri * @G_UNICODE_SCRIPT_OLD_PERSIAN: * Old Persian * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point * @G_UNICODE_SCRIPT_BALINESE: Balinese * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa * @G_UNICODE_SCRIPT_NKO: N'Ko * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3 * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3 * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3 * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3 * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3 * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3 * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3 * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3 * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3 * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3 * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3 * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26 * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26 * @G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS: * Egyptian Hieroglpyhs. Since 2.26 * @G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC: * Imperial Aramaic. Since 2.26 * @G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI: * Inscriptional Pahlavi. Since 2.26 * @G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN: * Inscriptional Parthian. Since 2.26 * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26 * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26 * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26 * @G_UNICODE_SCRIPT_MEETEI_MAYEK: * Meetei Mayek. Since 2.26 * @G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN: * Old South Arabian. Since 2.26 * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28 * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26 * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26 * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26 * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28 * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28 * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28 * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32 * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32 * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS: Meroitic Hieroglyphs. Since: 2.32 * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32 * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32 * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32 * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32 * @G_UNICODE_SCRIPT_BASSA_VAH: Bassa. Since: 2.42 * @G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN: Caucasian Albanian. Since: 2.42 * @G_UNICODE_SCRIPT_DUPLOYAN: Duployan. Since: 2.42 * @G_UNICODE_SCRIPT_ELBASAN: Elbasan. Since: 2.42 * @G_UNICODE_SCRIPT_GRANTHA: Grantha. Since: 2.42 * @G_UNICODE_SCRIPT_KHOJKI: Kjohki. Since: 2.42 * @G_UNICODE_SCRIPT_KHUDAWADI: Khudawadi, Sindhi. Since: 2.42 * @G_UNICODE_SCRIPT_LINEAR_A: Linear A. Since: 2.42 * @G_UNICODE_SCRIPT_MAHAJANI: Mahajani. Since: 2.42 * @G_UNICODE_SCRIPT_MANICHAEAN: Manichaean. Since: 2.42 * @G_UNICODE_SCRIPT_MENDE_KIKAKUI: Mende Kikakui. Since: 2.42 * @G_UNICODE_SCRIPT_MODI: Modi. Since: 2.42 * @G_UNICODE_SCRIPT_MRO: Mro. Since: 2.42 * @G_UNICODE_SCRIPT_NABATAEAN: Nabataean. Since: 2.42 * @G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN: Old North Arabian. Since: 2.42 * @G_UNICODE_SCRIPT_OLD_PERMIC: Old Permic. Since: 2.42 * @G_UNICODE_SCRIPT_PAHAWH_HMONG: Pahawh Hmong. Since: 2.42 * @G_UNICODE_SCRIPT_PALMYRENE: Palmyrene. Since: 2.42 * @G_UNICODE_SCRIPT_PAU_CIN_HAU: Pau Cin Hau. Since: 2.42 * @G_UNICODE_SCRIPT_PSALTER_PAHLAVI: Psalter Pahlavi. Since: 2.42 * @G_UNICODE_SCRIPT_SIDDHAM: Siddham. Since: 2.42 * @G_UNICODE_SCRIPT_TIRHUTA: Tirhuta. Since: 2.42 * @G_UNICODE_SCRIPT_WARANG_CITI: Warang Citi. Since: 2.42 * @G_UNICODE_SCRIPT_AHOM: Ahom. Since: 2.48 * @G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS: Anatolian Hieroglyphs. Since: 2.48 * @G_UNICODE_SCRIPT_HATRAN: Hatran. Since: 2.48 * @G_UNICODE_SCRIPT_MULTANI: Multani. Since: 2.48 * @G_UNICODE_SCRIPT_OLD_HUNGARIAN: Old Hungarian. Since: 2.48 * @G_UNICODE_SCRIPT_SIGNWRITING: Signwriting. Since: 2.48 * @G_UNICODE_SCRIPT_ADLAM: Adlam. Since: 2.50 * @G_UNICODE_SCRIPT_BHAIKSUKI: Bhaiksuki. Since: 2.50 * @G_UNICODE_SCRIPT_MARCHEN: Marchen. Since: 2.50 * @G_UNICODE_SCRIPT_NEWA: Newa. Since: 2.50 * @G_UNICODE_SCRIPT_OSAGE: Osage. Since: 2.50 * @G_UNICODE_SCRIPT_TANGUT: Tangut. Since: 2.50 * @G_UNICODE_SCRIPT_MASARAM_GONDI: Masaram Gondi. Since: 2.54 * @G_UNICODE_SCRIPT_NUSHU: Nushu. Since: 2.54 * @G_UNICODE_SCRIPT_SOYOMBO: Soyombo. Since: 2.54 * @G_UNICODE_SCRIPT_ZANABAZAR_SQUARE: Zanabazar Square. Since: 2.54 * * The #GUnicodeScript enumeration identifies different writing * systems. The values correspond to the names as defined in the * Unicode standard. The enumeration has been added in GLib 2.14, * and is interchangeable with #PangoScript. * * Note that new types may be added in the future. Applications * should be ready to handle unknown values. * See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr24/). */ typedef enum { /* ISO 15924 code */ G_UNICODE_SCRIPT_INVALID_CODE = -1, G_UNICODE_SCRIPT_COMMON = 0, /* Zyyy */ G_UNICODE_SCRIPT_INHERITED, /* Zinh (Qaai) */ G_UNICODE_SCRIPT_ARABIC, /* Arab */ G_UNICODE_SCRIPT_ARMENIAN, /* Armn */ G_UNICODE_SCRIPT_BENGALI, /* Beng */ G_UNICODE_SCRIPT_BOPOMOFO, /* Bopo */ G_UNICODE_SCRIPT_CHEROKEE, /* Cher */ G_UNICODE_SCRIPT_COPTIC, /* Copt (Qaac) */ G_UNICODE_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */ G_UNICODE_SCRIPT_DESERET, /* Dsrt */ G_UNICODE_SCRIPT_DEVANAGARI, /* Deva */ G_UNICODE_SCRIPT_ETHIOPIC, /* Ethi */ G_UNICODE_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */ G_UNICODE_SCRIPT_GOTHIC, /* Goth */ G_UNICODE_SCRIPT_GREEK, /* Grek */ G_UNICODE_SCRIPT_GUJARATI, /* Gujr */ G_UNICODE_SCRIPT_GURMUKHI, /* Guru */ G_UNICODE_SCRIPT_HAN, /* Hani */ G_UNICODE_SCRIPT_HANGUL, /* Hang */ G_UNICODE_SCRIPT_HEBREW, /* Hebr */ G_UNICODE_SCRIPT_HIRAGANA, /* Hira */ G_UNICODE_SCRIPT_KANNADA, /* Knda */ G_UNICODE_SCRIPT_KATAKANA, /* Kana */ G_UNICODE_SCRIPT_KHMER, /* Khmr */ G_UNICODE_SCRIPT_LAO, /* Laoo */ G_UNICODE_SCRIPT_LATIN, /* Latn (Latf, Latg) */ G_UNICODE_SCRIPT_MALAYALAM, /* Mlym */ G_UNICODE_SCRIPT_MONGOLIAN, /* Mong */ G_UNICODE_SCRIPT_MYANMAR, /* Mymr */ G_UNICODE_SCRIPT_OGHAM, /* Ogam */ G_UNICODE_SCRIPT_OLD_ITALIC, /* Ital */ G_UNICODE_SCRIPT_ORIYA, /* Orya */ G_UNICODE_SCRIPT_RUNIC, /* Runr */ G_UNICODE_SCRIPT_SINHALA, /* Sinh */ G_UNICODE_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */ G_UNICODE_SCRIPT_TAMIL, /* Taml */ G_UNICODE_SCRIPT_TELUGU, /* Telu */ G_UNICODE_SCRIPT_THAANA, /* Thaa */ G_UNICODE_SCRIPT_THAI, /* Thai */ G_UNICODE_SCRIPT_TIBETAN, /* Tibt */ G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */ G_UNICODE_SCRIPT_YI, /* Yiii */ G_UNICODE_SCRIPT_TAGALOG, /* Tglg */ G_UNICODE_SCRIPT_HANUNOO, /* Hano */ G_UNICODE_SCRIPT_BUHID, /* Buhd */ G_UNICODE_SCRIPT_TAGBANWA, /* Tagb */ /* Unicode-4.0 additions */ G_UNICODE_SCRIPT_BRAILLE, /* Brai */ G_UNICODE_SCRIPT_CYPRIOT, /* Cprt */ G_UNICODE_SCRIPT_LIMBU, /* Limb */ G_UNICODE_SCRIPT_OSMANYA, /* Osma */ G_UNICODE_SCRIPT_SHAVIAN, /* Shaw */ G_UNICODE_SCRIPT_LINEAR_B, /* Linb */ G_UNICODE_SCRIPT_TAI_LE, /* Tale */ G_UNICODE_SCRIPT_UGARITIC, /* Ugar */ /* Unicode-4.1 additions */ G_UNICODE_SCRIPT_NEW_TAI_LUE, /* Talu */ G_UNICODE_SCRIPT_BUGINESE, /* Bugi */ G_UNICODE_SCRIPT_GLAGOLITIC, /* Glag */ G_UNICODE_SCRIPT_TIFINAGH, /* Tfng */ G_UNICODE_SCRIPT_SYLOTI_NAGRI, /* Sylo */ G_UNICODE_SCRIPT_OLD_PERSIAN, /* Xpeo */ G_UNICODE_SCRIPT_KHAROSHTHI, /* Khar */ /* Unicode-5.0 additions */ G_UNICODE_SCRIPT_UNKNOWN, /* Zzzz */ G_UNICODE_SCRIPT_BALINESE, /* Bali */ G_UNICODE_SCRIPT_CUNEIFORM, /* Xsux */ G_UNICODE_SCRIPT_PHOENICIAN, /* Phnx */ G_UNICODE_SCRIPT_PHAGS_PA, /* Phag */ G_UNICODE_SCRIPT_NKO, /* Nkoo */ /* Unicode-5.1 additions */ G_UNICODE_SCRIPT_KAYAH_LI, /* Kali */ G_UNICODE_SCRIPT_LEPCHA, /* Lepc */ G_UNICODE_SCRIPT_REJANG, /* Rjng */ G_UNICODE_SCRIPT_SUNDANESE, /* Sund */ G_UNICODE_SCRIPT_SAURASHTRA, /* Saur */ G_UNICODE_SCRIPT_CHAM, /* Cham */ G_UNICODE_SCRIPT_OL_CHIKI, /* Olck */ G_UNICODE_SCRIPT_VAI, /* Vaii */ G_UNICODE_SCRIPT_CARIAN, /* Cari */ G_UNICODE_SCRIPT_LYCIAN, /* Lyci */ G_UNICODE_SCRIPT_LYDIAN, /* Lydi */ /* Unicode-5.2 additions */ G_UNICODE_SCRIPT_AVESTAN, /* Avst */ G_UNICODE_SCRIPT_BAMUM, /* Bamu */ G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS, /* Egyp */ G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC, /* Armi */ G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI, /* Phli */ G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */ G_UNICODE_SCRIPT_JAVANESE, /* Java */ G_UNICODE_SCRIPT_KAITHI, /* Kthi */ G_UNICODE_SCRIPT_LISU, /* Lisu */ G_UNICODE_SCRIPT_MEETEI_MAYEK, /* Mtei */ G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN, /* Sarb */ G_UNICODE_SCRIPT_OLD_TURKIC, /* Orkh */ G_UNICODE_SCRIPT_SAMARITAN, /* Samr */ G_UNICODE_SCRIPT_TAI_THAM, /* Lana */ G_UNICODE_SCRIPT_TAI_VIET, /* Tavt */ /* Unicode-6.0 additions */ G_UNICODE_SCRIPT_BATAK, /* Batk */ G_UNICODE_SCRIPT_BRAHMI, /* Brah */ G_UNICODE_SCRIPT_MANDAIC, /* Mand */ /* Unicode-6.1 additions */ G_UNICODE_SCRIPT_CHAKMA, /* Cakm */ G_UNICODE_SCRIPT_MEROITIC_CURSIVE, /* Merc */ G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, /* Mero */ G_UNICODE_SCRIPT_MIAO, /* Plrd */ G_UNICODE_SCRIPT_SHARADA, /* Shrd */ G_UNICODE_SCRIPT_SORA_SOMPENG, /* Sora */ G_UNICODE_SCRIPT_TAKRI, /* Takr */ /* Unicode 7.0 additions */ G_UNICODE_SCRIPT_BASSA_VAH, /* Bass */ G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN, /* Aghb */ G_UNICODE_SCRIPT_DUPLOYAN, /* Dupl */ G_UNICODE_SCRIPT_ELBASAN, /* Elba */ G_UNICODE_SCRIPT_GRANTHA, /* Gran */ G_UNICODE_SCRIPT_KHOJKI, /* Khoj */ G_UNICODE_SCRIPT_KHUDAWADI, /* Sind */ G_UNICODE_SCRIPT_LINEAR_A, /* Lina */ G_UNICODE_SCRIPT_MAHAJANI, /* Mahj */ G_UNICODE_SCRIPT_MANICHAEAN, /* Manu */ G_UNICODE_SCRIPT_MENDE_KIKAKUI, /* Mend */ G_UNICODE_SCRIPT_MODI, /* Modi */ G_UNICODE_SCRIPT_MRO, /* Mroo */ G_UNICODE_SCRIPT_NABATAEAN, /* Nbat */ G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN, /* Narb */ G_UNICODE_SCRIPT_OLD_PERMIC, /* Perm */ G_UNICODE_SCRIPT_PAHAWH_HMONG, /* Hmng */ G_UNICODE_SCRIPT_PALMYRENE, /* Palm */ G_UNICODE_SCRIPT_PAU_CIN_HAU, /* Pauc */ G_UNICODE_SCRIPT_PSALTER_PAHLAVI, /* Phlp */ G_UNICODE_SCRIPT_SIDDHAM, /* Sidd */ G_UNICODE_SCRIPT_TIRHUTA, /* Tirh */ G_UNICODE_SCRIPT_WARANG_CITI, /* Wara */ /* Unicode 8.0 additions */ G_UNICODE_SCRIPT_AHOM, /* Ahom */ G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS, /* Hluw */ G_UNICODE_SCRIPT_HATRAN, /* Hatr */ G_UNICODE_SCRIPT_MULTANI, /* Mult */ G_UNICODE_SCRIPT_OLD_HUNGARIAN, /* Hung */ G_UNICODE_SCRIPT_SIGNWRITING, /* Sgnw */ /* Unicode 9.0 additions */ G_UNICODE_SCRIPT_ADLAM, /* Adlm */ G_UNICODE_SCRIPT_BHAIKSUKI, /* Bhks */ G_UNICODE_SCRIPT_MARCHEN, /* Marc */ G_UNICODE_SCRIPT_NEWA, /* Newa */ G_UNICODE_SCRIPT_OSAGE, /* Osge */ G_UNICODE_SCRIPT_TANGUT, /* Tang */ /* Unicode 10.0 additions */ G_UNICODE_SCRIPT_MASARAM_GONDI, /* Gonm */ G_UNICODE_SCRIPT_NUSHU, /* Nshu */ G_UNICODE_SCRIPT_SOYOMBO, /* Soyo */ G_UNICODE_SCRIPT_ZANABAZAR_SQUARE /* Zanb */ } GUnicodeScript; extern guint32 g_unicode_script_to_iso15924 (GUnicodeScript script); extern GUnicodeScript g_unicode_script_from_iso15924 (guint32 iso15924); /* These are all analogs of the functions. */ extern gboolean g_unichar_isalnum (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_isalpha (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_iscntrl (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_isdigit (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_isgraph (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_islower (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_isprint (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_ispunct (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_isspace (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_isupper (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_isxdigit (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_istitle (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_isdefined (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_iswide (gunichar c) __attribute__((__const__)); extern gboolean g_unichar_iswide_cjk(gunichar c) __attribute__((__const__)); extern gboolean g_unichar_iszerowidth(gunichar c) __attribute__((__const__)); extern gboolean g_unichar_ismark (gunichar c) __attribute__((__const__)); /* More functions. These convert between the three cases. * See the Unicode book to understand title case. */ extern gunichar g_unichar_toupper (gunichar c) __attribute__((__const__)); extern gunichar g_unichar_tolower (gunichar c) __attribute__((__const__)); extern gunichar g_unichar_totitle (gunichar c) __attribute__((__const__)); /* If C is a digit (according to 'g_unichar_isdigit'), then return its numeric value. Otherwise return -1. */ extern gint g_unichar_digit_value (gunichar c) __attribute__((__const__)); extern gint g_unichar_xdigit_value (gunichar c) __attribute__((__const__)); /* Return the Unicode character type of a given character. */ extern GUnicodeType g_unichar_type (gunichar c) __attribute__((__const__)); /* Return the line break property for a given character */ extern GUnicodeBreakType g_unichar_break_type (gunichar c) __attribute__((__const__)); /* Returns the combining class for a given character */ extern gint g_unichar_combining_class (gunichar uc) __attribute__((__const__)); extern gboolean g_unichar_get_mirror_char (gunichar ch, gunichar *mirrored_ch); extern GUnicodeScript g_unichar_get_script (gunichar ch) __attribute__((__const__)); /* Validate a Unicode character */ extern gboolean g_unichar_validate (gunichar ch) __attribute__((__const__)); /* Pairwise canonical compose/decompose */ extern gboolean g_unichar_compose (gunichar a, gunichar b, gunichar *ch); extern gboolean g_unichar_decompose (gunichar ch, gunichar *a, gunichar *b); extern gsize g_unichar_fully_decompose (gunichar ch, gboolean compat, gunichar *result, gsize result_len); /** * G_UNICHAR_MAX_DECOMPOSITION_LENGTH: * * The maximum length (in codepoints) of a compatibility or canonical * decomposition of a single Unicode character. * * This is as defined by Unicode 6.1. * * Since: 2.32 */ /* Compute canonical ordering of a string in-place. This rearranges decomposed characters in the string according to their combining classes. See the Unicode manual for more information. */ extern void g_unicode_canonical_ordering (gunichar *string, gsize len); __attribute__((__deprecated__)) extern gunichar *g_unicode_canonical_decomposition (gunichar ch, gsize *result_len) __attribute__((__malloc__)); /* Array of skip-bytes-per-initial character. */ extern const gchar * const g_utf8_skip; /** * g_utf8_next_char: * @p: Pointer to the start of a valid UTF-8 character * * Skips to the next character in a UTF-8 string. The string must be * valid; this macro is as fast as possible, and has no error-checking. * You would use this macro to iterate over a string character by * character. The macro returns the start of the next UTF-8 character. * Before using this macro, use g_utf8_validate() to validate strings * that may contain invalid UTF-8. */ extern gunichar g_utf8_get_char (const gchar *p) __attribute__((__pure__)); extern gunichar g_utf8_get_char_validated (const gchar *p, gssize max_len) __attribute__((__pure__)); extern gchar* g_utf8_offset_to_pointer (const gchar *str, glong offset) __attribute__((__pure__)); extern glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos) __attribute__((__pure__)); extern gchar* g_utf8_prev_char (const gchar *p) __attribute__((__pure__)); extern gchar* g_utf8_find_next_char (const gchar *p, const gchar *end) __attribute__((__pure__)); extern gchar* g_utf8_find_prev_char (const gchar *str, const gchar *p) __attribute__((__pure__)); extern glong g_utf8_strlen (const gchar *p, gssize max) __attribute__((__pure__)); extern gchar *g_utf8_substring (const gchar *str, glong start_pos, glong end_pos) __attribute__((__malloc__)); extern gchar *g_utf8_strncpy (gchar *dest, const gchar *src, gsize n); /* Find the UTF-8 character corresponding to ch, in string p. These functions are equivalants to strchr and strrchr */ extern gchar* g_utf8_strchr (const gchar *p, gssize len, gunichar c); extern gchar* g_utf8_strrchr (const gchar *p, gssize len, gunichar c); extern gchar* g_utf8_strreverse (const gchar *str, gssize len); extern gunichar2 *g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **error) __attribute__((__malloc__)); extern gunichar * g_utf8_to_ucs4 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **error) __attribute__((__malloc__)); extern gunichar * g_utf8_to_ucs4_fast (const gchar *str, glong len, glong *items_written) __attribute__((__malloc__)); extern gunichar * g_utf16_to_ucs4 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **error) __attribute__((__malloc__)); extern gchar* g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **error) __attribute__((__malloc__)); extern gunichar2 *g_ucs4_to_utf16 (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **error) __attribute__((__malloc__)); extern gchar* g_ucs4_to_utf8 (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **error) __attribute__((__malloc__)); extern gint g_unichar_to_utf8 (gunichar c, gchar *outbuf); extern gboolean g_utf8_validate (const gchar *str, gssize max_len, const gchar **end); extern gchar *g_utf8_strup (const gchar *str, gssize len) __attribute__((__malloc__)); extern gchar *g_utf8_strdown (const gchar *str, gssize len) __attribute__((__malloc__)); extern gchar *g_utf8_casefold (const gchar *str, gssize len) __attribute__((__malloc__)); /** * GNormalizeMode: * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the * text content, such as the above-mentioned accent representation * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with * composed forms rather than a maximally decomposed form * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the * "compatibility" characters in Unicode, such as SUPERSCRIPT THREE * to the standard forms (in this case DIGIT THREE). Formatting * information may be lost but for most text operations such * characters should be considered the same * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed * forms rather than a maximally decomposed form * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE * * Defines how a Unicode string is transformed in a canonical * form, standardizing such issues as whether a character with * an accent is represented as a base character and combining * accent or as a single precomposed character. Unicode strings * should generally be normalized before comparing them. */ typedef enum { G_NORMALIZE_DEFAULT, G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT, G_NORMALIZE_DEFAULT_COMPOSE, G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE, G_NORMALIZE_ALL, G_NORMALIZE_NFKD = G_NORMALIZE_ALL, G_NORMALIZE_ALL_COMPOSE, G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE } GNormalizeMode; extern gchar *g_utf8_normalize (const gchar *str, gssize len, GNormalizeMode mode) __attribute__((__malloc__)); extern gint g_utf8_collate (const gchar *str1, const gchar *str2) __attribute__((__pure__)); extern gchar *g_utf8_collate_key (const gchar *str, gssize len) __attribute__((__malloc__)); extern gchar *g_utf8_collate_key_for_filename (const gchar *str, gssize len) __attribute__((__malloc__)); extern gchar *g_utf8_make_valid (const gchar *str, gssize len) __attribute__((__malloc__)); # 34 "/usr/include/glib-2.0/glib/gstring.h" 2 # 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 /* * Copyright © 2009, 2010 Codethink Limited * Copyright © 2011 Collabora Ltd. * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie * Stef Walter */ # 35 "/usr/include/glib-2.0/glib/gstring.h" 2 # 1 "/usr/include/glib-2.0/glib/gutils.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 36 "/usr/include/glib-2.0/glib/gstring.h" 2 typedef struct _GString GString; struct _GString { gchar *str; gsize len; gsize allocated_len; }; extern GString* g_string_new (const gchar *init); extern GString* g_string_new_len (const gchar *init, gssize len); extern GString* g_string_sized_new (gsize dfl_size); extern gchar* g_string_free (GString *string, gboolean free_segment); extern GBytes* g_string_free_to_bytes (GString *string); extern gboolean g_string_equal (const GString *v, const GString *v2); extern guint g_string_hash (const GString *str); extern GString* g_string_assign (GString *string, const gchar *rval); extern GString* g_string_truncate (GString *string, gsize len); extern GString* g_string_set_size (GString *string, gsize len); extern GString* g_string_insert_len (GString *string, gssize pos, const gchar *val, gssize len); extern GString* g_string_append (GString *string, const gchar *val); extern GString* g_string_append_len (GString *string, const gchar *val, gssize len); extern GString* g_string_append_c (GString *string, gchar c); extern GString* g_string_append_unichar (GString *string, gunichar wc); extern GString* g_string_prepend (GString *string, const gchar *val); extern GString* g_string_prepend_c (GString *string, gchar c); extern GString* g_string_prepend_unichar (GString *string, gunichar wc); extern GString* g_string_prepend_len (GString *string, const gchar *val, gssize len); extern GString* g_string_insert (GString *string, gssize pos, const gchar *val); extern GString* g_string_insert_c (GString *string, gssize pos, gchar c); extern GString* g_string_insert_unichar (GString *string, gssize pos, gunichar wc); extern GString* g_string_overwrite (GString *string, gsize pos, const gchar *val); extern GString* g_string_overwrite_len (GString *string, gsize pos, const gchar *val, gssize len); extern GString* g_string_erase (GString *string, gssize pos, gssize len); extern GString* g_string_ascii_down (GString *string); extern GString* g_string_ascii_up (GString *string); extern void g_string_vprintf (GString *string, const gchar *format, va_list args) __attribute__((__format__ (__printf__, 2, 0))); extern void g_string_printf (GString *string, const gchar *format, ...) __attribute__((__format__ (__printf__, 2, 3))); extern void g_string_append_vprintf (GString *string, const gchar *format, va_list args) __attribute__((__format__ (__printf__, 2, 0))); extern void g_string_append_printf (GString *string, const gchar *format, ...) __attribute__((__format__ (__printf__, 2, 3))); extern GString* g_string_append_uri_escaped (GString *string, const gchar *unescaped, const gchar *reserved_chars_allowed, gboolean allow_utf8); /* -- optimize g_strig_append_c --- */ static inline GString* g_string_append_c_inline (GString *gstring, gchar c) { if (gstring->len + 1 < gstring->allocated_len) { gstring->str[gstring->len++] = c; gstring->str[gstring->len] = 0; } else g_string_insert_c (gstring, -1, c); return gstring; } __attribute__((__deprecated__)) extern GString *g_string_down (GString *string); __attribute__((__deprecated__)) extern GString *g_string_up (GString *string); # 35 "/usr/include/glib-2.0/glib/giochannel.h" 2 /* GIOChannel */ typedef struct _GIOChannel GIOChannel; typedef struct _GIOFuncs GIOFuncs; typedef enum { G_IO_ERROR_NONE, G_IO_ERROR_AGAIN, G_IO_ERROR_INVAL, G_IO_ERROR_UNKNOWN } GIOError; typedef enum { /* Derived from errno */ G_IO_CHANNEL_ERROR_FBIG, G_IO_CHANNEL_ERROR_INVAL, G_IO_CHANNEL_ERROR_IO, G_IO_CHANNEL_ERROR_ISDIR, G_IO_CHANNEL_ERROR_NOSPC, G_IO_CHANNEL_ERROR_NXIO, G_IO_CHANNEL_ERROR_OVERFLOW, G_IO_CHANNEL_ERROR_PIPE, /* Other */ G_IO_CHANNEL_ERROR_FAILED } GIOChannelError; typedef enum { G_IO_STATUS_ERROR, G_IO_STATUS_NORMAL, G_IO_STATUS_EOF, G_IO_STATUS_AGAIN } GIOStatus; typedef enum { G_SEEK_CUR, G_SEEK_SET, G_SEEK_END } GSeekType; typedef enum { G_IO_FLAG_APPEND = 1 << 0, G_IO_FLAG_NONBLOCK = 1 << 1, G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */ G_IO_FLAG_IS_WRITABLE = 1 << 3, /* Read only flag */ G_IO_FLAG_IS_WRITEABLE = 1 << 3, /* Misspelling in 2.29.10 and earlier */ G_IO_FLAG_IS_SEEKABLE = 1 << 4, /* Read only flag */ G_IO_FLAG_MASK = (1 << 5) - 1, G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK, G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND | G_IO_FLAG_NONBLOCK } GIOFlags; struct _GIOChannel { /*< private >*/ gint ref_count; GIOFuncs *funcs; gchar *encoding; GIConv read_cd; GIConv write_cd; gchar *line_term; /* String which indicates the end of a line of text */ guint line_term_len; /* So we can have null in the line term */ gsize buf_size; GString *read_buf; /* Raw data from the channel */ GString *encoded_read_buf; /* Channel data converted to UTF-8 */ GString *write_buf; /* Data ready to be written to the file */ gchar partial_write_buf[6]; /* UTF-8 partial characters, null terminated */ /* Group the flags together, immediately after partial_write_buf, to save memory */ guint use_buffer : 1; /* The encoding uses the buffers */ guint do_encode : 1; /* The encoding uses the GIConv coverters */ guint close_on_unref : 1; /* Close the channel on final unref */ guint is_readable : 1; /* Cached GIOFlag */ guint is_writeable : 1; /* ditto */ guint is_seekable : 1; /* ditto */ gpointer reserved1; gpointer reserved2; }; typedef gboolean (*GIOFunc) (GIOChannel *source, GIOCondition condition, gpointer data); struct _GIOFuncs { GIOStatus (*io_read) (GIOChannel *channel, gchar *buf, gsize count, gsize *bytes_read, GError **err); GIOStatus (*io_write) (GIOChannel *channel, const gchar *buf, gsize count, gsize *bytes_written, GError **err); GIOStatus (*io_seek) (GIOChannel *channel, gint64 offset, GSeekType type, GError **err); GIOStatus (*io_close) (GIOChannel *channel, GError **err); GSource* (*io_create_watch) (GIOChannel *channel, GIOCondition condition); void (*io_free) (GIOChannel *channel); GIOStatus (*io_set_flags) (GIOChannel *channel, GIOFlags flags, GError **err); GIOFlags (*io_get_flags) (GIOChannel *channel); }; extern void g_io_channel_init (GIOChannel *channel); extern GIOChannel *g_io_channel_ref (GIOChannel *channel); extern void g_io_channel_unref (GIOChannel *channel); __attribute__((__deprecated__("Use '" "g_io_channel_read_chars" "' instead"))) extern GIOError g_io_channel_read (GIOChannel *channel, gchar *buf, gsize count, gsize *bytes_read); __attribute__((__deprecated__("Use '" "g_io_channel_write_chars" "' instead"))) extern GIOError g_io_channel_write (GIOChannel *channel, const gchar *buf, gsize count, gsize *bytes_written); __attribute__((__deprecated__("Use '" "g_io_channel_seek_position" "' instead"))) extern GIOError g_io_channel_seek (GIOChannel *channel, gint64 offset, GSeekType type); __attribute__((__deprecated__("Use '" "g_io_channel_shutdown" "' instead"))) extern void g_io_channel_close (GIOChannel *channel); extern GIOStatus g_io_channel_shutdown (GIOChannel *channel, gboolean flush, GError **err); extern guint g_io_add_watch_full (GIOChannel *channel, gint priority, GIOCondition condition, GIOFunc func, gpointer user_data, GDestroyNotify notify); extern GSource * g_io_create_watch (GIOChannel *channel, GIOCondition condition); extern guint g_io_add_watch (GIOChannel *channel, GIOCondition condition, GIOFunc func, gpointer user_data); /* character encoding conversion involved functions. */ extern void g_io_channel_set_buffer_size (GIOChannel *channel, gsize size); extern gsize g_io_channel_get_buffer_size (GIOChannel *channel); extern GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel); extern GIOStatus g_io_channel_set_flags (GIOChannel *channel, GIOFlags flags, GError **error); extern GIOFlags g_io_channel_get_flags (GIOChannel *channel); extern void g_io_channel_set_line_term (GIOChannel *channel, const gchar *line_term, gint length); extern const gchar * g_io_channel_get_line_term (GIOChannel *channel, gint *length); extern void g_io_channel_set_buffered (GIOChannel *channel, gboolean buffered); extern gboolean g_io_channel_get_buffered (GIOChannel *channel); extern GIOStatus g_io_channel_set_encoding (GIOChannel *channel, const gchar *encoding, GError **error); extern const gchar * g_io_channel_get_encoding (GIOChannel *channel); extern void g_io_channel_set_close_on_unref (GIOChannel *channel, gboolean do_close); extern gboolean g_io_channel_get_close_on_unref (GIOChannel *channel); extern GIOStatus g_io_channel_flush (GIOChannel *channel, GError **error); extern GIOStatus g_io_channel_read_line (GIOChannel *channel, gchar **str_return, gsize *length, gsize *terminator_pos, GError **error); extern GIOStatus g_io_channel_read_line_string (GIOChannel *channel, GString *buffer, gsize *terminator_pos, GError **error); extern GIOStatus g_io_channel_read_to_end (GIOChannel *channel, gchar **str_return, gsize *length, GError **error); extern GIOStatus g_io_channel_read_chars (GIOChannel *channel, gchar *buf, gsize count, gsize *bytes_read, GError **error); extern GIOStatus g_io_channel_read_unichar (GIOChannel *channel, gunichar *thechar, GError **error); extern GIOStatus g_io_channel_write_chars (GIOChannel *channel, const gchar *buf, gssize count, gsize *bytes_written, GError **error); extern GIOStatus g_io_channel_write_unichar (GIOChannel *channel, gunichar thechar, GError **error); extern GIOStatus g_io_channel_seek_position (GIOChannel *channel, gint64 offset, GSeekType type, GError **error); extern GIOChannel* g_io_channel_new_file (const gchar *filename, const gchar *mode, GError **error); /* Error handling */ extern GQuark g_io_channel_error_quark (void); extern GIOChannelError g_io_channel_error_from_errno (gint en); /* On Unix, IO channels created with this function for any file * descriptor or socket. * * On Win32, this can be used either for files opened with the MSVCRT * (the Microsoft run-time C library) _open() or _pipe, including file * descriptors 0, 1 and 2 (corresponding to stdin, stdout and stderr), * or for Winsock SOCKETs. If the parameter is a legal file * descriptor, it is assumed to be such, otherwise it should be a * SOCKET. This relies on SOCKETs and file descriptors not * overlapping. If you want to be certain, call either * g_io_channel_win32_new_fd() or g_io_channel_win32_new_socket() * instead as appropriate. * * The term file descriptor as used in the context of Win32 refers to * the emulated Unix-like file descriptors MSVCRT provides. The native * corresponding concept is file HANDLE. There isn't as of yet a way to * get GIOChannels for Win32 file HANDLEs. */ extern GIOChannel* g_io_channel_unix_new (int fd); extern gint g_io_channel_unix_get_fd (GIOChannel *channel); /* Hook for GClosure / GSource integration. Don't touch */ extern GSourceFuncs g_io_watch_funcs; # 402 "/usr/include/glib-2.0/glib/giochannel.h" # 55 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gkeyfile.h" 1 /* gkeyfile.h - desktop entry file parser * * Copyright 2004 Red Hat, Inc. * * Ray Strode * * 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 License * along with this library; if not, see . */ # 28 "/usr/include/glib-2.0/glib/gkeyfile.h" # 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 /* * Copyright © 2009, 2010 Codethink Limited * Copyright © 2011 Collabora Ltd. * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie * Stef Walter */ # 29 "/usr/include/glib-2.0/glib/gkeyfile.h" 2 # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 30 "/usr/include/glib-2.0/glib/gkeyfile.h" 2 typedef enum { G_KEY_FILE_ERROR_UNKNOWN_ENCODING, G_KEY_FILE_ERROR_PARSE, G_KEY_FILE_ERROR_NOT_FOUND, G_KEY_FILE_ERROR_KEY_NOT_FOUND, G_KEY_FILE_ERROR_GROUP_NOT_FOUND, G_KEY_FILE_ERROR_INVALID_VALUE } GKeyFileError; extern GQuark g_key_file_error_quark (void); typedef struct _GKeyFile GKeyFile; typedef enum { G_KEY_FILE_NONE = 0, G_KEY_FILE_KEEP_COMMENTS = 1 << 0, G_KEY_FILE_KEEP_TRANSLATIONS = 1 << 1 } GKeyFileFlags; extern GKeyFile *g_key_file_new (void); extern GKeyFile *g_key_file_ref (GKeyFile *key_file); extern void g_key_file_unref (GKeyFile *key_file); extern void g_key_file_free (GKeyFile *key_file); extern void g_key_file_set_list_separator (GKeyFile *key_file, gchar separator); extern gboolean g_key_file_load_from_file (GKeyFile *key_file, const gchar *file, GKeyFileFlags flags, GError **error); extern gboolean g_key_file_load_from_data (GKeyFile *key_file, const gchar *data, gsize length, GKeyFileFlags flags, GError **error); extern gboolean g_key_file_load_from_bytes (GKeyFile *key_file, GBytes *bytes, GKeyFileFlags flags, GError **error); extern gboolean g_key_file_load_from_dirs (GKeyFile *key_file, const gchar *file, const gchar **search_dirs, gchar **full_path, GKeyFileFlags flags, GError **error); extern gboolean g_key_file_load_from_data_dirs (GKeyFile *key_file, const gchar *file, gchar **full_path, GKeyFileFlags flags, GError **error); extern gchar *g_key_file_to_data (GKeyFile *key_file, gsize *length, GError **error) __attribute__((__malloc__)); extern gboolean g_key_file_save_to_file (GKeyFile *key_file, const gchar *filename, GError **error); extern gchar *g_key_file_get_start_group (GKeyFile *key_file) __attribute__((__malloc__)); extern gchar **g_key_file_get_groups (GKeyFile *key_file, gsize *length); extern gchar **g_key_file_get_keys (GKeyFile *key_file, const gchar *group_name, gsize *length, GError **error); extern gboolean g_key_file_has_group (GKeyFile *key_file, const gchar *group_name); extern gboolean g_key_file_has_key (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error); extern gchar *g_key_file_get_value (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error) __attribute__((__malloc__)); extern void g_key_file_set_value (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *value); extern gchar *g_key_file_get_string (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error) __attribute__((__malloc__)); extern void g_key_file_set_string (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *string); extern gchar *g_key_file_get_locale_string (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *locale, GError **error) __attribute__((__malloc__)); extern gchar *g_key_file_get_locale_for_key (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *locale) __attribute__((__malloc__)); extern void g_key_file_set_locale_string (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *locale, const gchar *string); extern gboolean g_key_file_get_boolean (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error); extern void g_key_file_set_boolean (GKeyFile *key_file, const gchar *group_name, const gchar *key, gboolean value); extern gint g_key_file_get_integer (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error); extern void g_key_file_set_integer (GKeyFile *key_file, const gchar *group_name, const gchar *key, gint value); extern gint64 g_key_file_get_int64 (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error); extern void g_key_file_set_int64 (GKeyFile *key_file, const gchar *group_name, const gchar *key, gint64 value); extern guint64 g_key_file_get_uint64 (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error); extern void g_key_file_set_uint64 (GKeyFile *key_file, const gchar *group_name, const gchar *key, guint64 value); extern gdouble g_key_file_get_double (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error); extern void g_key_file_set_double (GKeyFile *key_file, const gchar *group_name, const gchar *key, gdouble value); extern gchar **g_key_file_get_string_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gsize *length, GError **error); extern void g_key_file_set_string_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar * const list[], gsize length); extern gchar **g_key_file_get_locale_string_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *locale, gsize *length, GError **error); extern void g_key_file_set_locale_string_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *locale, const gchar * const list[], gsize length); extern gboolean *g_key_file_get_boolean_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gsize *length, GError **error) __attribute__((__malloc__)); extern void g_key_file_set_boolean_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gboolean list[], gsize length); extern gint *g_key_file_get_integer_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gsize *length, GError **error) __attribute__((__malloc__)); extern void g_key_file_set_double_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gdouble list[], gsize length); extern gdouble *g_key_file_get_double_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gsize *length, GError **error) __attribute__((__malloc__)); extern void g_key_file_set_integer_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gint list[], gsize length); extern gboolean g_key_file_set_comment (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *comment, GError **error); extern gchar *g_key_file_get_comment (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error) __attribute__((__malloc__)); extern gboolean g_key_file_remove_comment (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error); extern gboolean g_key_file_remove_key (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error); extern gboolean g_key_file_remove_group (GKeyFile *key_file, const gchar *group_name, GError **error); /* Defines for handling freedesktop.org Desktop files */ # 332 "/usr/include/glib-2.0/glib/gkeyfile.h" # 56 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/glist.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 57 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ /* This file must not include any other glib header file and must thus * not refer to variables from glibconfig.h */ # 58 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gmain.h" 1 /* gmain.h - the GLib Main loop * Copyright (C) 1998-2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 59 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gmappedfile.h" 1 /* GLIB - Library of useful routines for C programming * gmappedfile.h: Simplified wrapper around the mmap function * * Copyright 2005 Matthias Clasen * * 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 * License along with this library; if not, see . */ # 27 "/usr/include/glib-2.0/glib/gmappedfile.h" # 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 /* * Copyright © 2009, 2010 Codethink Limited * Copyright © 2011 Collabora Ltd. * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie * Stef Walter */ # 28 "/usr/include/glib-2.0/glib/gmappedfile.h" 2 # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 29 "/usr/include/glib-2.0/glib/gmappedfile.h" 2 typedef struct _GMappedFile GMappedFile; extern GMappedFile *g_mapped_file_new (const gchar *filename, gboolean writable, GError **error); extern GMappedFile *g_mapped_file_new_from_fd (gint fd, gboolean writable, GError **error); extern gsize g_mapped_file_get_length (GMappedFile *file); extern gchar *g_mapped_file_get_contents (GMappedFile *file); extern GBytes * g_mapped_file_get_bytes (GMappedFile *file); extern GMappedFile *g_mapped_file_ref (GMappedFile *file); extern void g_mapped_file_unref (GMappedFile *file); __attribute__((__deprecated__("Use '" "g_mapped_file_unref" "' instead"))) extern void g_mapped_file_free (GMappedFile *file); # 60 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gmarkup.h" 1 /* gmarkup.h - Simple XML-like string parser/writer * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gmarkup.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.15 Variable arguments */ # 27 "/usr/include/glib-2.0/glib/gmarkup.h" 2 # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 # 1 "/usr/include/glib-2.0/glib/gerror.h" /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 29 "/usr/include/glib-2.0/glib/gmarkup.h" 2 # 1 "/usr/include/glib-2.0/glib/gslist.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 30 "/usr/include/glib-2.0/glib/gmarkup.h" 2 /** * GMarkupError: * @G_MARKUP_ERROR_BAD_UTF8: text being parsed was not valid UTF-8 * @G_MARKUP_ERROR_EMPTY: document contained nothing, or only whitespace * @G_MARKUP_ERROR_PARSE: document was ill-formed * @G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser * functions; element wasn't known * @G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser * functions; attribute wasn't known * @G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser * functions; content was invalid * @G_MARKUP_ERROR_MISSING_ATTRIBUTE: error should be set by #GMarkupParser * functions; a required attribute was missing * * Error codes returned by markup parsing. */ typedef enum { G_MARKUP_ERROR_BAD_UTF8, G_MARKUP_ERROR_EMPTY, G_MARKUP_ERROR_PARSE, /* The following are primarily intended for specific GMarkupParser * implementations to set. */ G_MARKUP_ERROR_UNKNOWN_ELEMENT, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, G_MARKUP_ERROR_INVALID_CONTENT, G_MARKUP_ERROR_MISSING_ATTRIBUTE } GMarkupError; /** * G_MARKUP_ERROR: * * Error domain for markup parsing. * Errors in this domain will be from the #GMarkupError enumeration. * See #GError for information on error domains. */ extern GQuark g_markup_error_quark (void); /** * GMarkupParseFlags: * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked * sections are not passed literally to the @passthrough function of * the parser. Instead, the content of the section (without the * ``) is * passed to the @text function. This flag was added in GLib 2.12 * @G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup * itself have line/column information prefixed to them to let the * caller know the location of the error. When this flag is set the * location information is also prefixed to errors generated by the * #GMarkupParser implementation functions * @G_MARKUP_IGNORE_QUALIFIED: Ignore (don't report) qualified * attributes and tags, along with their contents. A qualified * attribute or tag is one that contains ':' in its name (ie: is in * another namespace). Since: 2.40. * * Flags that affect the behaviour of the parser. */ typedef enum { G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0, G_MARKUP_TREAT_CDATA_AS_TEXT = 1 << 1, G_MARKUP_PREFIX_ERROR_POSITION = 1 << 2, G_MARKUP_IGNORE_QUALIFIED = 1 << 3 } GMarkupParseFlags; /** * GMarkupParseContext: * * A parse context is used to parse a stream of bytes that * you expect to contain marked-up text. * * See g_markup_parse_context_new(), #GMarkupParser, and so * on for more details. */ typedef struct _GMarkupParseContext GMarkupParseContext; typedef struct _GMarkupParser GMarkupParser; /** * GMarkupParser: * @start_element: Callback to invoke when the opening tag of an element * is seen. The callback's @attribute_names and @attribute_values parameters * are %NULL-terminated. * @end_element: Callback to invoke when the closing tag of an element * is seen. Note that this is also called for empty tags like * ``. * @text: Callback to invoke when some text is seen (text is always * inside an element). Note that the text of an element may be spread * over multiple calls of this function. If the * %G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also * called for the content of CDATA marked sections. * @passthrough: Callback to invoke for comments, processing instructions * and doctype declarations; if you're re-writing the parsed document, * write the passthrough text back out in the same position. If the * %G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also * called for CDATA marked sections. * @error: Callback to invoke when an error occurs. * * Any of the fields in #GMarkupParser can be %NULL, in which case they * will be ignored. Except for the @error function, any of these callbacks * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT, * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT * errors are intended to be set from these callbacks. If you set an error * from a callback, g_markup_parse_context_parse() will report that error * back to its caller. */ struct _GMarkupParser { /* Called for open tags */ void (*start_element) (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error); /* Called for close tags */ void (*end_element) (GMarkupParseContext *context, const gchar *element_name, gpointer user_data, GError **error); /* Called for character data */ /* text is not nul-terminated */ void (*text) (GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error); /* Called for strings that should be re-saved verbatim in this same * position, but are not otherwise interpretable. At the moment * this includes comments and processing instructions. */ /* text is not nul-terminated. */ void (*passthrough) (GMarkupParseContext *context, const gchar *passthrough_text, gsize text_len, gpointer user_data, GError **error); /* Called on error, including one set by other * methods in the vtable. The GError should not be freed. */ void (*error) (GMarkupParseContext *context, GError *error, gpointer user_data); }; extern GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, GMarkupParseFlags flags, gpointer user_data, GDestroyNotify user_data_dnotify); extern GMarkupParseContext *g_markup_parse_context_ref (GMarkupParseContext *context); extern void g_markup_parse_context_unref (GMarkupParseContext *context); extern void g_markup_parse_context_free (GMarkupParseContext *context); extern gboolean g_markup_parse_context_parse (GMarkupParseContext *context, const gchar *text, gssize text_len, GError **error); extern void g_markup_parse_context_push (GMarkupParseContext *context, const GMarkupParser *parser, gpointer user_data); extern gpointer g_markup_parse_context_pop (GMarkupParseContext *context); extern gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, GError **error); extern const gchar * g_markup_parse_context_get_element (GMarkupParseContext *context); extern const GSList * g_markup_parse_context_get_element_stack (GMarkupParseContext *context); /* For user-constructed error messages, has no precise semantics */ extern void g_markup_parse_context_get_position (GMarkupParseContext *context, gint *line_number, gint *char_number); extern gpointer g_markup_parse_context_get_user_data (GMarkupParseContext *context); /* useful when saving */ extern gchar* g_markup_escape_text (const gchar *text, gssize length); extern gchar *g_markup_printf_escaped (const char *format, ...) __attribute__((__format__ (__printf__, 1, 2))); extern gchar *g_markup_vprintf_escaped (const char *format, va_list args) __attribute__((__format__ (__printf__, 1, 0))); typedef enum { G_MARKUP_COLLECT_INVALID, G_MARKUP_COLLECT_STRING, G_MARKUP_COLLECT_STRDUP, G_MARKUP_COLLECT_BOOLEAN, G_MARKUP_COLLECT_TRISTATE, G_MARKUP_COLLECT_OPTIONAL = (1 << 16) } GMarkupCollectType; /* useful from start_element */ extern gboolean g_markup_collect_attributes (const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, GError **error, GMarkupCollectType first_type, const gchar *first_attr, ...); # 61 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 62 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gmessages.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gmessages.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.15 Variable arguments */ # 33 "/usr/include/glib-2.0/glib/gmessages.h" 2 # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 # 1 "/usr/include/glib-2.0/glib/gtypes.h" /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 34 "/usr/include/glib-2.0/glib/gmessages.h" 2 # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ /* This file must not include any other glib header file and must thus * not refer to variables from glibconfig.h */ # 35 "/usr/include/glib-2.0/glib/gmessages.h" 2 # 1 "/usr/include/glib-2.0/glib/gvariant.h" 1 /* * Copyright © 2007, 2008 Ryan Lortie * Copyright © 2009, 2010 Codethink Limited * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ # 28 "/usr/include/glib-2.0/glib/gvariant.h" # 1 "/usr/include/glib-2.0/glib/gvarianttype.h" 1 /* * Copyright © 2007, 2008 Ryan Lortie * Copyright © 2009, 2010 Codethink Limited * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ # 28 "/usr/include/glib-2.0/glib/gvarianttype.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 29 "/usr/include/glib-2.0/glib/gvarianttype.h" 2 /** * GVariantType: * * A type in the GVariant type system. * * Two types may not be compared by value; use g_variant_type_equal() or * g_variant_type_is_subtype_of(). May be copied using * g_variant_type_copy() and freed using g_variant_type_free(). **/ typedef struct _GVariantType GVariantType; /** * G_VARIANT_TYPE_BOOLEAN: * * The type of a value that can be either %TRUE or %FALSE. **/ /** * G_VARIANT_TYPE_BYTE: * * The type of an integer value that can range from 0 to 255. **/ /** * G_VARIANT_TYPE_INT16: * * The type of an integer value that can range from -32768 to 32767. **/ /** * G_VARIANT_TYPE_UINT16: * * The type of an integer value that can range from 0 to 65535. * There were about this many people living in Toronto in the 1870s. **/ /** * G_VARIANT_TYPE_INT32: * * The type of an integer value that can range from -2147483648 to * 2147483647. **/ /** * G_VARIANT_TYPE_UINT32: * * The type of an integer value that can range from 0 to 4294967295. * That's one number for everyone who was around in the late 1970s. **/ /** * G_VARIANT_TYPE_INT64: * * The type of an integer value that can range from * -9223372036854775808 to 9223372036854775807. **/ /** * G_VARIANT_TYPE_UINT64: * * The type of an integer value that can range from 0 * to 18446744073709551615 (inclusive). That's a really big number, * but a Rubik's cube can have a bit more than twice as many possible * positions. **/ /** * G_VARIANT_TYPE_DOUBLE: * * The type of a double precision IEEE754 floating point number. * These guys go up to about 1.80e308 (plus and minus) but miss out on * some numbers in between. In any case, that's far greater than the * estimated number of fundamental particles in the observable * universe. **/ /** * G_VARIANT_TYPE_STRING: * * The type of a string. "" is a string. %NULL is not a string. **/ /** * G_VARIANT_TYPE_OBJECT_PATH: * * The type of a D-Bus object reference. These are strings of a * specific format used to identify objects at a given destination on * the bus. * * If you are not interacting with D-Bus, then there is no reason to make * use of this type. If you are, then the D-Bus specification contains a * precise description of valid object paths. **/ /** * G_VARIANT_TYPE_SIGNATURE: * * The type of a D-Bus type signature. These are strings of a specific * format used as type signatures for D-Bus methods and messages. * * If you are not interacting with D-Bus, then there is no reason to make * use of this type. If you are, then the D-Bus specification contains a * precise description of valid signature strings. **/ /** * G_VARIANT_TYPE_VARIANT: * * The type of a box that contains any other value (including another * variant). **/ /** * G_VARIANT_TYPE_HANDLE: * * The type of a 32bit signed integer value, that by convention, is used * as an index into an array of file descriptors that are sent alongside * a D-Bus message. * * If you are not interacting with D-Bus, then there is no reason to make * use of this type. **/ /** * G_VARIANT_TYPE_UNIT: * * The empty tuple type. Has only one instance. Known also as "triv" * or "void". **/ /** * G_VARIANT_TYPE_ANY: * * An indefinite type that is a supertype of every type (including * itself). **/ /** * G_VARIANT_TYPE_BASIC: * * An indefinite type that is a supertype of every basic (ie: * non-container) type. **/ /** * G_VARIANT_TYPE_MAYBE: * * An indefinite type that is a supertype of every maybe type. **/ /** * G_VARIANT_TYPE_ARRAY: * * An indefinite type that is a supertype of every array type. **/ /** * G_VARIANT_TYPE_TUPLE: * * An indefinite type that is a supertype of every tuple type, * regardless of the number of items in the tuple. **/ /** * G_VARIANT_TYPE_DICT_ENTRY: * * An indefinite type that is a supertype of every dictionary entry * type. **/ /** * G_VARIANT_TYPE_DICTIONARY: * * An indefinite type that is a supertype of every dictionary type -- * that is, any array type that has an element type equal to any * dictionary entry type. **/ /** * G_VARIANT_TYPE_STRING_ARRAY: * * The type of an array of strings. **/ /** * G_VARIANT_TYPE_OBJECT_PATH_ARRAY: * * The type of an array of object paths. **/ /** * G_VARIANT_TYPE_BYTESTRING: * * The type of an array of bytes. This type is commonly used to pass * around strings that may not be valid utf8. In that case, the * convention is that the nul terminator character should be included as * the last character in the array. **/ /** * G_VARIANT_TYPE_BYTESTRING_ARRAY: * * The type of an array of byte strings (an array of arrays of bytes). **/ /** * G_VARIANT_TYPE_VARDICT: * * The type of a dictionary mapping strings to variants (the ubiquitous * "a{sv}" type). * * Since: 2.30 **/ /** * G_VARIANT_TYPE: * @type_string: a well-formed #GVariantType type string * * Converts a string to a const #GVariantType. Depending on the * current debugging level, this function may perform a runtime check * to ensure that @string is a valid GVariant type string. * * It is always a programmer error to use this macro with an invalid * type string. If in doubt, use g_variant_type_string_is_valid() to * check if the string is valid. * * Since 2.24 **/ /* type string checking */ extern gboolean g_variant_type_string_is_valid (const gchar *type_string); extern gboolean g_variant_type_string_scan (const gchar *string, const gchar *limit, const gchar **endptr); /* create/destroy */ extern void g_variant_type_free (GVariantType *type); extern GVariantType * g_variant_type_copy (const GVariantType *type); extern GVariantType * g_variant_type_new (const gchar *type_string); /* getters */ extern gsize g_variant_type_get_string_length (const GVariantType *type); extern const gchar * g_variant_type_peek_string (const GVariantType *type); extern gchar * g_variant_type_dup_string (const GVariantType *type); /* classification */ extern gboolean g_variant_type_is_definite (const GVariantType *type); extern gboolean g_variant_type_is_container (const GVariantType *type); extern gboolean g_variant_type_is_basic (const GVariantType *type); extern gboolean g_variant_type_is_maybe (const GVariantType *type); extern gboolean g_variant_type_is_array (const GVariantType *type); extern gboolean g_variant_type_is_tuple (const GVariantType *type); extern gboolean g_variant_type_is_dict_entry (const GVariantType *type); extern gboolean g_variant_type_is_variant (const GVariantType *type); /* for hash tables */ extern guint g_variant_type_hash (gconstpointer type); extern gboolean g_variant_type_equal (gconstpointer type1, gconstpointer type2); /* subtypes */ extern gboolean g_variant_type_is_subtype_of (const GVariantType *type, const GVariantType *supertype); /* type iterator interface */ extern const GVariantType * g_variant_type_element (const GVariantType *type); extern const GVariantType * g_variant_type_first (const GVariantType *type); extern const GVariantType * g_variant_type_next (const GVariantType *type); extern gsize g_variant_type_n_items (const GVariantType *type); extern const GVariantType * g_variant_type_key (const GVariantType *type); extern const GVariantType * g_variant_type_value (const GVariantType *type); /* constructors */ extern GVariantType * g_variant_type_new_array (const GVariantType *element); extern GVariantType * g_variant_type_new_maybe (const GVariantType *element); extern GVariantType * g_variant_type_new_tuple (const GVariantType * const *items, gint length); extern GVariantType * g_variant_type_new_dict_entry (const GVariantType *key, const GVariantType *value); /*< private >*/ extern const GVariantType * g_variant_type_checked_ (const gchar *); extern gsize g_variant_type_string_get_depth_ (const gchar *type_string); # 29 "/usr/include/glib-2.0/glib/gvariant.h" 2 # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 30 "/usr/include/glib-2.0/glib/gvariant.h" 2 # 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 /* * Copyright © 2009, 2010 Codethink Limited * Copyright © 2011 Collabora Ltd. * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie * Stef Walter */ # 31 "/usr/include/glib-2.0/glib/gvariant.h" 2 typedef struct _GVariant GVariant; typedef enum { G_VARIANT_CLASS_BOOLEAN = 'b', G_VARIANT_CLASS_BYTE = 'y', G_VARIANT_CLASS_INT16 = 'n', G_VARIANT_CLASS_UINT16 = 'q', G_VARIANT_CLASS_INT32 = 'i', G_VARIANT_CLASS_UINT32 = 'u', G_VARIANT_CLASS_INT64 = 'x', G_VARIANT_CLASS_UINT64 = 't', G_VARIANT_CLASS_HANDLE = 'h', G_VARIANT_CLASS_DOUBLE = 'd', G_VARIANT_CLASS_STRING = 's', G_VARIANT_CLASS_OBJECT_PATH = 'o', G_VARIANT_CLASS_SIGNATURE = 'g', G_VARIANT_CLASS_VARIANT = 'v', G_VARIANT_CLASS_MAYBE = 'm', G_VARIANT_CLASS_ARRAY = 'a', G_VARIANT_CLASS_TUPLE = '(', G_VARIANT_CLASS_DICT_ENTRY = '{' } GVariantClass; extern void g_variant_unref (GVariant *value); extern GVariant * g_variant_ref (GVariant *value); extern GVariant * g_variant_ref_sink (GVariant *value); extern gboolean g_variant_is_floating (GVariant *value); extern GVariant * g_variant_take_ref (GVariant *value); extern const GVariantType * g_variant_get_type (GVariant *value); extern const gchar * g_variant_get_type_string (GVariant *value); extern gboolean g_variant_is_of_type (GVariant *value, const GVariantType *type); extern gboolean g_variant_is_container (GVariant *value); extern GVariantClass g_variant_classify (GVariant *value); extern GVariant * g_variant_new_boolean (gboolean value); extern GVariant * g_variant_new_byte (guchar value); extern GVariant * g_variant_new_int16 (gint16 value); extern GVariant * g_variant_new_uint16 (guint16 value); extern GVariant * g_variant_new_int32 (gint32 value); extern GVariant * g_variant_new_uint32 (guint32 value); extern GVariant * g_variant_new_int64 (gint64 value); extern GVariant * g_variant_new_uint64 (guint64 value); extern GVariant * g_variant_new_handle (gint32 value); extern GVariant * g_variant_new_double (gdouble value); extern GVariant * g_variant_new_string (const gchar *string); extern GVariant * g_variant_new_take_string (gchar *string); extern GVariant * g_variant_new_printf (const gchar *format_string, ...) __attribute__((__format__ (__printf__, 1, 2))); extern GVariant * g_variant_new_object_path (const gchar *object_path); extern gboolean g_variant_is_object_path (const gchar *string); extern GVariant * g_variant_new_signature (const gchar *signature); extern gboolean g_variant_is_signature (const gchar *string); extern GVariant * g_variant_new_variant (GVariant *value); extern GVariant * g_variant_new_strv (const gchar * const *strv, gssize length); extern GVariant * g_variant_new_objv (const gchar * const *strv, gssize length); extern GVariant * g_variant_new_bytestring (const gchar *string); extern GVariant * g_variant_new_bytestring_array (const gchar * const *strv, gssize length); extern GVariant * g_variant_new_fixed_array (const GVariantType *element_type, gconstpointer elements, gsize n_elements, gsize element_size); extern gboolean g_variant_get_boolean (GVariant *value); extern guchar g_variant_get_byte (GVariant *value); extern gint16 g_variant_get_int16 (GVariant *value); extern guint16 g_variant_get_uint16 (GVariant *value); extern gint32 g_variant_get_int32 (GVariant *value); extern guint32 g_variant_get_uint32 (GVariant *value); extern gint64 g_variant_get_int64 (GVariant *value); extern guint64 g_variant_get_uint64 (GVariant *value); extern gint32 g_variant_get_handle (GVariant *value); extern gdouble g_variant_get_double (GVariant *value); extern GVariant * g_variant_get_variant (GVariant *value); extern const gchar * g_variant_get_string (GVariant *value, gsize *length); extern gchar * g_variant_dup_string (GVariant *value, gsize *length); extern const gchar ** g_variant_get_strv (GVariant *value, gsize *length); extern gchar ** g_variant_dup_strv (GVariant *value, gsize *length); extern const gchar ** g_variant_get_objv (GVariant *value, gsize *length); extern gchar ** g_variant_dup_objv (GVariant *value, gsize *length); extern const gchar * g_variant_get_bytestring (GVariant *value); extern gchar * g_variant_dup_bytestring (GVariant *value, gsize *length); extern const gchar ** g_variant_get_bytestring_array (GVariant *value, gsize *length); extern gchar ** g_variant_dup_bytestring_array (GVariant *value, gsize *length); extern GVariant * g_variant_new_maybe (const GVariantType *child_type, GVariant *child); extern GVariant * g_variant_new_array (const GVariantType *child_type, GVariant * const *children, gsize n_children); extern GVariant * g_variant_new_tuple (GVariant * const *children, gsize n_children); extern GVariant * g_variant_new_dict_entry (GVariant *key, GVariant *value); extern GVariant * g_variant_get_maybe (GVariant *value); extern gsize g_variant_n_children (GVariant *value); extern void g_variant_get_child (GVariant *value, gsize index_, const gchar *format_string, ...); extern GVariant * g_variant_get_child_value (GVariant *value, gsize index_); extern gboolean g_variant_lookup (GVariant *dictionary, const gchar *key, const gchar *format_string, ...); extern GVariant * g_variant_lookup_value (GVariant *dictionary, const gchar *key, const GVariantType *expected_type); extern gconstpointer g_variant_get_fixed_array (GVariant *value, gsize *n_elements, gsize element_size); extern gsize g_variant_get_size (GVariant *value); extern gconstpointer g_variant_get_data (GVariant *value); extern GBytes * g_variant_get_data_as_bytes (GVariant *value); extern void g_variant_store (GVariant *value, gpointer data); extern gchar * g_variant_print (GVariant *value, gboolean type_annotate); extern GString * g_variant_print_string (GVariant *value, GString *string, gboolean type_annotate); extern guint g_variant_hash (gconstpointer value); extern gboolean g_variant_equal (gconstpointer one, gconstpointer two); extern GVariant * g_variant_get_normal_form (GVariant *value); extern gboolean g_variant_is_normal_form (GVariant *value); extern GVariant * g_variant_byteswap (GVariant *value); extern GVariant * g_variant_new_from_bytes (const GVariantType *type, GBytes *bytes, gboolean trusted); extern GVariant * g_variant_new_from_data (const GVariantType *type, gconstpointer data, gsize size, gboolean trusted, GDestroyNotify notify, gpointer user_data); typedef struct _GVariantIter GVariantIter; struct _GVariantIter { /*< private >*/ gsize x[16]; }; extern GVariantIter * g_variant_iter_new (GVariant *value); extern gsize g_variant_iter_init (GVariantIter *iter, GVariant *value); extern GVariantIter * g_variant_iter_copy (GVariantIter *iter); extern gsize g_variant_iter_n_children (GVariantIter *iter); extern void g_variant_iter_free (GVariantIter *iter); extern GVariant * g_variant_iter_next_value (GVariantIter *iter); extern gboolean g_variant_iter_next (GVariantIter *iter, const gchar *format_string, ...); extern gboolean g_variant_iter_loop (GVariantIter *iter, const gchar *format_string, ...); typedef struct _GVariantBuilder GVariantBuilder; struct _GVariantBuilder { /*< private >*/ union { struct { gsize partial_magic; const GVariantType *type; gsize y[14]; } s; gsize x[16]; } u; }; typedef enum { G_VARIANT_PARSE_ERROR_FAILED, G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED, G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE, G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED, G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END, G_VARIANT_PARSE_ERROR_INVALID_CHARACTER, G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING, G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH, G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE, G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING, G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE, G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE, G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG, G_VARIANT_PARSE_ERROR_TYPE_ERROR, G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN, G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD, G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT, G_VARIANT_PARSE_ERROR_VALUE_EXPECTED } GVariantParseError; __attribute__((__deprecated__("Use '" "g_variant_parse_error_quark" "' instead"))) extern GQuark g_variant_parser_get_error_quark (void); extern GQuark g_variant_parse_error_quark (void); /** * G_VARIANT_BUILDER_INIT: * @variant_type: a const GVariantType* * * A stack-allocated #GVariantBuilder must be initialized if it is * used together with g_auto() to avoid warnings or crashes if * function returns before g_variant_builder_init() is called on the * builder. This macro can be used as initializer instead of an * explicit zeroing a variable when declaring it and a following * g_variant_builder_init(), but it cannot be assigned to a variable. * * The passed @variant_type should be a static GVariantType to avoid * lifetime issues, as copying the @variant_type does not happen in * the G_VARIANT_BUILDER_INIT() call, but rather in functions that * make sure that #GVariantBuilder is valid. * * |[ * g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_BYTESTRING); * ]| * * Since: 2.50 */ extern GVariantBuilder * g_variant_builder_new (const GVariantType *type); extern void g_variant_builder_unref (GVariantBuilder *builder); extern GVariantBuilder * g_variant_builder_ref (GVariantBuilder *builder); extern void g_variant_builder_init (GVariantBuilder *builder, const GVariantType *type); extern GVariant * g_variant_builder_end (GVariantBuilder *builder); extern void g_variant_builder_clear (GVariantBuilder *builder); extern void g_variant_builder_open (GVariantBuilder *builder, const GVariantType *type); extern void g_variant_builder_close (GVariantBuilder *builder); extern void g_variant_builder_add_value (GVariantBuilder *builder, GVariant *value); extern void g_variant_builder_add (GVariantBuilder *builder, const gchar *format_string, ...); extern void g_variant_builder_add_parsed (GVariantBuilder *builder, const gchar *format, ...); extern GVariant * g_variant_new (const gchar *format_string, ...); extern void g_variant_get (GVariant *value, const gchar *format_string, ...); extern GVariant * g_variant_new_va (const gchar *format_string, const gchar **endptr, va_list *app); extern void g_variant_get_va (GVariant *value, const gchar *format_string, const gchar **endptr, va_list *app); extern gboolean g_variant_check_format_string (GVariant *value, const gchar *format_string, gboolean copy_only); extern GVariant * g_variant_parse (const GVariantType *type, const gchar *text, const gchar *limit, const gchar **endptr, GError **error); extern GVariant * g_variant_new_parsed (const gchar *format, ...); extern GVariant * g_variant_new_parsed_va (const gchar *format, va_list *app); extern gchar * g_variant_parse_error_print_context (GError *error, const gchar *source_str); extern gint g_variant_compare (gconstpointer one, gconstpointer two); typedef struct _GVariantDict GVariantDict; struct _GVariantDict { /*< private >*/ union { struct { GVariant *asv; gsize partial_magic; gsize y[14]; } s; gsize x[16]; } u; }; /** * G_VARIANT_DICT_INIT: * @asv: (nullable): a GVariant* * * A stack-allocated #GVariantDict must be initialized if it is used * together with g_auto() to avoid warnings or crashes if function * returns before g_variant_dict_init() is called on the builder. * This macro can be used as initializer instead of an explicit * zeroing a variable when declaring it and a following * g_variant_dict_init(), but it cannot be assigned to a variable. * * The passed @asv has to live long enough for #GVariantDict to gather * the entries from, as the gathering does not happen in the * G_VARIANT_DICT_INIT() call, but rather in functions that make sure * that #GVariantDict is valid. In context where the initialization * value has to be a constant expression, the only possible value of * @asv is %NULL. It is still possible to call g_variant_dict_init() * safely with a different @asv right after the variable was * initialized with G_VARIANT_DICT_INIT(). * * |[ * g_autoptr(GVariant) variant = get_asv_variant (); * g_auto(GVariantDict) dict = G_VARIANT_DICT_INIT (variant); * ]| * * Since: 2.50 */ extern GVariantDict * g_variant_dict_new (GVariant *from_asv); extern void g_variant_dict_init (GVariantDict *dict, GVariant *from_asv); extern gboolean g_variant_dict_lookup (GVariantDict *dict, const gchar *key, const gchar *format_string, ...); extern GVariant * g_variant_dict_lookup_value (GVariantDict *dict, const gchar *key, const GVariantType *expected_type); extern gboolean g_variant_dict_contains (GVariantDict *dict, const gchar *key); extern void g_variant_dict_insert (GVariantDict *dict, const gchar *key, const gchar *format_string, ...); extern void g_variant_dict_insert_value (GVariantDict *dict, const gchar *key, GVariant *value); extern gboolean g_variant_dict_remove (GVariantDict *dict, const gchar *key); extern void g_variant_dict_clear (GVariantDict *dict); extern GVariant * g_variant_dict_end (GVariantDict *dict); extern GVariantDict * g_variant_dict_ref (GVariantDict *dict); extern void g_variant_dict_unref (GVariantDict *dict); # 36 "/usr/include/glib-2.0/glib/gmessages.h" 2 /* calculate a string size, guaranteed to fit format + args. */ extern gsize g_printf_string_upper_bound (const gchar* format, va_list args) __attribute__((__format__ (__printf__, 1, 0))); /* Log level shift offset for user defined * log levels (0-7 are used by GLib). */ /* Glib log levels and flags. */ typedef enum { /* log flags */ G_LOG_FLAG_RECURSION = 1 << 0, G_LOG_FLAG_FATAL = 1 << 1, /* GLib log levels */ G_LOG_LEVEL_ERROR = 1 << 2, /* always fatal */ G_LOG_LEVEL_CRITICAL = 1 << 3, G_LOG_LEVEL_WARNING = 1 << 4, G_LOG_LEVEL_MESSAGE = 1 << 5, G_LOG_LEVEL_INFO = 1 << 6, G_LOG_LEVEL_DEBUG = 1 << 7, G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL) } GLogLevelFlags; /* GLib log levels that are considered fatal by default */ typedef void (*GLogFunc) (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data); /* Logging mechanism */ extern guint g_log_set_handler (const gchar *log_domain, GLogLevelFlags log_levels, GLogFunc log_func, gpointer user_data); extern guint g_log_set_handler_full (const gchar *log_domain, GLogLevelFlags log_levels, GLogFunc log_func, gpointer user_data, GDestroyNotify destroy); extern void g_log_remove_handler (const gchar *log_domain, guint handler_id); extern void g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data); extern GLogFunc g_log_set_default_handler (GLogFunc log_func, gpointer user_data); extern void g_log (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, ...) __attribute__((__format__ (__printf__, 3, 4))); extern void g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args) __attribute__((__format__ (__printf__, 3, 0))); extern GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask); extern GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); /* Structured logging mechanism. */ /** * GLogWriterOutput: * @G_LOG_WRITER_HANDLED: Log writer has handled the log entry. * @G_LOG_WRITER_UNHANDLED: Log writer could not handle the log entry. * * Return values from #GLogWriterFuncs to indicate whether the given log entry * was successfully handled by the writer, or whether there was an error in * handling it (and hence a fallback writer should be used). * * If a #GLogWriterFunc ignores a log entry, it should return * %G_LOG_WRITER_HANDLED. * * Since: 2.50 */ typedef enum { G_LOG_WRITER_HANDLED = 1, G_LOG_WRITER_UNHANDLED = 0, } GLogWriterOutput; /** * GLogField: * @key: field name (UTF-8 string) * @value: field value (arbitrary bytes) * @length: length of @value, in bytes, or -1 if it is nul-terminated * * Structure representing a single field in a structured log entry. See * g_log_structured() for details. * * Log fields may contain arbitrary values, including binary with embedded nul * bytes. If the field contains a string, the string must be UTF-8 encoded and * have a trailing nul byte. Otherwise, @length must be set to a non-negative * value. * * Since: 2.50 */ typedef struct _GLogField GLogField; struct _GLogField { const gchar *key; gconstpointer value; gssize length; }; /** * GLogWriterFunc: * @log_level: log level of the message * @fields: (array length=n_fields): fields forming the message * @n_fields: number of @fields * @user_data: user data passed to g_log_set_writer_func() * * Writer function for log entries. A log entry is a collection of one or more * #GLogFields, using the standard [field names from journal * specification](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html). * See g_log_structured() for more information. * * Writer functions must ignore fields which they do not recognise, unless they * can write arbitrary binary output, as field values may be arbitrary binary. * * @log_level is guaranteed to be included in @fields as the `PRIORITY` field, * but is provided separately for convenience of deciding whether or where to * output the log entry. * * Writer functions should return %G_LOG_WRITER_HANDLED if they handled the log * message successfully or if they deliberately ignored it. If there was an * error handling the message (for example, if the writer function is meant to * send messages to a remote logging server and there is a network error), it * should return %G_LOG_WRITER_UNHANDLED. This allows writer functions to be * chained and fall back to simpler handlers in case of failure. * * Returns: %G_LOG_WRITER_HANDLED if the log entry was handled successfully; * %G_LOG_WRITER_UNHANDLED otherwise * Since: 2.50 */ typedef GLogWriterOutput (*GLogWriterFunc) (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data); extern void g_log_structured (const gchar *log_domain, GLogLevelFlags log_level, ...); extern void g_log_structured_array (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields); extern void g_log_variant (const gchar *log_domain, GLogLevelFlags log_level, GVariant *fields); extern void g_log_set_writer_func (GLogWriterFunc func, gpointer user_data, GDestroyNotify user_data_free); extern gboolean g_log_writer_supports_color (gint output_fd); extern gboolean g_log_writer_is_journald (gint output_fd); extern gchar *g_log_writer_format_fields (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gboolean use_color); extern GLogWriterOutput g_log_writer_journald (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data); extern GLogWriterOutput g_log_writer_standard_streams (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data); extern GLogWriterOutput g_log_writer_default (GLogLevelFlags log_level, const GLogField *fields, gsize n_fields, gpointer user_data); /** * G_DEBUG_HERE: * * A convenience form of g_log_structured(), recommended to be added to * functions when debugging. It prints the current monotonic time and the code * location using %G_STRLOC. * * Since: 2.50 */ # 261 "/usr/include/glib-2.0/glib/gmessages.h" /* internal */ void _g_log_fallback_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data); /* Internal functions, used to implement the following macros */ extern void g_return_if_fail_warning (const char *log_domain, const char *pretty_function, const char *expression) ; extern void g_warn_message (const char *domain, const char *file, int line, const char *func, const char *warnexpr) ; __attribute__((__deprecated__)) extern void g_assert_warning (const char *log_domain, const char *file, const int line, const char *pretty_function, const char *expression) __attribute__((__noreturn__)); extern void g_log_structured_standard (const gchar *log_domain, GLogLevelFlags log_level, const gchar *file, const gchar *line, const gchar *func, const gchar *message_format, ...) __attribute__((__format__ (__printf__, 6, 7))); # 322 "/usr/include/glib-2.0/glib/gmessages.h" /* for(;;) ; so that GCC knows that control doesn't go past g_error(). * Put space before ending semicolon to avoid C++ build warnings. */ # 456 "/usr/include/glib-2.0/glib/gmessages.h" /** * GPrintFunc: * @string: the message to output * * Specifies the type of the print handler functions. * These are called with the complete formatted string to output. */ typedef void (*GPrintFunc) (const gchar *string); extern void g_print (const gchar *format, ...) __attribute__((__format__ (__printf__, 1, 2))); extern GPrintFunc g_set_print_handler (GPrintFunc func); extern void g_printerr (const gchar *format, ...) __attribute__((__format__ (__printf__, 1, 2))); extern GPrintFunc g_set_printerr_handler (GPrintFunc func); /** * g_warn_if_reached: * * Logs a warning. * * Since: 2.16 */ /** * g_warn_if_fail: * @expr: the expression to check * * Logs a warning if the expression is not true. * * Since: 2.16 */ # 622 "/usr/include/glib-2.0/glib/gmessages.h" # 63 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gnode.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 64 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/goption.h" 1 /* goption.h - Option parser * * Copyright (C) 2004 Anders Carlsson * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/goption.h" # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 27 "/usr/include/glib-2.0/glib/goption.h" 2 # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 28 "/usr/include/glib-2.0/glib/goption.h" 2 /** * GOptionContext: * * A `GOptionContext` struct defines which options * are accepted by the commandline option parser. The struct has only private * fields and should not be directly accessed. */ typedef struct _GOptionContext GOptionContext; /** * GOptionGroup: * * A `GOptionGroup` struct defines the options in a single * group. The struct has only private fields and should not be directly accessed. * * All options in a group share the same translation function. Libraries which * need to parse commandline options are expected to provide a function for * getting a `GOptionGroup` holding their options, which * the application can then add to its #GOptionContext. */ typedef struct _GOptionGroup GOptionGroup; typedef struct _GOptionEntry GOptionEntry; /** * GOptionFlags: * @G_OPTION_FLAG_NONE: No flags. Since: 2.42. * @G_OPTION_FLAG_HIDDEN: The option doesn't appear in `--help` output. * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the * `--help` output, even if it is defined in a group. * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this * flag indicates that the sense of the option is reversed. * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, * this flag indicates that the callback does not take any argument * (like a %G_OPTION_ARG_NONE option). Since 2.8 * @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK * kind, this flag indicates that the argument should be passed to the * callback in the GLib filename encoding rather than UTF-8. Since 2.8 * @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK * kind, this flag indicates that the argument supply is optional. * If no argument is given then data of %GOptionParseFunc will be * set to NULL. Since 2.8 * @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict * resolution which prefixes long option names with `groupname-` if * there is a conflict. This option should only be used in situations * where aliasing is necessary to model some legacy commandline interface. * It is not safe to use this option, unless all option groups are under * your direct control. Since 2.8. * * Flags which modify individual options. */ typedef enum { G_OPTION_FLAG_NONE = 0, G_OPTION_FLAG_HIDDEN = 1 << 0, G_OPTION_FLAG_IN_MAIN = 1 << 1, G_OPTION_FLAG_REVERSE = 1 << 2, G_OPTION_FLAG_NO_ARG = 1 << 3, G_OPTION_FLAG_FILENAME = 1 << 4, G_OPTION_FLAG_OPTIONAL_ARG = 1 << 5, G_OPTION_FLAG_NOALIAS = 1 << 6 } GOptionFlags; /** * GOptionArg: * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags. * @G_OPTION_ARG_STRING: The option takes a string argument. * @G_OPTION_ARG_INT: The option takes an integer argument. * @G_OPTION_ARG_CALLBACK: The option provides a callback (of type * #GOptionArgFunc) to parse the extra argument. * @G_OPTION_ARG_FILENAME: The option takes a filename as argument. * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple * uses of the option are collected into an array of strings. * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, * multiple uses of the option are collected into an array of strings. * @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument * can be formatted either for the user's locale or for the "C" locale. * Since 2.12 * @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like * %G_OPTION_ARG_INT but for larger numbers. The number can be in * decimal base, or in hexadecimal (when prefixed with `0x`, for * example, `0xffffffff`). Since 2.12 * * The #GOptionArg enum values determine which type of extra argument the * options expect to find. If an option expects an extra argument, it can * be specified in several ways; with a short option: `-x arg`, with a long * option: `--name arg` or combined in a single argument: `--name=arg`. */ typedef enum { G_OPTION_ARG_NONE, G_OPTION_ARG_STRING, G_OPTION_ARG_INT, G_OPTION_ARG_CALLBACK, G_OPTION_ARG_FILENAME, G_OPTION_ARG_STRING_ARRAY, G_OPTION_ARG_FILENAME_ARRAY, G_OPTION_ARG_DOUBLE, G_OPTION_ARG_INT64 } GOptionArg; /** * GOptionArgFunc: * @option_name: The name of the option being parsed. This will be either a * single dash followed by a single letter (for a short name) or two dashes * followed by a long option name. * @value: The value to be parsed. * @data: User data added to the #GOptionGroup containing the option when it * was created with g_option_group_new() * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED * is intended to be used for errors in #GOptionArgFunc callbacks. * * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK * options. * * Returns: %TRUE if the option was successfully parsed, %FALSE if an error * occurred, in which case @error should be set with g_set_error() */ typedef gboolean (*GOptionArgFunc) (const gchar *option_name, const gchar *value, gpointer data, GError **error); /** * GOptionParseFunc: * @context: The active #GOptionContext * @group: The group to which the function belongs * @data: User data added to the #GOptionGroup containing the option when it * was created with g_option_group_new() * @error: A return location for error details * * The type of function that can be called before and after parsing. * * Returns: %TRUE if the function completed successfully, %FALSE if an error * occurred, in which case @error should be set with g_set_error() */ typedef gboolean (*GOptionParseFunc) (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error); /** * GOptionErrorFunc: * @context: The active #GOptionContext * @group: The group to which the function belongs * @data: User data added to the #GOptionGroup containing the option when it * was created with g_option_group_new() * @error: The #GError containing details about the parse error * * The type of function to be used as callback when a parse error occurs. */ typedef void (*GOptionErrorFunc) (GOptionContext *context, GOptionGroup *group, gpointer data, GError **error); /** * G_OPTION_ERROR: * * Error domain for option parsing. Errors in this domain will * be from the #GOptionError enumeration. See #GError for information on * error domains. */ /** * GOptionError: * @G_OPTION_ERROR_UNKNOWN_OPTION: An option was not known to the parser. * This error will only be reported, if the parser hasn't been instructed * to ignore unknown options, see g_option_context_set_ignore_unknown_options(). * @G_OPTION_ERROR_BAD_VALUE: A value couldn't be parsed. * @G_OPTION_ERROR_FAILED: A #GOptionArgFunc callback failed. * * Error codes returned by option parsing. */ typedef enum { G_OPTION_ERROR_UNKNOWN_OPTION, G_OPTION_ERROR_BAD_VALUE, G_OPTION_ERROR_FAILED } GOptionError; extern GQuark g_option_error_quark (void); /** * GOptionEntry: * @long_name: The long name of an option can be used to specify it * in a commandline as `--long_name`. Every option must have a * long name. To resolve conflicts if multiple option groups contain * the same long name, it is also possible to specify the option as * `--groupname-long_name`. * @short_name: If an option has a short name, it can be specified * `-short_name` in a commandline. @short_name must be a printable * ASCII character different from '-', or zero if the option has no * short name. * @flags: Flags from #GOptionFlags * @arg: The type of the option, as a #GOptionArg * @arg_data: If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data * must point to a #GOptionArgFunc callback function, which will be * called to handle the extra argument. Otherwise, @arg_data is a * pointer to a location to store the value, the required type of * the location depends on the @arg type: * - %G_OPTION_ARG_NONE: %gboolean * - %G_OPTION_ARG_STRING: %gchar* * - %G_OPTION_ARG_INT: %gint * - %G_OPTION_ARG_FILENAME: %gchar* * - %G_OPTION_ARG_STRING_ARRAY: %gchar** * - %G_OPTION_ARG_FILENAME_ARRAY: %gchar** * - %G_OPTION_ARG_DOUBLE: %gdouble * If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME, * the location will contain a newly allocated string if the option * was given. That string needs to be freed by the callee using g_free(). * Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or * %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev(). * @description: the description for the option in `--help` * output. The @description is translated using the @translate_func * of the group, see g_option_group_set_translation_domain(). * @arg_description: The placeholder to use for the extra argument parsed * by the option in `--help` output. The @arg_description is translated * using the @translate_func of the group, see * g_option_group_set_translation_domain(). * * A GOptionEntry struct defines a single option. To have an effect, they * must be added to a #GOptionGroup with g_option_context_add_main_entries() * or g_option_group_add_entries(). */ struct _GOptionEntry { const gchar *long_name; gchar short_name; gint flags; GOptionArg arg; gpointer arg_data; const gchar *description; const gchar *arg_description; }; /** * G_OPTION_REMAINING: * * If a long option in the main group has this name, it is not treated as a * regular option. Instead it collects all non-option arguments which would * otherwise be left in `argv`. The option must be of type * %G_OPTION_ARG_CALLBACK, %G_OPTION_ARG_STRING_ARRAY * or %G_OPTION_ARG_FILENAME_ARRAY. * * * Using #G_OPTION_REMAINING instead of simply scanning `argv` * for leftover arguments has the advantage that GOption takes care of * necessary encoding conversions for strings or filenames. * * Since: 2.6 */ extern GOptionContext *g_option_context_new (const gchar *parameter_string); extern void g_option_context_set_summary (GOptionContext *context, const gchar *summary); extern const gchar * g_option_context_get_summary (GOptionContext *context); extern void g_option_context_set_description (GOptionContext *context, const gchar *description); extern const gchar * g_option_context_get_description (GOptionContext *context); extern void g_option_context_free (GOptionContext *context); extern void g_option_context_set_help_enabled (GOptionContext *context, gboolean help_enabled); extern gboolean g_option_context_get_help_enabled (GOptionContext *context); extern void g_option_context_set_ignore_unknown_options (GOptionContext *context, gboolean ignore_unknown); extern gboolean g_option_context_get_ignore_unknown_options (GOptionContext *context); extern void g_option_context_set_strict_posix (GOptionContext *context, gboolean strict_posix); extern gboolean g_option_context_get_strict_posix (GOptionContext *context); extern void g_option_context_add_main_entries (GOptionContext *context, const GOptionEntry *entries, const gchar *translation_domain); extern gboolean g_option_context_parse (GOptionContext *context, gint *argc, gchar ***argv, GError **error); extern gboolean g_option_context_parse_strv (GOptionContext *context, gchar ***arguments, GError **error); extern void g_option_context_set_translate_func (GOptionContext *context, GTranslateFunc func, gpointer data, GDestroyNotify destroy_notify); extern void g_option_context_set_translation_domain (GOptionContext *context, const gchar *domain); extern void g_option_context_add_group (GOptionContext *context, GOptionGroup *group); extern void g_option_context_set_main_group (GOptionContext *context, GOptionGroup *group); extern GOptionGroup *g_option_context_get_main_group (GOptionContext *context); extern gchar *g_option_context_get_help (GOptionContext *context, gboolean main_help, GOptionGroup *group); extern GOptionGroup *g_option_group_new (const gchar *name, const gchar *description, const gchar *help_description, gpointer user_data, GDestroyNotify destroy); extern void g_option_group_set_parse_hooks (GOptionGroup *group, GOptionParseFunc pre_parse_func, GOptionParseFunc post_parse_func); extern void g_option_group_set_error_hook (GOptionGroup *group, GOptionErrorFunc error_func); __attribute__((__deprecated__)) extern void g_option_group_free (GOptionGroup *group); extern GOptionGroup *g_option_group_ref (GOptionGroup *group); extern void g_option_group_unref (GOptionGroup *group); extern void g_option_group_add_entries (GOptionGroup *group, const GOptionEntry *entries); extern void g_option_group_set_translate_func (GOptionGroup *group, GTranslateFunc func, gpointer data, GDestroyNotify destroy_notify); extern void g_option_group_set_translation_domain (GOptionGroup *group, const gchar *domain); # 65 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gpattern.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997, 1999 Peter Mattis, Red Hat, Inc. * * 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 * License along with this library; if not, see . */ # 25 "/usr/include/glib-2.0/glib/gpattern.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 26 "/usr/include/glib-2.0/glib/gpattern.h" 2 typedef struct _GPatternSpec GPatternSpec; extern GPatternSpec* g_pattern_spec_new (const gchar *pattern); extern void g_pattern_spec_free (GPatternSpec *pspec); extern gboolean g_pattern_spec_equal (GPatternSpec *pspec1, GPatternSpec *pspec2); extern gboolean g_pattern_match (GPatternSpec *pspec, guint string_length, const gchar *string, const gchar *string_reversed); extern gboolean g_pattern_match_string (GPatternSpec *pspec, const gchar *string); extern gboolean g_pattern_match_simple (const gchar *pattern, const gchar *string); # 66 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gpoll.h" 1 /* gpoll.h - poll(2) support * Copyright (C) 2008 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 67 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gprimes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gprimes.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gprimes.h" 2 /* Prime numbers. */ /* This function returns prime numbers spaced by approximately 1.5-2.0 * and is for use in resizing data structures which prefer * prime-valued sizes. The closest spaced prime function returns the * next largest prime, or the highest it knows about which is about * MAXINT/4. */ extern guint g_spaced_primes_closest (guint num) __attribute__((__const__)); # 68 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gqsort.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gqsort.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gqsort.h" 2 extern void g_qsort_with_data (gconstpointer pbase, gint total_elems, gsize size, GCompareDataFunc compare_func, gpointer user_data); # 69 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 70 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gqueue.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gqueue.h" # 1 "/usr/include/glib-2.0/glib/glist.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gqueue.h" 2 typedef struct _GQueue GQueue; /** * GQueue: * @head: a pointer to the first element of the queue * @tail: a pointer to the last element of the queue * @length: the number of elements in the queue * * Contains the public fields of a * [Queue][glib-Double-ended-Queues]. */ struct _GQueue { GList *head; GList *tail; guint length; }; /** * G_QUEUE_INIT: * * A statically-allocated #GQueue must be initialized with this * macro before it can be used. This macro can be used to initialize * a variable, but it cannot be assigned to a variable. In that case * you have to use g_queue_init(). * * |[ * GQueue my_queue = G_QUEUE_INIT; * ]| * * Since: 2.14 */ /* Queues */ extern GQueue* g_queue_new (void); extern void g_queue_free (GQueue *queue); extern void g_queue_free_full (GQueue *queue, GDestroyNotify free_func); extern void g_queue_init (GQueue *queue); extern void g_queue_clear (GQueue *queue); extern gboolean g_queue_is_empty (GQueue *queue); extern guint g_queue_get_length (GQueue *queue); extern void g_queue_reverse (GQueue *queue); extern GQueue * g_queue_copy (GQueue *queue); extern void g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data); extern GList * g_queue_find (GQueue *queue, gconstpointer data); extern GList * g_queue_find_custom (GQueue *queue, gconstpointer data, GCompareFunc func); extern void g_queue_sort (GQueue *queue, GCompareDataFunc compare_func, gpointer user_data); extern void g_queue_push_head (GQueue *queue, gpointer data); extern void g_queue_push_tail (GQueue *queue, gpointer data); extern void g_queue_push_nth (GQueue *queue, gpointer data, gint n); extern gpointer g_queue_pop_head (GQueue *queue); extern gpointer g_queue_pop_tail (GQueue *queue); extern gpointer g_queue_pop_nth (GQueue *queue, guint n); extern gpointer g_queue_peek_head (GQueue *queue); extern gpointer g_queue_peek_tail (GQueue *queue); extern gpointer g_queue_peek_nth (GQueue *queue, guint n); extern gint g_queue_index (GQueue *queue, gconstpointer data); extern gboolean g_queue_remove (GQueue *queue, gconstpointer data); extern guint g_queue_remove_all (GQueue *queue, gconstpointer data); extern void g_queue_insert_before (GQueue *queue, GList *sibling, gpointer data); extern void g_queue_insert_after (GQueue *queue, GList *sibling, gpointer data); extern void g_queue_insert_sorted (GQueue *queue, gpointer data, GCompareDataFunc func, gpointer user_data); extern void g_queue_push_head_link (GQueue *queue, GList *link_); extern void g_queue_push_tail_link (GQueue *queue, GList *link_); extern void g_queue_push_nth_link (GQueue *queue, gint n, GList *link_); extern GList* g_queue_pop_head_link (GQueue *queue); extern GList* g_queue_pop_tail_link (GQueue *queue); extern GList* g_queue_pop_nth_link (GQueue *queue, guint n); extern GList* g_queue_peek_head_link (GQueue *queue); extern GList* g_queue_peek_tail_link (GQueue *queue); extern GList* g_queue_peek_nth_link (GQueue *queue, guint n); extern gint g_queue_link_index (GQueue *queue, GList *link_); extern void g_queue_unlink (GQueue *queue, GList *link_); extern void g_queue_delete_link (GQueue *queue, GList *link_); # 71 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/grand.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/grand.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/grand.h" 2 typedef struct _GRand GRand; /* GRand - a good and fast random number generator: Mersenne Twister * see http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html for more info. * The range functions return a value in the intervall [begin, end). * int -> [0..2^32-1] * int_range -> [begin..end-1] * double -> [0..1) * double_range -> [begin..end) */ extern GRand* g_rand_new_with_seed (guint32 seed); extern GRand* g_rand_new_with_seed_array (const guint32 *seed, guint seed_length); extern GRand* g_rand_new (void); extern void g_rand_free (GRand *rand_); extern GRand* g_rand_copy (GRand *rand_); extern void g_rand_set_seed (GRand *rand_, guint32 seed); extern void g_rand_set_seed_array (GRand *rand_, const guint32 *seed, guint seed_length); extern guint32 g_rand_int (GRand *rand_); extern gint32 g_rand_int_range (GRand *rand_, gint32 begin, gint32 end); extern gdouble g_rand_double (GRand *rand_); extern gdouble g_rand_double_range (GRand *rand_, gdouble begin, gdouble end); extern void g_random_set_seed (guint32 seed); extern guint32 g_random_int (void); extern gint32 g_random_int_range (gint32 begin, gint32 end); extern gdouble g_random_double (void); extern gdouble g_random_double_range (gdouble begin, gdouble end); # 72 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gregex.h" 1 /* GRegex -- regular expression API wrapper around PCRE. * * Copyright (C) 1999, 2000 Scott Wimer * Copyright (C) 2004, Matthias Clasen * Copyright (C) 2005 - 2007, Marco Barisione * * 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 License * along with this library; if not, see . */ # 28 "/usr/include/glib-2.0/glib/gregex.h" # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 29 "/usr/include/glib-2.0/glib/gregex.h" 2 # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 30 "/usr/include/glib-2.0/glib/gregex.h" 2 /** * GRegexError: * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed. * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed. * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement * string. * @G_REGEX_ERROR_MATCH: The match process failed. * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. * Since 2.16 * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16 * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16 * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". * Since 2.16 * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" * quantifier. Since 2.16 * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. * Since 2.16 * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for * character class. Since 2.16 * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence * in character class. Since 2.16 * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. * Since 2.16 * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16 * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", * "(?<" or "(?P". Since 2.16 * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are * supported only within a class. Since 2.16 * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" * without opening "(". Since 2.16 * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent * subpattern. Since 2.16 * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. * Since 2.16 * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. * Since 2.16 * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16 * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not * fixed length. Since 2.16 * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". * Since 2.16 * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains * more than two branches. Since 2.16 * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". * Since 2.16 * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. * Since 2.16 * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating * elements are not supported. Since 2.16 * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence * is too large. Since 2.16 * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16 * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in * lookbehind assertion. Since 2.16 * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. * Since 2.16 * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator * in subpattern name. Since 2.16 * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have * the same name. Since 2.16 * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. * Since 2.16 * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or * "\\p". Since 2.16 * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long * (maximum 32 characters). Since 2.16 * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum * 10,000). Since 2.16 * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". * Since 2.16 * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more * than one branch. Since 2.16 * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. * This error is never raised. Since: 2.16 Deprecated: 2.34 * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. * Since 2.16 * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced, * angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16 * @G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE: relative reference must not be zero. Since: 2.34 * @G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN: the backtracing * control verb used does not allow an argument. Since: 2.34 * @G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB: unknown backtracing * control verb. Since: 2.34 * @G_REGEX_ERROR_NUMBER_TOO_BIG: number is too big in escape sequence. Since: 2.34 * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME: Missing subpattern name. Since: 2.34 * @G_REGEX_ERROR_MISSING_DIGIT: Missing digit. Since 2.34 * @G_REGEX_ERROR_INVALID_DATA_CHARACTER: In JavaScript compatibility mode, * "[" is an invalid data character. Since: 2.34 * @G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME: different names for subpatterns of the * same number are not allowed. Since: 2.34 * @G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED: the backtracing control * verb requires an argument. Since: 2.34 * @G_REGEX_ERROR_INVALID_CONTROL_CHAR: "\\c" must be followed by an ASCII * character. Since: 2.34 * @G_REGEX_ERROR_MISSING_NAME: "\\k" is not followed by a braced, angle-bracketed, or * quoted name. Since: 2.34 * @G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS: "\\N" is not supported in a class. Since: 2.34 * @G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES: too many forward references. Since: 2.34 * @G_REGEX_ERROR_NAME_TOO_LONG: the name is too long in "(*MARK)", "(*PRUNE)", * "(*SKIP)", or "(*THEN)". Since: 2.34 * @G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE: the character value in the \\u sequence is * too large. Since: 2.34 * * Error codes returned by regular expressions functions. * * Since: 2.14 */ typedef enum { G_REGEX_ERROR_COMPILE, G_REGEX_ERROR_OPTIMIZE, G_REGEX_ERROR_REPLACE, G_REGEX_ERROR_MATCH, G_REGEX_ERROR_INTERNAL, /* These are the error codes from PCRE + 100 */ G_REGEX_ERROR_STRAY_BACKSLASH = 101, G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102, G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103, G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104, G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105, G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106, G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107, G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108, G_REGEX_ERROR_NOTHING_TO_REPEAT = 109, G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112, G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113, G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114, G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115, G_REGEX_ERROR_UNTERMINATED_COMMENT = 118, G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120, G_REGEX_ERROR_MEMORY_ERROR = 121, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125, G_REGEX_ERROR_MALFORMED_CONDITION = 126, G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127, G_REGEX_ERROR_ASSERTION_EXPECTED = 128, G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130, G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131, G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134, G_REGEX_ERROR_INVALID_CONDITION = 135, G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136, G_REGEX_ERROR_INFINITE_LOOP = 140, G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142, G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143, G_REGEX_ERROR_MALFORMED_PROPERTY = 146, G_REGEX_ERROR_UNKNOWN_PROPERTY = 147, G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148, G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149, G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151, G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154, G_REGEX_ERROR_DEFINE_REPETION = 155, G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156, G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157, G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE = 158, G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159, G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB = 160, G_REGEX_ERROR_NUMBER_TOO_BIG = 161, G_REGEX_ERROR_MISSING_SUBPATTERN_NAME = 162, G_REGEX_ERROR_MISSING_DIGIT = 163, G_REGEX_ERROR_INVALID_DATA_CHARACTER = 164, G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME = 165, G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166, G_REGEX_ERROR_INVALID_CONTROL_CHAR = 168, G_REGEX_ERROR_MISSING_NAME = 169, G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS = 171, G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES = 172, G_REGEX_ERROR_NAME_TOO_LONG = 175, G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE = 176 } GRegexError; /** * G_REGEX_ERROR: * * Error domain for regular expressions. Errors in this domain will be * from the #GRegexError enumeration. See #GError for information on * error domains. * * Since: 2.14 */ extern GQuark g_regex_error_quark (void); /** * GRegexCompileFlags: * @G_REGEX_CASELESS: Letters in the pattern match both upper- and * lowercase letters. This option can be changed within a pattern * by a "(?i)" option setting. * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting * of a single line of characters (even if it actually contains * newlines). The "start of line" metacharacter ("^") matches only * at the start of the string, while the "end of line" metacharacter * ("$") matches only at the end of the string, or before a terminating * newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When * #G_REGEX_MULTILINE is set, the "start of line" and "end of line" * constructs match immediately following or immediately before any * newline in the string, respectively, as well as at the very start * and end. This can be changed within a pattern by a "(?m)" option * setting. * @G_REGEX_DOTALL: A dot metacharacter (".") in the pattern matches all * characters, including newlines. Without it, newlines are excluded. * This option can be changed within a pattern by a ("?s") option setting. * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are * totally ignored except when escaped or inside a character class. * Whitespace does not include the VT character (code 11). In addition, * characters between an unescaped "#" outside a character class and * the next newline character, inclusive, are also ignored. This can * be changed within a pattern by a "(?x)" option setting. * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, * it is constrained to match only at the first matching point in the * string that is being searched. This effect can also be achieved by * appropriate constructs in the pattern itself such as the "^" * metacharacter. * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern * matches only at the end of the string. Without this option, a * dollar also matches immediately before the final character if * it is a newline (but not before any other newlines). This option * is ignored if #G_REGEX_MULTILINE is set. * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that * they are not greedy by default, but become greedy if followed by "?". * It can also be set by a "(?U)" option setting within the pattern. * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this * flag they are considered as a raw sequence of bytes. * @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing * parentheses in the pattern. Any opening parenthesis that is not * followed by "?" behaves as if it were followed by "?:" but named * parentheses can still be used for capturing (and they acquire numbers * in the usual way). * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will * be used many times, then it may be worth the effort to optimize it * to improve the speed of matches. * @G_REGEX_FIRSTLINE: Limits an unanchored pattern to match before (or at) the * first newline. Since: 2.34 * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not * be unique. This can be helpful for certain types of pattern when it * is known that only one instance of the named subpattern can ever be * matched. * @G_REGEX_NEWLINE_CR: Usually any newline character or character sequence is * recognized. If this option is set, the only recognized newline character * is '\r'. * @G_REGEX_NEWLINE_LF: Usually any newline character or character sequence is * recognized. If this option is set, the only recognized newline character * is '\n'. * @G_REGEX_NEWLINE_CRLF: Usually any newline character or character sequence is * recognized. If this option is set, the only recognized newline character * sequence is '\r\n'. * @G_REGEX_NEWLINE_ANYCRLF: Usually any newline character or character sequence * is recognized. If this option is set, the only recognized newline character * sequences are '\r', '\n', and '\r\n'. Since: 2.34 * @G_REGEX_BSR_ANYCRLF: Usually any newline character or character sequence * is recognised. If this option is set, then "\R" only recognizes the newline * characters '\r', '\n' and '\r\n'. Since: 2.34 * @G_REGEX_JAVASCRIPT_COMPAT: Changes behaviour so that it is compatible with * JavaScript rather than PCRE. Since: 2.34 * * Flags specifying compile-time options. * * Since: 2.14 */ /* Remember to update G_REGEX_COMPILE_MASK in gregex.c after * adding a new flag. */ typedef enum { G_REGEX_CASELESS = 1 << 0, G_REGEX_MULTILINE = 1 << 1, G_REGEX_DOTALL = 1 << 2, G_REGEX_EXTENDED = 1 << 3, G_REGEX_ANCHORED = 1 << 4, G_REGEX_DOLLAR_ENDONLY = 1 << 5, G_REGEX_UNGREEDY = 1 << 9, G_REGEX_RAW = 1 << 11, G_REGEX_NO_AUTO_CAPTURE = 1 << 12, G_REGEX_OPTIMIZE = 1 << 13, G_REGEX_FIRSTLINE = 1 << 18, G_REGEX_DUPNAMES = 1 << 19, G_REGEX_NEWLINE_CR = 1 << 20, G_REGEX_NEWLINE_LF = 1 << 21, G_REGEX_NEWLINE_CRLF = G_REGEX_NEWLINE_CR | G_REGEX_NEWLINE_LF, G_REGEX_NEWLINE_ANYCRLF = G_REGEX_NEWLINE_CR | 1 << 22, G_REGEX_BSR_ANYCRLF = 1 << 23, G_REGEX_JAVASCRIPT_COMPAT = 1 << 25 } GRegexCompileFlags; /** * GRegexMatchFlags: * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, * it is constrained to match only at the first matching point in the * string that is being searched. This effect can also be achieved by * appropriate constructs in the pattern itself such as the "^" * metacharacter. * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is * not the beginning of a line, so the circumflex metacharacter should * not match before it. Setting this without #G_REGEX_MULTILINE (at * compile time) causes circumflex never to match. This option affects * only the behaviour of the circumflex metacharacter, it does not * affect "\A". * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is * not the end of a line, so the dollar metacharacter should not match * it nor (except in multiline mode) a newline immediately before it. * Setting this without #G_REGEX_MULTILINE (at compile time) causes * dollar never to match. This option affects only the behaviour of * the dollar metacharacter, it does not affect "\Z" or "\z". * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid * match if this option is set. If there are alternatives in the pattern, * they are tried. If all the alternatives match the empty string, the * entire match fails. For example, if the pattern "a?b?" is applied to * a string not beginning with "a" or "b", it matches the empty string * at the start of the string. With this flag set, this match is not * valid, so GRegex searches further into the string for occurrences * of "a" or "b". * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more * documentation on partial matching see g_match_info_is_partial_match(). * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when * creating a new #GRegex, setting the '\r' character as line terminator. * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when * creating a new #GRegex, setting the '\n' character as line terminator. * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when * creating a new #GRegex, setting the '\r\n' characters sequence as line terminator. * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when * creating a new #GRegex, any Unicode newline sequence * is recognised as a newline. These are '\r', '\n' and '\rn', and the * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and * U+2029 PARAGRAPH SEPARATOR. * @G_REGEX_MATCH_NEWLINE_ANYCRLF: Overrides the newline definition set when * creating a new #GRegex; any '\r', '\n', or '\r\n' character sequence * is recognized as a newline. Since: 2.34 * @G_REGEX_MATCH_BSR_ANYCRLF: Overrides the newline definition for "\R" set when * creating a new #GRegex; only '\r', '\n', or '\r\n' character sequences * are recognized as a newline by "\R". Since: 2.34 * @G_REGEX_MATCH_BSR_ANY: Overrides the newline definition for "\R" set when * creating a new #GRegex; any Unicode newline character or character sequence * are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and * U+2029 PARAGRAPH SEPARATOR. Since: 2.34 * @G_REGEX_MATCH_PARTIAL_SOFT: An alias for #G_REGEX_MATCH_PARTIAL. Since: 2.34 * @G_REGEX_MATCH_PARTIAL_HARD: Turns on the partial matching feature. In contrast to * to #G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match * is found, without continuing to search for a possible complete match. See * g_match_info_is_partial_match() for more information. Since: 2.34 * @G_REGEX_MATCH_NOTEMPTY_ATSTART: Like #G_REGEX_MATCH_NOTEMPTY, but only applied to * the start of the matched string. For anchored * patterns this can only happen for pattern containing "\K". Since: 2.34 * * Flags specifying match-time options. * * Since: 2.14 */ /* Remember to update G_REGEX_MATCH_MASK in gregex.c after * adding a new flag. */ typedef enum { G_REGEX_MATCH_ANCHORED = 1 << 4, G_REGEX_MATCH_NOTBOL = 1 << 7, G_REGEX_MATCH_NOTEOL = 1 << 8, G_REGEX_MATCH_NOTEMPTY = 1 << 10, G_REGEX_MATCH_PARTIAL = 1 << 15, G_REGEX_MATCH_NEWLINE_CR = 1 << 20, G_REGEX_MATCH_NEWLINE_LF = 1 << 21, G_REGEX_MATCH_NEWLINE_CRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_LF, G_REGEX_MATCH_NEWLINE_ANY = 1 << 22, G_REGEX_MATCH_NEWLINE_ANYCRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_ANY, G_REGEX_MATCH_BSR_ANYCRLF = 1 << 23, G_REGEX_MATCH_BSR_ANY = 1 << 24, G_REGEX_MATCH_PARTIAL_SOFT = G_REGEX_MATCH_PARTIAL, G_REGEX_MATCH_PARTIAL_HARD = 1 << 27, G_REGEX_MATCH_NOTEMPTY_ATSTART = 1 << 28 } GRegexMatchFlags; /** * GRegex: * * A GRegex is the "compiled" form of a regular expression pattern. * This structure is opaque and its fields cannot be accessed directly. * * Since: 2.14 */ typedef struct _GRegex GRegex; /** * GMatchInfo: * * A GMatchInfo is an opaque struct used to return information about * matches. */ typedef struct _GMatchInfo GMatchInfo; /** * GRegexEvalCallback: * @match_info: the #GMatchInfo generated by the match. * Use g_match_info_get_regex() and g_match_info_get_string() if you * need the #GRegex or the matched string. * @result: a #GString containing the new string * @user_data: user data passed to g_regex_replace_eval() * * Specifies the type of the function passed to g_regex_replace_eval(). * It is called for each occurrence of the pattern in the string passed * to g_regex_replace_eval(), and it should append the replacement to * @result. * * Returns: %FALSE to continue the replacement process, %TRUE to stop it * * Since: 2.14 */ typedef gboolean (*GRegexEvalCallback) (const GMatchInfo *match_info, GString *result, gpointer user_data); extern GRegex *g_regex_new (const gchar *pattern, GRegexCompileFlags compile_options, GRegexMatchFlags match_options, GError **error); extern GRegex *g_regex_ref (GRegex *regex); extern void g_regex_unref (GRegex *regex); extern const gchar *g_regex_get_pattern (const GRegex *regex); extern gint g_regex_get_max_backref (const GRegex *regex); extern gint g_regex_get_capture_count (const GRegex *regex); extern gboolean g_regex_get_has_cr_or_lf (const GRegex *regex); extern gint g_regex_get_max_lookbehind (const GRegex *regex); extern gint g_regex_get_string_number (const GRegex *regex, const gchar *name); extern gchar *g_regex_escape_string (const gchar *string, gint length); extern gchar *g_regex_escape_nul (const gchar *string, gint length); extern GRegexCompileFlags g_regex_get_compile_flags (const GRegex *regex); extern GRegexMatchFlags g_regex_get_match_flags (const GRegex *regex); /* Matching. */ extern gboolean g_regex_match_simple (const gchar *pattern, const gchar *string, GRegexCompileFlags compile_options, GRegexMatchFlags match_options); extern gboolean g_regex_match (const GRegex *regex, const gchar *string, GRegexMatchFlags match_options, GMatchInfo **match_info); extern gboolean g_regex_match_full (const GRegex *regex, const gchar *string, gssize string_len, gint start_position, GRegexMatchFlags match_options, GMatchInfo **match_info, GError **error); extern gboolean g_regex_match_all (const GRegex *regex, const gchar *string, GRegexMatchFlags match_options, GMatchInfo **match_info); extern gboolean g_regex_match_all_full (const GRegex *regex, const gchar *string, gssize string_len, gint start_position, GRegexMatchFlags match_options, GMatchInfo **match_info, GError **error); /* String splitting. */ extern gchar **g_regex_split_simple (const gchar *pattern, const gchar *string, GRegexCompileFlags compile_options, GRegexMatchFlags match_options); extern gchar **g_regex_split (const GRegex *regex, const gchar *string, GRegexMatchFlags match_options); extern gchar **g_regex_split_full (const GRegex *regex, const gchar *string, gssize string_len, gint start_position, GRegexMatchFlags match_options, gint max_tokens, GError **error); /* String replacement. */ extern gchar *g_regex_replace (const GRegex *regex, const gchar *string, gssize string_len, gint start_position, const gchar *replacement, GRegexMatchFlags match_options, GError **error); extern gchar *g_regex_replace_literal (const GRegex *regex, const gchar *string, gssize string_len, gint start_position, const gchar *replacement, GRegexMatchFlags match_options, GError **error); extern gchar *g_regex_replace_eval (const GRegex *regex, const gchar *string, gssize string_len, gint start_position, GRegexMatchFlags match_options, GRegexEvalCallback eval, gpointer user_data, GError **error); extern gboolean g_regex_check_replacement (const gchar *replacement, gboolean *has_references, GError **error); /* Match info */ extern GRegex *g_match_info_get_regex (const GMatchInfo *match_info); extern const gchar *g_match_info_get_string (const GMatchInfo *match_info); extern GMatchInfo *g_match_info_ref (GMatchInfo *match_info); extern void g_match_info_unref (GMatchInfo *match_info); extern void g_match_info_free (GMatchInfo *match_info); extern gboolean g_match_info_next (GMatchInfo *match_info, GError **error); extern gboolean g_match_info_matches (const GMatchInfo *match_info); extern gint g_match_info_get_match_count (const GMatchInfo *match_info); extern gboolean g_match_info_is_partial_match (const GMatchInfo *match_info); extern gchar *g_match_info_expand_references(const GMatchInfo *match_info, const gchar *string_to_expand, GError **error); extern gchar *g_match_info_fetch (const GMatchInfo *match_info, gint match_num); extern gboolean g_match_info_fetch_pos (const GMatchInfo *match_info, gint match_num, gint *start_pos, gint *end_pos); extern gchar *g_match_info_fetch_named (const GMatchInfo *match_info, const gchar *name); extern gboolean g_match_info_fetch_named_pos (const GMatchInfo *match_info, const gchar *name, gint *start_pos, gint *end_pos); extern gchar **g_match_info_fetch_all (const GMatchInfo *match_info); # 73 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gscanner.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gscanner.h" # 1 "/usr/include/glib-2.0/glib/gdataset.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gscanner.h" 2 # 1 "/usr/include/glib-2.0/glib/ghash.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 34 "/usr/include/glib-2.0/glib/gscanner.h" 2 typedef struct _GScanner GScanner; typedef struct _GScannerConfig GScannerConfig; typedef union _GTokenValue GTokenValue; typedef void (*GScannerMsgFunc) (GScanner *scanner, gchar *message, gboolean error); /* GScanner: Flexible lexical scanner for general purpose. */ /* Character sets */ # 61 "/usr/include/glib-2.0/glib/gscanner.h" /* Error types */ typedef enum { G_ERR_UNKNOWN, G_ERR_UNEXP_EOF, G_ERR_UNEXP_EOF_IN_STRING, G_ERR_UNEXP_EOF_IN_COMMENT, G_ERR_NON_DIGIT_IN_CONST, G_ERR_DIGIT_RADIX, G_ERR_FLOAT_RADIX, G_ERR_FLOAT_MALFORMED } GErrorType; /* Token types */ typedef enum { G_TOKEN_EOF = 0, G_TOKEN_LEFT_PAREN = '(', G_TOKEN_RIGHT_PAREN = ')', G_TOKEN_LEFT_CURLY = '{', G_TOKEN_RIGHT_CURLY = '}', G_TOKEN_LEFT_BRACE = '[', G_TOKEN_RIGHT_BRACE = ']', G_TOKEN_EQUAL_SIGN = '=', G_TOKEN_COMMA = ',', G_TOKEN_NONE = 256, G_TOKEN_ERROR, G_TOKEN_CHAR, G_TOKEN_BINARY, G_TOKEN_OCTAL, G_TOKEN_INT, G_TOKEN_HEX, G_TOKEN_FLOAT, G_TOKEN_STRING, G_TOKEN_SYMBOL, G_TOKEN_IDENTIFIER, G_TOKEN_IDENTIFIER_NULL, G_TOKEN_COMMENT_SINGLE, G_TOKEN_COMMENT_MULTI, /*< private >*/ G_TOKEN_LAST } GTokenType; union _GTokenValue { gpointer v_symbol; gchar *v_identifier; gulong v_binary; gulong v_octal; gulong v_int; guint64 v_int64; gdouble v_float; gulong v_hex; gchar *v_string; gchar *v_comment; guchar v_char; guint v_error; }; struct _GScannerConfig { /* Character sets */ gchar *cset_skip_characters; /* default: " \t\n" */ gchar *cset_identifier_first; gchar *cset_identifier_nth; gchar *cpair_comment_single; /* default: "#\n" */ /* Should symbol lookup work case sensitive? */ guint case_sensitive : 1; /* Boolean values to be adjusted "on the fly" * to configure scanning behaviour. */ guint skip_comment_multi : 1; /* C like comment */ guint skip_comment_single : 1; /* single line comment */ guint scan_comment_multi : 1; /* scan multi line comments? */ guint scan_identifier : 1; guint scan_identifier_1char : 1; guint scan_identifier_NULL : 1; guint scan_symbols : 1; guint scan_binary : 1; guint scan_octal : 1; guint scan_float : 1; guint scan_hex : 1; /* '0x0ff0' */ guint scan_hex_dollar : 1; /* '$0ff0' */ guint scan_string_sq : 1; /* string: 'anything' */ guint scan_string_dq : 1; /* string: "\\-escapes!\n" */ guint numbers_2_int : 1; /* bin, octal, hex => int */ guint int_2_float : 1; /* int => G_TOKEN_FLOAT? */ guint identifier_2_string : 1; guint char_2_token : 1; /* return G_TOKEN_CHAR? */ guint symbol_2_token : 1; guint scope_0_fallback : 1; /* try scope 0 on lookups? */ guint store_int64 : 1; /* use value.v_int64 rather than v_int */ /*< private >*/ guint padding_dummy; }; struct _GScanner { /* unused fields */ gpointer user_data; guint max_parse_errors; /* g_scanner_error() increments this field */ guint parse_errors; /* name of input stream, featured by the default message handler */ const gchar *input_name; /* quarked data */ GData *qdata; /* link into the scanner configuration */ GScannerConfig *config; /* fields filled in after g_scanner_get_next_token() */ GTokenType token; GTokenValue value; guint line; guint position; /* fields filled in after g_scanner_peek_next_token() */ GTokenType next_token; GTokenValue next_value; guint next_line; guint next_position; /*< private >*/ /* to be considered private */ GHashTable *symbol_table; gint input_fd; const gchar *text; const gchar *text_end; gchar *buffer; guint scope_id; /*< public >*/ /* handler function for _warn and _error */ GScannerMsgFunc msg_handler; }; extern GScanner* g_scanner_new (const GScannerConfig *config_templ); extern void g_scanner_destroy (GScanner *scanner); extern void g_scanner_input_file (GScanner *scanner, gint input_fd); extern void g_scanner_sync_file_offset (GScanner *scanner); extern void g_scanner_input_text (GScanner *scanner, const gchar *text, guint text_len); extern GTokenType g_scanner_get_next_token (GScanner *scanner); extern GTokenType g_scanner_peek_next_token (GScanner *scanner); extern GTokenType g_scanner_cur_token (GScanner *scanner); extern GTokenValue g_scanner_cur_value (GScanner *scanner); extern guint g_scanner_cur_line (GScanner *scanner); extern guint g_scanner_cur_position (GScanner *scanner); extern gboolean g_scanner_eof (GScanner *scanner); extern guint g_scanner_set_scope (GScanner *scanner, guint scope_id); extern void g_scanner_scope_add_symbol (GScanner *scanner, guint scope_id, const gchar *symbol, gpointer value); extern void g_scanner_scope_remove_symbol (GScanner *scanner, guint scope_id, const gchar *symbol); extern gpointer g_scanner_scope_lookup_symbol (GScanner *scanner, guint scope_id, const gchar *symbol); extern void g_scanner_scope_foreach_symbol (GScanner *scanner, guint scope_id, GHFunc func, gpointer user_data); extern gpointer g_scanner_lookup_symbol (GScanner *scanner, const gchar *symbol); extern void g_scanner_unexp_token (GScanner *scanner, GTokenType expected_token, const gchar *identifier_spec, const gchar *symbol_spec, const gchar *symbol_name, const gchar *message, gint is_error); extern void g_scanner_error (GScanner *scanner, const gchar *format, ...) __attribute__((__format__ (__printf__, 2, 3))); extern void g_scanner_warn (GScanner *scanner, const gchar *format, ...) __attribute__((__format__ (__printf__, 2, 3))); /* keep downward source compatibility */ # 294 "/usr/include/glib-2.0/glib/gscanner.h" /* The following two functions are deprecated and will be removed in * the next major release. They do no good. */ # 74 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gsequence.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 * Soeren Sandmann (sandmann@daimi.au.dk) * * 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 * License along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gsequence.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 27 "/usr/include/glib-2.0/glib/gsequence.h" 2 typedef struct _GSequence GSequence; typedef struct _GSequenceNode GSequenceIter; typedef gint (* GSequenceIterCompareFunc) (GSequenceIter *a, GSequenceIter *b, gpointer data); /* GSequence */ extern GSequence * g_sequence_new (GDestroyNotify data_destroy); extern void g_sequence_free (GSequence *seq); extern gint g_sequence_get_length (GSequence *seq); extern void g_sequence_foreach (GSequence *seq, GFunc func, gpointer user_data); extern void g_sequence_foreach_range (GSequenceIter *begin, GSequenceIter *end, GFunc func, gpointer user_data); extern void g_sequence_sort (GSequence *seq, GCompareDataFunc cmp_func, gpointer cmp_data); extern void g_sequence_sort_iter (GSequence *seq, GSequenceIterCompareFunc cmp_func, gpointer cmp_data); extern gboolean g_sequence_is_empty (GSequence *seq); /* Getting iters */ extern GSequenceIter *g_sequence_get_begin_iter (GSequence *seq); extern GSequenceIter *g_sequence_get_end_iter (GSequence *seq); extern GSequenceIter *g_sequence_get_iter_at_pos (GSequence *seq, gint pos); extern GSequenceIter *g_sequence_append (GSequence *seq, gpointer data); extern GSequenceIter *g_sequence_prepend (GSequence *seq, gpointer data); extern GSequenceIter *g_sequence_insert_before (GSequenceIter *iter, gpointer data); extern void g_sequence_move (GSequenceIter *src, GSequenceIter *dest); extern void g_sequence_swap (GSequenceIter *a, GSequenceIter *b); extern GSequenceIter *g_sequence_insert_sorted (GSequence *seq, gpointer data, GCompareDataFunc cmp_func, gpointer cmp_data); extern GSequenceIter *g_sequence_insert_sorted_iter (GSequence *seq, gpointer data, GSequenceIterCompareFunc iter_cmp, gpointer cmp_data); extern void g_sequence_sort_changed (GSequenceIter *iter, GCompareDataFunc cmp_func, gpointer cmp_data); extern void g_sequence_sort_changed_iter (GSequenceIter *iter, GSequenceIterCompareFunc iter_cmp, gpointer cmp_data); extern void g_sequence_remove (GSequenceIter *iter); extern void g_sequence_remove_range (GSequenceIter *begin, GSequenceIter *end); extern void g_sequence_move_range (GSequenceIter *dest, GSequenceIter *begin, GSequenceIter *end); extern GSequenceIter *g_sequence_search (GSequence *seq, gpointer data, GCompareDataFunc cmp_func, gpointer cmp_data); extern GSequenceIter *g_sequence_search_iter (GSequence *seq, gpointer data, GSequenceIterCompareFunc iter_cmp, gpointer cmp_data); extern GSequenceIter *g_sequence_lookup (GSequence *seq, gpointer data, GCompareDataFunc cmp_func, gpointer cmp_data); extern GSequenceIter *g_sequence_lookup_iter (GSequence *seq, gpointer data, GSequenceIterCompareFunc iter_cmp, gpointer cmp_data); /* Dereferencing */ extern gpointer g_sequence_get (GSequenceIter *iter); extern void g_sequence_set (GSequenceIter *iter, gpointer data); /* Operations on GSequenceIter * */ extern gboolean g_sequence_iter_is_begin (GSequenceIter *iter); extern gboolean g_sequence_iter_is_end (GSequenceIter *iter); extern GSequenceIter *g_sequence_iter_next (GSequenceIter *iter); extern GSequenceIter *g_sequence_iter_prev (GSequenceIter *iter); extern gint g_sequence_iter_get_position (GSequenceIter *iter); extern GSequenceIter *g_sequence_iter_move (GSequenceIter *iter, gint delta); extern GSequence * g_sequence_iter_get_sequence (GSequenceIter *iter); /* Search */ extern gint g_sequence_iter_compare (GSequenceIter *a, GSequenceIter *b); extern GSequenceIter *g_sequence_range_get_midpoint (GSequenceIter *begin, GSequenceIter *end); # 75 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gshell.h" 1 /* gshell.h - Shell-related utilities * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gshell.h" # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 27 "/usr/include/glib-2.0/glib/gshell.h" 2 typedef enum { /* mismatched or otherwise mangled quoting */ G_SHELL_ERROR_BAD_QUOTING, /* string to be parsed was empty */ G_SHELL_ERROR_EMPTY_STRING, G_SHELL_ERROR_FAILED } GShellError; extern GQuark g_shell_error_quark (void); extern gchar* g_shell_quote (const gchar *unquoted_string); extern gchar* g_shell_unquote (const gchar *quoted_string, GError **error); extern gboolean g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GError **error); # 76 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gslice.h" 1 /* GLIB sliced memory - fast threaded memory chunk allocator * Copyright (C) 2005 Tim Janik * * 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 * License along with this library; if not, see . */ # 25 "/usr/include/glib-2.0/glib/gslice.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 26 "/usr/include/glib-2.0/glib/gslice.h" 2 /* slices - fast allocation/release of small memory blocks */ extern gpointer g_slice_alloc (gsize block_size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); extern gpointer g_slice_alloc0 (gsize block_size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); extern gpointer g_slice_copy (gsize block_size, gconstpointer mem_block) __attribute__((__alloc_size__(1))); extern void g_slice_free1 (gsize block_size, gpointer mem_block); extern void g_slice_free_chain_with_offset (gsize block_size, gpointer mem_chain, gsize next_offset); /* MemoryBlockType * * g_slice_dup (MemoryBlockType, * MemoryBlockType *mem_block); * g_slice_free (MemoryBlockType, * MemoryBlockType *mem_block); * g_slice_free_chain (MemoryBlockType, * MemoryBlockType *first_chain_block, * memory_block_next_field); * pseudo prototypes for the macro * definitions following below. */ /* we go through extra hoops to ensure type safety */ # 75 "/usr/include/glib-2.0/glib/gslice.h" /* --- internal debugging API --- */ typedef enum { G_SLICE_CONFIG_ALWAYS_MALLOC = 1, G_SLICE_CONFIG_BYPASS_MAGAZINES, G_SLICE_CONFIG_WORKING_SET_MSECS, G_SLICE_CONFIG_COLOR_INCREMENT, G_SLICE_CONFIG_CHUNK_SIZES, G_SLICE_CONFIG_CONTENTION_COUNTER } GSliceConfig; __attribute__((__deprecated__)) extern void g_slice_set_config (GSliceConfig ckey, gint64 value); __attribute__((__deprecated__)) extern gint64 g_slice_get_config (GSliceConfig ckey); __attribute__((__deprecated__)) extern gint64* g_slice_get_config_state (GSliceConfig ckey, gint64 address, guint *n_values); # 77 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gslist.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 78 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gspawn.h" 1 /* gspawn.h - Process launching * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gspawn.h" # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 27 "/usr/include/glib-2.0/glib/gspawn.h" 2 /* I'm not sure I remember our proposed naming convention here. */ /** * G_SPAWN_ERROR: * * Error domain for spawning processes. Errors in this domain will * be from the #GSpawnError enumeration. See #GError for information on * error domains. */ /** * GSpawnError: * @G_SPAWN_ERROR_FORK: Fork failed due to lack of memory. * @G_SPAWN_ERROR_READ: Read or select on pipes failed. * @G_SPAWN_ERROR_CHDIR: Changing to working directory failed. * @G_SPAWN_ERROR_ACCES: execv() returned `EACCES` * @G_SPAWN_ERROR_PERM: execv() returned `EPERM` * @G_SPAWN_ERROR_TOO_BIG: execv() returned `E2BIG` * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG * @G_SPAWN_ERROR_NOEXEC: execv() returned `ENOEXEC` * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned `ENAMETOOLONG` * @G_SPAWN_ERROR_NOENT: execv() returned `ENOENT` * @G_SPAWN_ERROR_NOMEM: execv() returned `ENOMEM` * @G_SPAWN_ERROR_NOTDIR: execv() returned `ENOTDIR` * @G_SPAWN_ERROR_LOOP: execv() returned `ELOOP` * @G_SPAWN_ERROR_TXTBUSY: execv() returned `ETXTBUSY` * @G_SPAWN_ERROR_IO: execv() returned `EIO` * @G_SPAWN_ERROR_NFILE: execv() returned `ENFILE` * @G_SPAWN_ERROR_MFILE: execv() returned `EMFILE` * @G_SPAWN_ERROR_INVAL: execv() returned `EINVAL` * @G_SPAWN_ERROR_ISDIR: execv() returned `EISDIR` * @G_SPAWN_ERROR_LIBBAD: execv() returned `ELIBBAD` * @G_SPAWN_ERROR_FAILED: Some other fatal failure, * `error->message` should explain. * * Error codes returned by spawning processes. */ typedef enum { G_SPAWN_ERROR_FORK, /* fork failed due to lack of memory */ G_SPAWN_ERROR_READ, /* read or select on pipes failed */ G_SPAWN_ERROR_CHDIR, /* changing to working dir failed */ G_SPAWN_ERROR_ACCES, /* execv() returned EACCES */ G_SPAWN_ERROR_PERM, /* execv() returned EPERM */ G_SPAWN_ERROR_TOO_BIG,/* execv() returned E2BIG */ G_SPAWN_ERROR_2BIG = G_SPAWN_ERROR_TOO_BIG, G_SPAWN_ERROR_NOEXEC, /* execv() returned ENOEXEC */ G_SPAWN_ERROR_NAMETOOLONG, /* "" "" ENAMETOOLONG */ G_SPAWN_ERROR_NOENT, /* "" "" ENOENT */ G_SPAWN_ERROR_NOMEM, /* "" "" ENOMEM */ G_SPAWN_ERROR_NOTDIR, /* "" "" ENOTDIR */ G_SPAWN_ERROR_LOOP, /* "" "" ELOOP */ G_SPAWN_ERROR_TXTBUSY, /* "" "" ETXTBUSY */ G_SPAWN_ERROR_IO, /* "" "" EIO */ G_SPAWN_ERROR_NFILE, /* "" "" ENFILE */ G_SPAWN_ERROR_MFILE, /* "" "" EMFLE */ G_SPAWN_ERROR_INVAL, /* "" "" EINVAL */ G_SPAWN_ERROR_ISDIR, /* "" "" EISDIR */ G_SPAWN_ERROR_LIBBAD, /* "" "" ELIBBAD */ G_SPAWN_ERROR_FAILED /* other fatal failure, error->message * should explain */ } GSpawnError; /** * G_SPAWN_EXIT_ERROR: * * Error domain used by g_spawn_check_exit_status(). The code * will be the program exit code. */ /** * GSpawnChildSetupFunc: * @user_data: (closure): user data to pass to the function. * * Specifies the type of the setup function passed to g_spawn_async(), * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very * limited ways, be used to affect the child's execution. * * On POSIX platforms, the function is called in the child after GLib * has performed all the setup it plans to perform, but before calling * exec(). Actions taken in this function will only affect the child, * not the parent. * * On Windows, the function is called in the parent. Its usefulness on * Windows is thus questionable. In many cases executing the child setup * function in the parent can have ill effects, and you should be very * careful when porting software to Windows that uses child setup * functions. * * However, even on POSIX, you are extremely limited in what you can * safely do from a #GSpawnChildSetupFunc, because any mutexes that were * held by other threads in the parent process at the time of the fork() * will still be locked in the child process, and they will never be * unlocked (since the threads that held them don't exist in the child). * POSIX allows only async-signal-safe functions (see signal(7)) to be * called in the child between fork() and exec(), which drastically limits * the usefulness of child setup functions. * * In particular, it is not safe to call any function which may * call malloc(), which includes POSIX functions such as setenv(). * If you need to set up the child environment differently from * the parent, you should use g_get_environ(), g_environ_setenv(), * and g_environ_unsetenv(), and then pass the complete environment * list to the `g_spawn...` function. */ typedef void (* GSpawnChildSetupFunc) (gpointer user_data); /** * GSpawnFlags: * @G_SPAWN_DEFAULT: no flags, default behaviour * @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will * be inherited by the child; otherwise all descriptors except stdin, * stdout and stderr will be closed before calling exec() in the child. * @G_SPAWN_DO_NOT_REAP_CHILD: the child will not be automatically reaped; * you must use g_child_watch_add() yourself (or call waitpid() or handle * `SIGCHLD` yourself), or the child will become a zombie. * @G_SPAWN_SEARCH_PATH: `argv[0]` need not be an absolute path, it will be * looked for in the user's `PATH`. * @G_SPAWN_STDOUT_TO_DEV_NULL: the child's standard output will be discarded, * instead of going to the same location as the parent's standard output. * @G_SPAWN_STDERR_TO_DEV_NULL: the child's standard error will be discarded. * @G_SPAWN_CHILD_INHERITS_STDIN: the child will inherit the parent's standard * input (by default, the child's standard input is attached to `/dev/null`). * @G_SPAWN_FILE_AND_ARGV_ZERO: the first element of `argv` is the file to * execute, while the remaining elements are the actual argument vector * to pass to the file. Normally g_spawn_async_with_pipes() uses `argv[0]` * as the file to execute, and passes all of `argv` to the child. * @G_SPAWN_SEARCH_PATH_FROM_ENVP: if `argv[0]` is not an abolute path, * it will be looked for in the `PATH` from the passed child environment. * Since: 2.34 * @G_SPAWN_CLOEXEC_PIPES: create all pipes with the `O_CLOEXEC` flag set. * Since: 2.40 * * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). */ typedef enum { G_SPAWN_DEFAULT = 0, G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0, G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1, /* look for argv[0] in the path i.e. use execvp() */ G_SPAWN_SEARCH_PATH = 1 << 2, /* Dump output to /dev/null */ G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4, G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5, G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6, G_SPAWN_SEARCH_PATH_FROM_ENVP = 1 << 7, G_SPAWN_CLOEXEC_PIPES = 1 << 8 } GSpawnFlags; extern GQuark g_spawn_error_quark (void); extern GQuark g_spawn_exit_error_quark (void); extern gboolean g_spawn_async (const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, gpointer user_data, GPid *child_pid, GError **error); /* Opens pipes for non-NULL standard_output, standard_input, standard_error, * and returns the parent's end of the pipes. */ extern gboolean g_spawn_async_with_pipes (const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, gpointer user_data, GPid *child_pid, gint *standard_input, gint *standard_output, gint *standard_error, GError **error); /* If standard_output or standard_error are non-NULL, the full * standard output or error of the command will be placed there. */ extern gboolean g_spawn_sync (const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, gpointer user_data, gchar **standard_output, gchar **standard_error, gint *exit_status, GError **error); extern gboolean g_spawn_command_line_sync (const gchar *command_line, gchar **standard_output, gchar **standard_error, gint *exit_status, GError **error); extern gboolean g_spawn_command_line_async (const gchar *command_line, GError **error); extern gboolean g_spawn_check_exit_status (gint exit_status, GError **error); extern void g_spawn_close_pid (GPid pid); # 79 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gstrfuncs.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gstrfuncs.h" # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.15 Variable arguments */ # 33 "/usr/include/glib-2.0/glib/gstrfuncs.h" 2 # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 # 1 "/usr/include/glib-2.0/glib/gmacros.h" /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ /* This file must not include any other glib header file and must thus * not refer to variables from glibconfig.h */ # 34 "/usr/include/glib-2.0/glib/gstrfuncs.h" 2 # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 35 "/usr/include/glib-2.0/glib/gstrfuncs.h" 2 # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 36 "/usr/include/glib-2.0/glib/gstrfuncs.h" 2 /* Functions like the ones in that are not affected by locale. */ typedef enum { G_ASCII_ALNUM = 1 << 0, G_ASCII_ALPHA = 1 << 1, G_ASCII_CNTRL = 1 << 2, G_ASCII_DIGIT = 1 << 3, G_ASCII_GRAPH = 1 << 4, G_ASCII_LOWER = 1 << 5, G_ASCII_PRINT = 1 << 6, G_ASCII_PUNCT = 1 << 7, G_ASCII_SPACE = 1 << 8, G_ASCII_UPPER = 1 << 9, G_ASCII_XDIGIT = 1 << 10 } GAsciiType; extern const guint16 * const g_ascii_table; # 89 "/usr/include/glib-2.0/glib/gstrfuncs.h" extern gchar g_ascii_tolower (gchar c) __attribute__((__const__)); extern gchar g_ascii_toupper (gchar c) __attribute__((__const__)); extern gint g_ascii_digit_value (gchar c) __attribute__((__const__)); extern gint g_ascii_xdigit_value (gchar c) __attribute__((__const__)); /* String utility functions that modify a string argument or * return a constant string that must not be freed. */ extern gchar* g_strdelimit (gchar *string, const gchar *delimiters, gchar new_delimiter); extern gchar* g_strcanon (gchar *string, const gchar *valid_chars, gchar substitutor); extern const gchar * g_strerror (gint errnum) __attribute__((__const__)); extern const gchar * g_strsignal (gint signum) __attribute__((__const__)); extern gchar * g_strreverse (gchar *string); extern gsize g_strlcpy (gchar *dest, const gchar *src, gsize dest_size); extern gsize g_strlcat (gchar *dest, const gchar *src, gsize dest_size); extern gchar * g_strstr_len (const gchar *haystack, gssize haystack_len, const gchar *needle); extern gchar * g_strrstr (const gchar *haystack, const gchar *needle); extern gchar * g_strrstr_len (const gchar *haystack, gssize haystack_len, const gchar *needle); extern gboolean g_str_has_suffix (const gchar *str, const gchar *suffix); extern gboolean g_str_has_prefix (const gchar *str, const gchar *prefix); /* String to/from double conversion functions */ extern gdouble g_strtod (const gchar *nptr, gchar **endptr); extern gdouble g_ascii_strtod (const gchar *nptr, gchar **endptr); extern guint64 g_ascii_strtoull (const gchar *nptr, gchar **endptr, guint base); extern gint64 g_ascii_strtoll (const gchar *nptr, gchar **endptr, guint base); /* 29 bytes should enough for all possible values that * g_ascii_dtostr can produce. * Then add 10 for good measure */ extern gchar * g_ascii_dtostr (gchar *buffer, gint buf_len, gdouble d); extern gchar * g_ascii_formatd (gchar *buffer, gint buf_len, const gchar *format, gdouble d); /* removes leading spaces */ extern gchar* g_strchug (gchar *string); /* removes trailing spaces */ extern gchar* g_strchomp (gchar *string); /* removes leading & trailing spaces */ extern gint g_ascii_strcasecmp (const gchar *s1, const gchar *s2); extern gint g_ascii_strncasecmp (const gchar *s1, const gchar *s2, gsize n); extern gchar* g_ascii_strdown (const gchar *str, gssize len) __attribute__((__malloc__)); extern gchar* g_ascii_strup (const gchar *str, gssize len) __attribute__((__malloc__)); extern gboolean g_str_is_ascii (const gchar *str); __attribute__((__deprecated__)) extern gint g_strcasecmp (const gchar *s1, const gchar *s2); __attribute__((__deprecated__)) extern gint g_strncasecmp (const gchar *s1, const gchar *s2, guint n); __attribute__((__deprecated__)) extern gchar* g_strdown (gchar *string); __attribute__((__deprecated__)) extern gchar* g_strup (gchar *string); /* String utility functions that return a newly allocated string which * ought to be freed with g_free from the caller at some point. */ extern gchar* g_strdup (const gchar *str) __attribute__((__malloc__)); extern gchar* g_strdup_printf (const gchar *format, ...) __attribute__((__format__ (__printf__, 1, 2))) __attribute__((__malloc__)); extern gchar* g_strdup_vprintf (const gchar *format, va_list args) __attribute__((__format__ (__printf__, 1, 0))) __attribute__((__malloc__)); extern gchar* g_strndup (const gchar *str, gsize n) __attribute__((__malloc__)); extern gchar* g_strnfill (gsize length, gchar fill_char) __attribute__((__malloc__)); extern gchar* g_strconcat (const gchar *string1, ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); extern gchar* g_strjoin (const gchar *separator, ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); /* Make a copy of a string interpreting C string -style escape * sequences. Inverse of g_strescape. The recognized sequences are \b * \f \n \r \t \\ \" and the octal format. */ extern gchar* g_strcompress (const gchar *source) __attribute__((__malloc__)); /* Copy a string escaping nonprintable characters like in C strings. * Inverse of g_strcompress. The exceptions parameter, if non-NULL, points * to a string containing characters that are not to be escaped. * * Deprecated API: gchar* g_strescape (const gchar *source); * Luckily this function wasn't used much, using NULL as second parameter * provides mostly identical semantics. */ extern gchar* g_strescape (const gchar *source, const gchar *exceptions) __attribute__((__malloc__)); extern gpointer g_memdup (gconstpointer mem, guint byte_size) __attribute__((__alloc_size__(2))); /* NULL terminated string arrays. * g_strsplit(), g_strsplit_set() split up string into max_tokens tokens * at delim and return a newly allocated string array. * g_strjoinv() concatenates all of str_array's strings, sliding in an * optional separator, the returned string is newly allocated. * g_strfreev() frees the array itself and all of its strings. * g_strdupv() copies a NULL-terminated array of strings * g_strv_length() returns the length of a NULL-terminated array of strings */ typedef gchar** GStrv; extern gchar** g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens); extern gchar ** g_strsplit_set (const gchar *string, const gchar *delimiters, gint max_tokens); extern gchar* g_strjoinv (const gchar *separator, gchar **str_array) __attribute__((__malloc__)); extern void g_strfreev (gchar **str_array); extern gchar** g_strdupv (gchar **str_array); extern guint g_strv_length (gchar **str_array); extern gchar* g_stpcpy (gchar *dest, const char *src); extern gchar * g_str_to_ascii (const gchar *str, const gchar *from_locale); extern gchar ** g_str_tokenize_and_fold (const gchar *string, const gchar *translit_locale, gchar ***ascii_alternates); extern gboolean g_str_match_string (const gchar *search_term, const gchar *potential_hit, gboolean accept_alternates); extern gboolean g_strv_contains (const gchar * const *strv, const gchar *str); /* Convenience ASCII string to number API */ /** * GNumberParserError: * @G_NUMBER_PARSER_ERROR_INVALID: String was not a valid number. * @G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS: String was a number, but out of bounds. * * Error codes returned by functions converting a string to a number. * * Since: 2.54 */ typedef enum { G_NUMBER_PARSER_ERROR_INVALID, G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS, } GNumberParserError; /** * G_NUMBER_PARSER_ERROR: * * Domain for errors returned by functions converting a string to a * number. * * Since: 2.54 */ extern GQuark g_number_parser_error_quark (void); extern gboolean g_ascii_string_to_signed (const gchar *str, guint base, gint64 min, gint64 max, gint64 *out_num, GError **error); extern gboolean g_ascii_string_to_unsigned (const gchar *str, guint base, guint64 min, guint64 max, guint64 *out_num, GError **error); # 80 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 81 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gstringchunk.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gstringchunk.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gstringchunk.h" 2 typedef struct _GStringChunk GStringChunk; extern GStringChunk* g_string_chunk_new (gsize size); extern void g_string_chunk_free (GStringChunk *chunk); extern void g_string_chunk_clear (GStringChunk *chunk); extern gchar* g_string_chunk_insert (GStringChunk *chunk, const gchar *string); extern gchar* g_string_chunk_insert_len (GStringChunk *chunk, const gchar *string, gssize len); extern gchar* g_string_chunk_insert_const (GStringChunk *chunk, const gchar *string); # 82 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gtestutils.h" 1 /* GLib testing utilities * Copyright (C) 2007 Imendio AB * Authors: Tim Janik * * 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 * License along with this library; if not, see . */ # 26 "/usr/include/glib-2.0/glib/gtestutils.h" # 1 "/usr/include/glib-2.0/glib/gmessages.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 27 "/usr/include/glib-2.0/glib/gtestutils.h" 2 # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 28 "/usr/include/glib-2.0/glib/gtestutils.h" 2 # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 /* gerror.h - Error reporting system * * Copyright 2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 29 "/usr/include/glib-2.0/glib/gtestutils.h" 2 # 1 "/usr/include/glib-2.0/glib/gslist.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 30 "/usr/include/glib-2.0/glib/gtestutils.h" 2 # 1 "/usr/include/string.h" 1 3 4 # 1 "/usr/include/string.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.21 String handling */ # 31 "/usr/include/glib-2.0/glib/gtestutils.h" 2 # 34 "/usr/include/glib-2.0/glib/gtestutils.h" typedef struct GTestCase GTestCase; typedef struct GTestSuite GTestSuite; typedef void (*GTestFunc) (void); typedef void (*GTestDataFunc) (gconstpointer user_data); typedef void (*GTestFixtureFunc) (gpointer fixture, gconstpointer user_data); /* assertion API */ # 124 "/usr/include/glib-2.0/glib/gtestutils.h" extern int g_strcmp0 (const char *str1, const char *str2); /* report performance results */ extern void g_test_minimized_result (double minimized_quantity, const char *format, ...) __attribute__((__format__ (__printf__, 2, 3))); extern void g_test_maximized_result (double maximized_quantity, const char *format, ...) __attribute__((__format__ (__printf__, 2, 3))); /* initialize testing framework */ extern void g_test_init (int *argc, char ***argv, ...) __attribute__((__sentinel__)); /* query testing framework config */ # 152 "/usr/include/glib-2.0/glib/gtestutils.h" extern gboolean g_test_subprocess (void); /* run all tests under toplevel suite (path: /) */ extern int g_test_run (void); /* hook up a test functions under test path */ extern void g_test_add_func (const char *testpath, GTestFunc test_func); extern void g_test_add_data_func (const char *testpath, gconstpointer test_data, GTestDataFunc test_func); extern void g_test_add_data_func_full (const char *testpath, gpointer test_data, GTestDataFunc test_func, GDestroyNotify data_free_func); /* tell about failure */ extern void g_test_fail (void); extern void g_test_incomplete (const gchar *msg); extern void g_test_skip (const gchar *msg); extern gboolean g_test_failed (void); extern void g_test_set_nonfatal_assertions (void); /* hook up a test with fixture under test path */ # 199 "/usr/include/glib-2.0/glib/gtestutils.h" /* add test messages to the test report */ extern void g_test_message (const char *format, ...) __attribute__((__format__ (__printf__, 1, 2))); extern void g_test_bug_base (const char *uri_pattern); extern void g_test_bug (const char *bug_uri_snippet); /* measure test timings */ extern void g_test_timer_start (void); extern double g_test_timer_elapsed (void); /* elapsed seconds */ extern double g_test_timer_last (void); /* repeat last elapsed() result */ /* automatically g_free or g_object_unref upon teardown */ extern void g_test_queue_free (gpointer gfree_pointer); extern void g_test_queue_destroy (GDestroyNotify destroy_func, gpointer destroy_data); typedef enum { G_TEST_TRAP_SILENCE_STDOUT = 1 << 7, G_TEST_TRAP_SILENCE_STDERR = 1 << 8, G_TEST_TRAP_INHERIT_STDIN = 1 << 9 } GTestTrapFlags; __attribute__((__deprecated__("Use '" "g_test_trap_subprocess" "' instead"))) extern gboolean g_test_trap_fork (guint64 usec_timeout, GTestTrapFlags test_trap_flags); typedef enum { G_TEST_SUBPROCESS_INHERIT_STDIN = 1 << 0, G_TEST_SUBPROCESS_INHERIT_STDOUT = 1 << 1, G_TEST_SUBPROCESS_INHERIT_STDERR = 1 << 2 } GTestSubprocessFlags; extern void g_test_trap_subprocess (const char *test_path, guint64 usec_timeout, GTestSubprocessFlags test_flags); extern gboolean g_test_trap_has_passed (void); extern gboolean g_test_trap_reached_timeout (void); /* provide seed-able random numbers for tests */ extern gint32 g_test_rand_int (void); extern gint32 g_test_rand_int_range (gint32 begin, gint32 end); extern double g_test_rand_double (void); extern double g_test_rand_double_range (double range_start, double range_end); /* * semi-internal API: non-documented symbols with stable ABI. You * should use the non-internal helper macros instead. However, for * compatibility reason, you may use this semi-internal API. */ extern GTestCase* g_test_create_case (const char *test_name, gsize data_size, gconstpointer test_data, GTestFixtureFunc data_setup, GTestFixtureFunc data_test, GTestFixtureFunc data_teardown); extern GTestSuite* g_test_create_suite (const char *suite_name); extern GTestSuite* g_test_get_root (void); extern void g_test_suite_add (GTestSuite *suite, GTestCase *test_case); extern void g_test_suite_add_suite (GTestSuite *suite, GTestSuite *nestedsuite); extern int g_test_run_suite (GTestSuite *suite); extern void g_test_trap_assertions (const char *domain, const char *file, int line, const char *func, guint64 assertion_flags, /* 0-pass, 1-fail, 2-outpattern, 4-errpattern */ const char *pattern); extern void g_assertion_message (const char *domain, const char *file, int line, const char *func, const char *message); extern void g_assertion_message_expr (const char *domain, const char *file, int line, const char *func, const char *expr) __attribute__((__noreturn__)); extern void g_assertion_message_cmpstr (const char *domain, const char *file, int line, const char *func, const char *expr, const char *arg1, const char *cmp, const char *arg2); extern void g_assertion_message_cmpnum (const char *domain, const char *file, int line, const char *func, const char *expr, long double arg1, const char *cmp, long double arg2, char numtype); extern void g_assertion_message_error (const char *domain, const char *file, int line, const char *func, const char *expr, const GError *error, GQuark error_domain, int error_code); extern void g_test_add_vtable (const char *testpath, gsize data_size, gconstpointer test_data, GTestFixtureFunc data_setup, GTestFixtureFunc data_test, GTestFixtureFunc data_teardown); typedef struct { gboolean test_initialized; gboolean test_quick; /* disable thorough tests */ gboolean test_perf; /* run performance tests */ gboolean test_verbose; /* extra info */ gboolean test_quiet; /* reduce output */ gboolean test_undefined; /* run tests that are meant to assert */ } GTestConfig; extern const GTestConfig * const g_test_config_vars; /* internal logging API */ typedef enum { G_TEST_RUN_SUCCESS, G_TEST_RUN_SKIPPED, G_TEST_RUN_FAILURE, G_TEST_RUN_INCOMPLETE } GTestResult; typedef enum { G_TEST_LOG_NONE, G_TEST_LOG_ERROR, /* s:msg */ G_TEST_LOG_START_BINARY, /* s:binaryname s:seed */ G_TEST_LOG_LIST_CASE, /* s:testpath */ G_TEST_LOG_SKIP_CASE, /* s:testpath */ G_TEST_LOG_START_CASE, /* s:testpath */ G_TEST_LOG_STOP_CASE, /* d:status d:nforks d:elapsed */ G_TEST_LOG_MIN_RESULT, /* s:blurb d:result */ G_TEST_LOG_MAX_RESULT, /* s:blurb d:result */ G_TEST_LOG_MESSAGE, /* s:blurb */ G_TEST_LOG_START_SUITE, G_TEST_LOG_STOP_SUITE } GTestLogType; typedef struct { GTestLogType log_type; guint n_strings; gchar **strings; /* NULL terminated */ guint n_nums; long double *nums; } GTestLogMsg; typedef struct { /*< private >*/ GString *data; GSList *msgs; } GTestLogBuffer; extern const char* g_test_log_type_name (GTestLogType log_type); extern GTestLogBuffer* g_test_log_buffer_new (void); extern void g_test_log_buffer_free (GTestLogBuffer *tbuffer); extern void g_test_log_buffer_push (GTestLogBuffer *tbuffer, guint n_bytes, const guint8 *bytes); extern GTestLogMsg* g_test_log_buffer_pop (GTestLogBuffer *tbuffer); extern void g_test_log_msg_free (GTestLogMsg *tmsg); /** * GTestLogFatalFunc: * @log_domain: the log domain of the message * @log_level: the log level of the message (including the fatal and recursion flags) * @message: the message to process * @user_data: user data, set in g_test_log_set_fatal_handler() * * Specifies the prototype of fatal log handler functions. * * Returns: %TRUE if the program should abort, %FALSE otherwise * * Since: 2.22 */ typedef gboolean (*GTestLogFatalFunc) (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data); extern void g_test_log_set_fatal_handler (GTestLogFatalFunc log_func, gpointer user_data); extern void g_test_expect_message (const gchar *log_domain, GLogLevelFlags log_level, const gchar *pattern); extern void g_test_assert_expected_messages_internal (const char *domain, const char *file, int line, const char *func); typedef enum { G_TEST_DIST, G_TEST_BUILT } GTestFileType; extern gchar * g_test_build_filename (GTestFileType file_type, const gchar *first_path, ...) __attribute__((__sentinel__)); extern const gchar *g_test_get_dir (GTestFileType file_type); extern const gchar *g_test_get_filename (GTestFileType file_type, const gchar *first_path, ...) __attribute__((__sentinel__)); # 83 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 84 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gthreadpool.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gthreadpool.h" # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gthreadpool.h" 2 typedef struct _GThreadPool GThreadPool; /* Thread Pools */ struct _GThreadPool { GFunc func; gpointer user_data; gboolean exclusive; }; extern GThreadPool * g_thread_pool_new (GFunc func, gpointer user_data, gint max_threads, gboolean exclusive, GError **error); extern void g_thread_pool_free (GThreadPool *pool, gboolean immediate, gboolean wait_); extern gboolean g_thread_pool_push (GThreadPool *pool, gpointer data, GError **error); extern guint g_thread_pool_unprocessed (GThreadPool *pool); extern void g_thread_pool_set_sort_function (GThreadPool *pool, GCompareDataFunc func, gpointer user_data); extern gboolean g_thread_pool_move_to_front (GThreadPool *pool, gpointer data); extern gboolean g_thread_pool_set_max_threads (GThreadPool *pool, gint max_threads, GError **error); extern gint g_thread_pool_get_max_threads (GThreadPool *pool); extern guint g_thread_pool_get_num_threads (GThreadPool *pool); extern void g_thread_pool_set_max_unused_threads (gint max_threads); extern gint g_thread_pool_get_max_unused_threads (void); extern guint g_thread_pool_get_num_unused_threads (void); extern void g_thread_pool_stop_unused_threads (void); extern void g_thread_pool_set_max_idle_time (guint interval); extern guint g_thread_pool_get_max_idle_time (void); # 85 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gtimer.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gtimer.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gtimer.h" 2 /* Timer */ /* microseconds per second */ typedef struct _GTimer GTimer; extern GTimer* g_timer_new (void); extern void g_timer_destroy (GTimer *timer); extern void g_timer_start (GTimer *timer); extern void g_timer_stop (GTimer *timer); extern void g_timer_reset (GTimer *timer); extern void g_timer_continue (GTimer *timer); extern gdouble g_timer_elapsed (GTimer *timer, gulong *microseconds); extern void g_usleep (gulong microseconds); extern void g_time_val_add (GTimeVal *time_, glong microseconds); extern gboolean g_time_val_from_iso8601 (const gchar *iso_date, GTimeVal *time_); extern gchar* g_time_val_to_iso8601 (GTimeVal *time_) __attribute__((__malloc__)); # 86 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gtimezone.h" 1 /* * Copyright © 2010 Codethink Limited * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ # 87 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gtrashstack.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gtrashstack.h" # 1 "/usr/include/glib-2.0/glib/gutils.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gtrashstack.h" 2 typedef struct _GTrashStack GTrashStack; struct _GTrashStack { GTrashStack *next; }; __attribute__((__deprecated__)) extern void g_trash_stack_push (GTrashStack **stack_p, gpointer data_p); __attribute__((__deprecated__)) extern gpointer g_trash_stack_pop (GTrashStack **stack_p); __attribute__((__deprecated__)) extern gpointer g_trash_stack_peek (GTrashStack **stack_p); __attribute__((__deprecated__)) extern guint g_trash_stack_height (GTrashStack **stack_p); # 88 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gtree.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gtree.h" # 1 "/usr/include/glib-2.0/glib/gnode.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gtree.h" 2 typedef struct _GTree GTree; typedef gboolean (*GTraverseFunc) (gpointer key, gpointer value, gpointer data); /* Balanced binary trees */ extern GTree* g_tree_new (GCompareFunc key_compare_func); extern GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func, gpointer key_compare_data); extern GTree* g_tree_new_full (GCompareDataFunc key_compare_func, gpointer key_compare_data, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func); extern GTree* g_tree_ref (GTree *tree); extern void g_tree_unref (GTree *tree); extern void g_tree_destroy (GTree *tree); extern void g_tree_insert (GTree *tree, gpointer key, gpointer value); extern void g_tree_replace (GTree *tree, gpointer key, gpointer value); extern gboolean g_tree_remove (GTree *tree, gconstpointer key); extern gboolean g_tree_steal (GTree *tree, gconstpointer key); extern gpointer g_tree_lookup (GTree *tree, gconstpointer key); extern gboolean g_tree_lookup_extended (GTree *tree, gconstpointer lookup_key, gpointer *orig_key, gpointer *value); extern void g_tree_foreach (GTree *tree, GTraverseFunc func, gpointer user_data); __attribute__((__deprecated__)) extern void g_tree_traverse (GTree *tree, GTraverseFunc traverse_func, GTraverseType traverse_type, gpointer user_data); extern gpointer g_tree_search (GTree *tree, GCompareFunc search_func, gconstpointer user_data); extern gint g_tree_height (GTree *tree); extern gint g_tree_nnodes (GTree *tree); # 89 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 90 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gunicode.h" 1 /* gunicode.h - Unicode manipulation functions * * Copyright (C) 1999, 2000 Tom Tromey * Copyright 2000, 2005 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 91 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gurifuncs.h" 1 /* GIO - GLib Input, Output and Streaming Library * * Copyright (C) 2006-2007 Red Hat, Inc. * * 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 License along with this library; if not, see . * * Author: Alexander Larsson */ # 28 "/usr/include/glib-2.0/glib/gurifuncs.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 29 "/usr/include/glib-2.0/glib/gurifuncs.h" 2 /** * G_URI_RESERVED_CHARS_GENERIC_DELIMITERS: * * Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@". **/ /** * G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS: * * Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=". **/ /** * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT: * * Allowed characters in path elements. Includes "!$&'()*+,;=:@". **/ /** * G_URI_RESERVED_CHARS_ALLOWED_IN_PATH: * * Allowed characters in a path. Includes "!$&'()*+,;=:@/". **/ /** * G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO: * * Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:". **/ extern char * g_uri_unescape_string (const char *escaped_string, const char *illegal_characters); extern char * g_uri_unescape_segment (const char *escaped_string, const char *escaped_string_end, const char *illegal_characters); extern char * g_uri_parse_scheme (const char *uri); extern char * g_uri_escape_string (const char *unescaped, const char *reserved_chars_allowed, gboolean allow_utf8); # 92 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gutils.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 93 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/guuid.h" 1 /* guuid.h - UUID functions * * Copyright (C) 2013-2015, 2017 Red Hat, Inc. * * 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 * licence, or (at your option) any later version. * * This 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 * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA. * * Authors: Marc-André Lureau */ # 30 "/usr/include/glib-2.0/glib/guuid.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 31 "/usr/include/glib-2.0/glib/guuid.h" 2 extern gboolean g_uuid_string_is_valid (const gchar *str); extern gchar * g_uuid_string_random (void); # 94 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gvarianttype.h" 1 /* * Copyright © 2007, 2008 Ryan Lortie * Copyright © 2009, 2010 Codethink Limited * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ # 95 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gvariant.h" 1 /* * Copyright © 2007, 2008 Ryan Lortie * Copyright © 2009, 2010 Codethink Limited * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ # 96 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gversion.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/gversion.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/gversion.h" 2 extern const guint glib_major_version; extern const guint glib_minor_version; extern const guint glib_micro_version; extern const guint glib_interface_age; extern const guint glib_binary_age; extern const gchar * glib_check_version (guint required_major, guint required_minor, guint required_micro); # 97 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/gversionmacros.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 98 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" 1 /* * 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 * License along with this library; if not, see . */ # 23 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 24 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" 2 typedef struct _GAllocator GAllocator; typedef struct _GMemChunk GMemChunk; # 42 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" __attribute__((__deprecated__)) extern GMemChunk * g_mem_chunk_new (const gchar *name, gint atom_size, gsize area_size, gint type); __attribute__((__deprecated__)) extern void g_mem_chunk_destroy (GMemChunk *mem_chunk); __attribute__((__deprecated__)) extern gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk); __attribute__((__deprecated__)) extern gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk); __attribute__((__deprecated__)) extern void g_mem_chunk_free (GMemChunk *mem_chunk, gpointer mem); __attribute__((__deprecated__)) extern void g_mem_chunk_clean (GMemChunk *mem_chunk); __attribute__((__deprecated__)) extern void g_mem_chunk_reset (GMemChunk *mem_chunk); __attribute__((__deprecated__)) extern void g_mem_chunk_print (GMemChunk *mem_chunk); __attribute__((__deprecated__)) extern void g_mem_chunk_info (void); __attribute__((__deprecated__)) extern void g_blow_chunks (void); __attribute__((__deprecated__)) extern GAllocator * g_allocator_new (const gchar *name, guint n_preallocs); __attribute__((__deprecated__)) extern void g_allocator_free (GAllocator *allocator); __attribute__((__deprecated__)) extern void g_list_push_allocator (GAllocator *allocator); __attribute__((__deprecated__)) extern void g_list_pop_allocator (void); __attribute__((__deprecated__)) extern void g_slist_push_allocator (GAllocator *allocator); __attribute__((__deprecated__)) extern void g_slist_pop_allocator (void); __attribute__((__deprecated__)) extern void g_node_push_allocator (GAllocator *allocator); __attribute__((__deprecated__)) extern void g_node_pop_allocator (void); # 104 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/deprecated/gcache.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/deprecated/gcache.h" # 1 "/usr/include/glib-2.0/glib/glist.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/deprecated/gcache.h" 2 typedef struct _GCache GCache; typedef gpointer (*GCacheNewFunc) (gpointer key); typedef gpointer (*GCacheDupFunc) (gpointer value); typedef void (*GCacheDestroyFunc) (gpointer value); /* Caches */ __attribute__((__deprecated__)) extern GCache* g_cache_new (GCacheNewFunc value_new_func, GCacheDestroyFunc value_destroy_func, GCacheDupFunc key_dup_func, GCacheDestroyFunc key_destroy_func, GHashFunc hash_key_func, GHashFunc hash_value_func, GEqualFunc key_equal_func); __attribute__((__deprecated__)) extern void g_cache_destroy (GCache *cache); __attribute__((__deprecated__)) extern gpointer g_cache_insert (GCache *cache, gpointer key); __attribute__((__deprecated__)) extern void g_cache_remove (GCache *cache, gconstpointer value); __attribute__((__deprecated__)) extern void g_cache_key_foreach (GCache *cache, GHFunc func, gpointer user_data); __attribute__((__deprecated__)) extern void g_cache_value_foreach (GCache *cache, GHFunc func, gpointer user_data); # 105 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/deprecated/gcompletion.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/deprecated/gcompletion.h" # 1 "/usr/include/glib-2.0/glib/glist.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/deprecated/gcompletion.h" 2 typedef struct _GCompletion GCompletion; typedef gchar* (*GCompletionFunc) (gpointer); /* GCompletion */ typedef gint (*GCompletionStrncmpFunc) (const gchar *s1, const gchar *s2, gsize n); struct _GCompletion { GList* items; GCompletionFunc func; gchar* prefix; GList* cache; GCompletionStrncmpFunc strncmp_func; }; __attribute__((__deprecated__)) extern GCompletion* g_completion_new (GCompletionFunc func); __attribute__((__deprecated__)) extern void g_completion_add_items (GCompletion* cmp, GList* items); __attribute__((__deprecated__)) extern void g_completion_remove_items (GCompletion* cmp, GList* items); __attribute__((__deprecated__)) extern void g_completion_clear_items (GCompletion* cmp); __attribute__((__deprecated__)) extern GList* g_completion_complete (GCompletion* cmp, const gchar* prefix, gchar** new_prefix); __attribute__((__deprecated__)) extern GList* g_completion_complete_utf8 (GCompletion *cmp, const gchar* prefix, gchar** new_prefix); __attribute__((__deprecated__)) extern void g_completion_set_compare (GCompletion *cmp, GCompletionStrncmpFunc strncmp_func); __attribute__((__deprecated__)) extern void g_completion_free (GCompletion* cmp); # 106 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/deprecated/gmain.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/deprecated/gmain.h" # 1 "/usr/include/glib-2.0/glib/gmain.h" 1 /* gmain.h - the GLib Main loop * Copyright (C) 1998-2000 Red Hat, Inc. * * 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 License * along with this library; if not, see . */ # 33 "/usr/include/glib-2.0/glib/deprecated/gmain.h" 2 /* ============== Compat main loop stuff ================== */ /** * g_main_new: * @is_running: set to %TRUE to indicate that the loop is running. This * is not very important since calling g_main_run() will set this * to %TRUE anyway. * * Creates a new #GMainLoop for th default main context. * * Returns: a new #GMainLoop * * Deprecated: 2.2: Use g_main_loop_new() instead */ /** * g_main_run: * @loop: a #GMainLoop * * Runs a main loop until it stops running. * * Deprecated: 2.2: Use g_main_loop_run() instead */ /** * g_main_quit: * @loop: a #GMainLoop * * Stops the #GMainLoop. * If g_main_run() was called to run the #GMainLoop, it will now return. * * Deprecated: 2.2: Use g_main_loop_quit() instead */ /** * g_main_destroy: * @loop: a #GMainLoop * * Frees the memory allocated for the #GMainLoop. * * Deprecated: 2.2: Use g_main_loop_unref() instead */ /** * g_main_is_running: * @loop: a #GMainLoop * * Checks if the main loop is running. * * Returns: %TRUE if the main loop is running * * Deprecated: 2.2: Use g_main_loop_is_running() instead */ /** * g_main_iteration: * @may_block: set to %TRUE if it should block (i.e. wait) until an event * source becomes ready. It will return after an event source has been * processed. If set to %FALSE it will return immediately if no event * source is ready to be processed. * * Runs a single iteration for the default #GMainContext. * * Returns: %TRUE if more events are pending. * * Deprecated: 2.2: Use g_main_context_iteration() instead. */ /** * g_main_pending: * * Checks if any events are pending for the default #GMainContext * (i.e. ready to be processed). * * Returns: %TRUE if any events are pending. * * Deprected: 2.2: Use g_main_context_pending() instead. */ /** * g_main_set_poll_func: * @func: the function to call to poll all file descriptors * * Sets the function to use for the handle polling of file descriptors * for the default main context. * * Deprecated: 2.2: Use g_main_context_set_poll_func() again */ # 107 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/deprecated/grel.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/deprecated/grel.h" # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/deprecated/grel.h" 2 typedef struct _GRelation GRelation; typedef struct _GTuples GTuples; struct _GTuples { guint len; }; /* GRelation * * Indexed Relations. Imagine a really simple table in a * database. Relations are not ordered. This data type is meant for * maintaining a N-way mapping. * * g_relation_new() creates a relation with FIELDS fields * * g_relation_destroy() frees all resources * g_tuples_destroy() frees the result of g_relation_select() * * g_relation_index() indexes relation FIELD with the provided * equality and hash functions. this must be done before any * calls to insert are made. * * g_relation_insert() inserts a new tuple. you are expected to * provide the right number of fields. * * g_relation_delete() deletes all relations with KEY in FIELD * g_relation_select() returns ... * g_relation_count() counts ... */ __attribute__((__deprecated__)) extern GRelation* g_relation_new (gint fields); __attribute__((__deprecated__)) extern void g_relation_destroy (GRelation *relation); __attribute__((__deprecated__)) extern void g_relation_index (GRelation *relation, gint field, GHashFunc hash_func, GEqualFunc key_equal_func); __attribute__((__deprecated__)) extern void g_relation_insert (GRelation *relation, ...); __attribute__((__deprecated__)) extern gint g_relation_delete (GRelation *relation, gconstpointer key, gint field); __attribute__((__deprecated__)) extern GTuples* g_relation_select (GRelation *relation, gconstpointer key, gint field); __attribute__((__deprecated__)) extern gint g_relation_count (GRelation *relation, gconstpointer key, gint field); __attribute__((__deprecated__)) extern gboolean g_relation_exists (GRelation *relation, ...); __attribute__((__deprecated__)) extern void g_relation_print (GRelation *relation); __attribute__((__deprecated__)) extern void g_tuples_destroy (GTuples *tuples); __attribute__((__deprecated__)) extern gpointer g_tuples_index (GTuples *tuples, gint index_, gint field); # 108 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 32 "/usr/include/glib-2.0/glib/deprecated/gthread.h" # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * 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 * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with * GLib at ftp://ftp.gtk.org/pub/gtk/. */ # 33 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 2 typedef enum { G_THREAD_PRIORITY_LOW, G_THREAD_PRIORITY_NORMAL, G_THREAD_PRIORITY_HIGH, G_THREAD_PRIORITY_URGENT } GThreadPriority; struct _GThread { /*< private >*/ GThreadFunc func; gpointer data; gboolean joinable; GThreadPriority priority; }; typedef struct _GThreadFunctions GThreadFunctions; struct _GThreadFunctions { GMutex* (*mutex_new) (void); void (*mutex_lock) (GMutex *mutex); gboolean (*mutex_trylock) (GMutex *mutex); void (*mutex_unlock) (GMutex *mutex); void (*mutex_free) (GMutex *mutex); GCond* (*cond_new) (void); void (*cond_signal) (GCond *cond); void (*cond_broadcast) (GCond *cond); void (*cond_wait) (GCond *cond, GMutex *mutex); gboolean (*cond_timed_wait) (GCond *cond, GMutex *mutex, GTimeVal *end_time); void (*cond_free) (GCond *cond); GPrivate* (*private_new) (GDestroyNotify destructor); gpointer (*private_get) (GPrivate *private_key); void (*private_set) (GPrivate *private_key, gpointer data); void (*thread_create) (GThreadFunc func, gpointer data, gulong stack_size, gboolean joinable, gboolean bound, GThreadPriority priority, gpointer thread, GError **error); void (*thread_yield) (void); void (*thread_join) (gpointer thread); void (*thread_exit) (void); void (*thread_set_priority)(gpointer thread, GThreadPriority priority); void (*thread_self) (gpointer thread); gboolean (*thread_equal) (gpointer thread1, gpointer thread2); }; extern GThreadFunctions g_thread_functions_for_glib_use; extern gboolean g_thread_use_default_impl; extern guint64 (*g_thread_gettime) (void); __attribute__((__deprecated__("Use '" "g_thread_new" "' instead"))) extern GThread *g_thread_create (GThreadFunc func, gpointer data, gboolean joinable, GError **error); __attribute__((__deprecated__("Use '" "g_thread_new" "' instead"))) extern GThread *g_thread_create_full (GThreadFunc func, gpointer data, gulong stack_size, gboolean joinable, gboolean bound, GThreadPriority priority, GError **error); __attribute__((__deprecated__)) extern void g_thread_set_priority (GThread *thread, GThreadPriority priority); __attribute__((__deprecated__)) extern void g_thread_foreach (GFunc thread_func, gpointer user_data); # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ # 128 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 2 # 1 "/usr/include/pthread.h" 1 3 4 /* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/endian.h" 1 3 4 /* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/sched.h" 1 3 4 /* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/sched.h" 2 3 4 /* Get type definitions. */ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 26 "/usr/include/sched.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 30 "/usr/include/sched.h" 2 3 4 # 42 "/usr/include/sched.h" 3 4 /* Get system specific constant and data structure definitions. */ # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4 /* Definitions of constants and data structure for POSIX 1003.1b-1993 scheduling interface. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 27 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 /* Scheduling algorithms. */ # 41 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 /* Cloning flags. */ # 74 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 /* Data structure to describe a process' schedulability. */ struct sched_param { int sched_priority; }; /* Clone current process. */ extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)); /* Unshare the specified resources. */ extern int unshare (int __flags) __attribute__ ((__nothrow__ , __leaf__)); /* Get index of currently used CPU. */ extern int sched_getcpu (void) __attribute__ ((__nothrow__ , __leaf__)); /* Switch process to namespace of type NSTYPE indicated by FD. */ extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ , __leaf__)); # 44 "/usr/include/sched.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 1 3 4 /* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993 scheduling interface. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 27 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 /* Size definition for CPU sets. */ /* Type for array elements in 'cpu_set_t'. */ typedef unsigned long int __cpu_mask; /* Basic access functions. */ /* Data structure to describe CPU mask. */ typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; /* Access functions for CPU masks. */ # 115 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) __attribute__ ((__nothrow__ , __leaf__)); extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) /* Ignore */; extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__)); # 45 "/usr/include/sched.h" 2 3 4 /* Backward compatibility. */ /* Set scheduling parameters for a process. */ extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); /* Retrieve scheduling parameters for a particular process. */ extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); /* Set scheduling algorithm and/or parameters for a process. */ extern int sched_setscheduler (__pid_t __pid, int __policy, const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); /* Retrieve scheduling algorithm for a particular purpose. */ extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); /* Yield the processor. */ extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__)); /* Get maximum priority value for a scheduler. */ extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); /* Get minimum priority value for a scheduler. */ extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); /* Get the SCHED_RR interval for the named process. */ extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__)); /* Access macros for `cpu_set'. */ # 120 "/usr/include/sched.h" 3 4 /* Set the CPU affinity for a task */ extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); /* Get the CPU affinity for a task */ extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); # 24 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/time.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ # 25 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 /* Declaration of common pthread types for all architectures. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 27 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4 /* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Define the machine-dependent type `jmp_buf'. x86-64 version. */ # 28 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 29 "/usr/include/pthread.h" 2 3 4 /* Detach state. */ enum { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED }; /* Mutex types. */ enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL /* For compatibility. */ , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP }; /* Robust mutex or not flags. */ enum { PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST }; /* Mutex protocols. */ enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; # 113 "/usr/include/pthread.h" 3 4 /* Read-write lock types. */ enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; /* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t has the shared field. All 64-bit architectures have the shared field in pthread_rwlock_t. */ /* Read-write lock initializers. */ # 155 "/usr/include/pthread.h" 3 4 /* Scheduler inheritance. */ enum { PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED }; /* Scope handling. */ enum { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS }; /* Process shared or private flag. */ enum { PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED }; /* Conditional variable handling. */ /* Cleanup buffers */ struct _pthread_cleanup_buffer { void (*__routine) (void *); /* Function to call. */ void *__arg; /* Its argument. */ int __canceltype; /* Saved cancellation type. */ struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */ }; /* Cancellation */ enum { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS }; /* Single execution handling. */ /* Value returned by 'pthread_barrier_wait' for one of the threads after the required number of threads have called this function. -1 is distinct from 0 and all errno constants */ /* Create a new thread, starting with execution of START-ROUTINE getting passed ARG. Creation attributed come from ATTR. The new handle is stored in *NEWTHREAD. */ extern int pthread_create (pthread_t *__restrict __newthread, const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); /* Terminate calling thread. The registered cleanup handlers are called via exception handling so we cannot mark this function with __THROW.*/ extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); /* Make calling thread wait for termination of the thread TH. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_join (pthread_t __th, void **__thread_return); /* Check whether thread TH has terminated. If yes return the status of the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__ , __leaf__)); /* Make calling thread wait for termination of the thread TH, but only until TIMEOUT. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, const struct timespec *__abstime); /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. The resources of TH will therefore be freed immediately when it terminates, instead of waiting for another thread to perform PTHREAD_JOIN on it. */ extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__)); /* Obtain the identifier of the current thread. */ extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* Compare two thread identifiers. */ extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); /* Thread attribute handling. */ /* Initialize thread attribute *ATTR with default attributes (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER, no user-provided stack). */ extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy thread attribute *ATTR. */ extern int pthread_attr_destroy (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get detach state attribute. */ extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set detach state attribute. */ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get the size of the guard area created for stack overflow protection. */ extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, size_t *__guardsize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the size of the guard area created for stack overflow protection. */ extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return in *PARAM the scheduling parameters of *ATTR. */ extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, const struct sched_param *__restrict __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Return in *POLICY the scheduling policy of *ATTR. */ extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set scheduling policy in *ATTR according to POLICY. */ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set scheduling inheritance mode in *ATTR according to INHERIT. */ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return in *SCOPE the scheduling contention scope of *ATTR. */ extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set scheduling contention scope in *ATTR according to SCOPE. */ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return the previously set address for the stack. */ extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); /* Set the starting address of the stack of the thread to be created. Depending on whether the stack grows up or down the value must either be higher or lower than all the address in the memory block. The minimal size of the block must be PTHREAD_STACK_MIN. */ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); /* Return the currently used minimal stack size. */ extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Add information about the minimum stack size needed for the thread to be started. This size must never be less than PTHREAD_STACK_MIN and must also not exceed the system limits. */ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return the previously set address for the stack. */ extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); /* The following two interfaces are intended to replace the last two. They require setting the address as well as the size since only setting the address will make the implementation on some architectures impossible. */ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Thread created with attribute ATTR will be limited to run only on the processors represented in CPUSET. */ extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); /* Get bit set in CPUSET representing the processors threads created with ATTR can run on. */ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); /* Get the default attributes used by pthread_create in this process. */ extern int pthread_getattr_default_np (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Set the default attributes to be used by pthread_create in this process. */ extern int pthread_setattr_default_np (const pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread TH. It shall be called on uninitialized ATTR and destroyed with pthread_attr_destroy when no longer needed. */ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Functions for scheduling control. */ /* Set the scheduling parameters for TARGET_THREAD according to POLICY and *PARAM. */ extern int pthread_setschedparam (pthread_t __target_thread, int __policy, const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); /* Set the scheduling priority for TARGET_THREAD. */ extern int pthread_setschedprio (pthread_t __target_thread, int __prio) __attribute__ ((__nothrow__ , __leaf__)); /* Get thread name visible in the kernel and its interfaces. */ extern int pthread_getname_np (pthread_t __target_thread, char *__buf, size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Set thread name visible in the kernel and its interfaces. */ extern int pthread_setname_np (pthread_t __target_thread, const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Determine level of concurrency. */ extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__ , __leaf__)); /* Set new concurrency level to LEVEL. */ extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__ , __leaf__)); /* Yield the processor to another thread or process. This function is similar to the POSIX `sched_yield' function but might be differently implemented in the case of a m-on-n thread implementation. */ extern int pthread_yield (void) __attribute__ ((__nothrow__ , __leaf__)); /* Limit specified thread TH to run only on the processors represented in CPUSET. */ extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); /* Get bit set in CPUSET representing the processors TH can run on. */ extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); /* Functions for handling initialization. */ /* Guarantee that the initialization function INIT_ROUTINE will be called only once, even if pthread_once is executed several times with the same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or extern variable initialized to PTHREAD_ONCE_INIT. The initialization functions might throw exception which is why this function is not marked with __THROW. */ extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); /* Functions for handling cancellation. Note that these functions are explicitly not marked to not throw an exception in C++ code. If cancellation is implemented by unwinding this is necessary to have the compiler generate the unwind information. */ /* Set cancelability state of current thread to STATE, returning old state in *OLDSTATE if OLDSTATE is not NULL. */ extern int pthread_setcancelstate (int __state, int *__oldstate); /* Set cancellation state of current thread to TYPE, returning the old type in *OLDTYPE if OLDTYPE is not NULL. */ extern int pthread_setcanceltype (int __type, int *__oldtype); /* Cancel THREAD immediately or at the next possibility. */ extern int pthread_cancel (pthread_t __th); /* Test for pending cancellation for the current thread and terminate the thread as per pthread_exit(PTHREAD_CANCELED) if it has been cancelled. */ extern void pthread_testcancel (void); /* Cancellation handling with integration into exception handling. */ typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); /* No special attributes by default. */ /* Structure to hold the cleanup handler information. */ struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; # 658 "/usr/include/pthread.h" 3 4 /* Install a cleanup handler: ROUTINE will be called with arguments ARG when the thread is canceled or calls pthread_exit. ROUTINE will also be called with arguments ARG when the matching pthread_cleanup_pop is executed with non-zero EXECUTE argument. pthread_cleanup_push and pthread_cleanup_pop are macros and must always be used in matching pairs at the same nesting level of braces. */ # 681 "/usr/include/pthread.h" 3 4 extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) ; /* Remove a cleanup handler installed by the matching pthread_cleanup_push. If EXECUTE is non-zero, the handler function is called. */ extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) ; /* Install a cleanup handler as pthread_cleanup_push does, but also saves the current cancellation type and sets it to deferred cancellation. */ # 716 "/usr/include/pthread.h" 3 4 extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) ; /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching pthread_cleanup_push_defer was called. */ extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) ; /* Internal interface to initiate cleanup. */ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) __attribute__ ((__noreturn__)) __attribute__ ((__weak__)) ; /* Function used in the macros. */ struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__)); /* Mutex handling. */ /* Initialize a mutex. */ extern int pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy a mutex. */ extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Try locking a mutex. */ extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Lock a mutex. */ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); /* Unlock a mutex. */ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Get the priority ceiling of MUTEX. */ extern int pthread_mutex_getprioceiling (const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the priority ceiling of MUTEX to PRIOCEILING, return old priority ceiling value in *OLD_CEILING. */ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); /* Declare the state protected by MUTEX as consistent. */ extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Functions for handling mutex attributes. */ /* Initialize mutex attribute object ATTR with default attributes (kind is PTHREAD_MUTEX_TIMED_NP). */ extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy mutex attribute object ATTR. */ extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return in *KIND the mutex kind attribute in *ATTR. */ extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or PTHREAD_MUTEX_DEFAULT). */ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the mutex protocol attribute in *ATTR to PROTOCOL (either PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */ extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */ extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */ extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, int *__robustness) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, int *__robustness) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, int __robustness) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Functions for handling read-write locks. */ /* Initialize read-write lock RWLOCK using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, const pthread_rwlockattr_t *__restrict __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy read-write lock RWLOCK. */ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Acquire read lock for RWLOCK. */ extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Try to acquire read lock for RWLOCK. */ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); /* Acquire write lock for RWLOCK. */ extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Try to acquire write lock for RWLOCK. */ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); /* Unlock RWLOCK. */ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Functions for handling read-write lock attributes. */ /* Initialize attribute object ATTR with default values. */ extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy attribute object ATTR. */ extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return current setting of process-shared attribute of ATTR in PSHARED. */ extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set process-shared attribute of ATTR to PSHARED. */ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Return current setting of reader/writer preference. */ extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set reader/write preference. */ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Functions for handling conditional variables. */ /* Initialize condition variable COND using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_cond_init (pthread_cond_t *__restrict __cond, const pthread_condattr_t *__restrict __cond_attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy condition variable COND. */ extern int pthread_cond_destroy (pthread_cond_t *__cond) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Wake up one thread waiting for condition variable COND. */ extern int pthread_cond_signal (pthread_cond_t *__cond) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Wake up all threads waiting for condition variables COND. */ extern int pthread_cond_broadcast (pthread_cond_t *__cond) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Wait for condition variable COND to be signaled or broadcast. MUTEX is assumed to be locked before. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __attribute__ ((__nonnull__ (1, 2))); /* Wait for condition variable COND to be signaled or broadcast until ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an absolute time specification; zero is the beginning of the epoch (00:00:00 GMT, January 1, 1970). This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); /* Functions for handling condition variable attributes. */ /* Initialize condition variable attribute ATTR. */ extern int pthread_condattr_init (pthread_condattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy condition variable attribute ATTR. */ extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get the clock selected for the condition variable attribute ATTR. */ extern int pthread_condattr_getclock (const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the clock selected for the condition variable attribute ATTR. */ extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Functions to handle spinlocks. */ /* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can be shared between different processes. */ extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy the spinlock LOCK. */ extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Wait until spinlock LOCK is retrieved. */ extern int pthread_spin_lock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Try to lock spinlock LOCK. */ extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Release spinlock LOCK. */ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Functions to handle barriers. */ /* Initialize BARRIER with the attributes in ATTR. The barrier is opened when COUNT waiters arrived. */ extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy a previously dynamically initialized barrier BARRIER. */ extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Wait on barrier BARRIER. */ extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); /* Initialize barrier attribute ATTR. */ extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy previously dynamically initialized barrier attribute ATTR. */ extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Get the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Set the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Functions for handling thread-specific data. */ /* Create a key value identifying a location in the thread-specific data area. Each thread maintains a distinct thread-specific data area. DESTR_FUNCTION, if non-NULL, is called with the value associated to that key when the key is destroyed. DESTR_FUNCTION is not called if the value associated is NULL when the key is destroyed. */ extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); /* Destroy KEY. */ extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__)); /* Return current value of the thread-specific data slot identified by KEY. */ extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__)); /* Store POINTER in the thread-specific data slot identified by KEY. */ extern int pthread_setspecific (pthread_key_t __key, const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ; /* Get ID of CPU-time clock for thread THREAD_ID. */ extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); /* Install handlers to be called when a new process is created with FORK. The PREPARE handler is called in the parent process just before performing FORK. The PARENT handler is called in the parent process just after FORK. The CHILD handler is called in the child process. Each of the three handlers can be NULL, meaning that no handler needs to be called at that point. PTHREAD_ATFORK can be called several times, in which case the PREPARE handlers are called in LIFO order (last added with PTHREAD_ATFORK, first called before FORK), and the PARENT and CHILD handlers are called in FIFO (first added, first called). */ extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__)); # 1160 "/usr/include/pthread.h" 3 4 # 129 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 2 # 133 "/usr/include/glib-2.0/glib/deprecated/gthread.h" typedef struct { GMutex *mutex; /* only for ABI compatibility reasons */ pthread_mutex_t unused; } GStaticMutex; # 149 "/usr/include/glib-2.0/glib/deprecated/gthread.h" __attribute__((__deprecated__("Use '" "g_mutex_init" "' instead"))) extern void g_static_mutex_init (GStaticMutex *mutex); __attribute__((__deprecated__("Use '" "g_mutex_clear" "' instead"))) extern void g_static_mutex_free (GStaticMutex *mutex); __attribute__((__deprecated__("Use '" "GMutex" "' instead"))) extern GMutex *g_static_mutex_get_mutex_impl (GStaticMutex *mutex); typedef struct _GStaticRecMutex GStaticRecMutex; struct _GStaticRecMutex { /*< private >*/ GStaticMutex mutex; guint depth; /* ABI compat only */ union { pthread_t owner; gdouble dummy; } unused; }; __attribute__((__deprecated__("Use '" "g_rec_mutex_init" "' instead"))) extern void g_static_rec_mutex_init (GStaticRecMutex *mutex); __attribute__((__deprecated__("Use '" "g_rec_mutex_lock" "' instead"))) extern void g_static_rec_mutex_lock (GStaticRecMutex *mutex); __attribute__((__deprecated__("Use '" "g_rec_mutex_try_lock" "' instead"))) extern gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex); __attribute__((__deprecated__("Use '" "g_rec_mutex_unlock" "' instead"))) extern void g_static_rec_mutex_unlock (GStaticRecMutex *mutex); __attribute__((__deprecated__)) extern void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, guint depth); __attribute__((__deprecated__)) extern guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex); __attribute__((__deprecated__("Use '" "g_rec_mutex_free" "' instead"))) extern void g_static_rec_mutex_free (GStaticRecMutex *mutex); typedef struct _GStaticRWLock GStaticRWLock; struct _GStaticRWLock { /*< private >*/ GStaticMutex mutex; GCond *read_cond; GCond *write_cond; guint read_counter; gboolean have_writer; guint want_to_read; guint want_to_write; }; __attribute__((__deprecated__("Use '" "g_rw_lock_init" "' instead"))) extern void g_static_rw_lock_init (GStaticRWLock *lock); __attribute__((__deprecated__("Use '" "g_rw_lock_reader_lock" "' instead"))) extern void g_static_rw_lock_reader_lock (GStaticRWLock *lock); __attribute__((__deprecated__("Use '" "g_rw_lock_reader_trylock" "' instead"))) extern gboolean g_static_rw_lock_reader_trylock (GStaticRWLock *lock); __attribute__((__deprecated__("Use '" "g_rw_lock_reader_unlock" "' instead"))) extern void g_static_rw_lock_reader_unlock (GStaticRWLock *lock); __attribute__((__deprecated__("Use '" "g_rw_lock_writer_lock" "' instead"))) extern void g_static_rw_lock_writer_lock (GStaticRWLock *lock); __attribute__((__deprecated__("Use '" "g_rw_lock_writer_trylock" "' instead"))) extern gboolean g_static_rw_lock_writer_trylock (GStaticRWLock *lock); __attribute__((__deprecated__("Use '" "g_rw_lock_writer_unlock" "' instead"))) extern void g_static_rw_lock_writer_unlock (GStaticRWLock *lock); __attribute__((__deprecated__("Use '" "g_rw_lock_free" "' instead"))) extern void g_static_rw_lock_free (GStaticRWLock *lock); __attribute__((__deprecated__)) extern GPrivate * g_private_new (GDestroyNotify notify); typedef struct _GStaticPrivate GStaticPrivate; struct _GStaticPrivate { /*< private >*/ guint index; }; __attribute__((__deprecated__)) extern void g_static_private_init (GStaticPrivate *private_key); __attribute__((__deprecated__("Use '" "g_private_get" "' instead"))) extern gpointer g_static_private_get (GStaticPrivate *private_key); __attribute__((__deprecated__("Use '" "g_private_set" "' instead"))) extern void g_static_private_set (GStaticPrivate *private_key, gpointer data, GDestroyNotify notify); __attribute__((__deprecated__)) extern void g_static_private_free (GStaticPrivate *private_key); __attribute__((__deprecated__)) extern gboolean g_once_init_enter_impl (volatile gsize *location); __attribute__((__deprecated__)) extern void g_thread_init (gpointer vtable); __attribute__((__deprecated__)) extern void g_thread_init_with_errorcheck_mutexes (gpointer vtable); __attribute__((__deprecated__)) extern gboolean g_thread_get_initialized (void); extern gboolean g_threads_got_initialized; __attribute__((__deprecated__)) extern GMutex * g_mutex_new (void); __attribute__((__deprecated__)) extern void g_mutex_free (GMutex *mutex); __attribute__((__deprecated__)) extern GCond * g_cond_new (void); __attribute__((__deprecated__)) extern void g_cond_free (GCond *cond); __attribute__((__deprecated__)) extern gboolean g_cond_timed_wait (GCond *cond, GMutex *mutex, GTimeVal *timeval); # 109 "/usr/include/glib-2.0/glib.h" 2 # 1 "/usr/include/glib-2.0/glib/glib-autocleanups.h" 1 /* * Copyright © 2015 Canonical Limited * * 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 * License along with this library; if not, see . * * Author: Ryan Lortie */ static inline void g_autoptr_cleanup_generic_gfree (void *p) { void **pp = (void**)p; g_free (*pp); } static inline void g_autoptr_cleanup_gstring_free (GString *string) { if (string) g_string_free (string, (!(0))); } /* If adding a cleanup here, please also add a test case to * glib/tests/autoptr.c */ typedef GAsyncQueue *GAsyncQueue_autoptr; typedef GList *GAsyncQueue_listautoptr; typedef GSList *GAsyncQueue_slistautoptr; # 41 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 41 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 41 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 41 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GAsyncQueue (GAsyncQueue **_ptr) { if (*_ptr) (g_async_queue_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GAsyncQueue (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_async_queue_unref); } static inline void glib_slistautoptr_cleanup_GAsyncQueue (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_async_queue_unref); } # 41 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 41 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GBookmarkFile *GBookmarkFile_autoptr; typedef GList *GBookmarkFile_listautoptr; typedef GSList *GBookmarkFile_slistautoptr; # 42 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 42 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 42 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 42 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GBookmarkFile (GBookmarkFile **_ptr) { if (*_ptr) (g_bookmark_file_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GBookmarkFile (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_bookmark_file_free); } static inline void glib_slistautoptr_cleanup_GBookmarkFile (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_bookmark_file_free); } # 42 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 42 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GBytes *GBytes_autoptr; typedef GList *GBytes_listautoptr; typedef GSList *GBytes_slistautoptr; # 43 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 43 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 43 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 43 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GBytes (GBytes **_ptr) { if (*_ptr) (g_bytes_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GBytes (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_bytes_unref); } static inline void glib_slistautoptr_cleanup_GBytes (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_bytes_unref); } # 43 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 43 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GChecksum *GChecksum_autoptr; typedef GList *GChecksum_listautoptr; typedef GSList *GChecksum_slistautoptr; # 44 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 44 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 44 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 44 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GChecksum (GChecksum **_ptr) { if (*_ptr) (g_checksum_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GChecksum (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_checksum_free); } static inline void glib_slistautoptr_cleanup_GChecksum (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_checksum_free); } # 44 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 44 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GDateTime *GDateTime_autoptr; typedef GList *GDateTime_listautoptr; typedef GSList *GDateTime_slistautoptr; # 45 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 45 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 45 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 45 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GDateTime (GDateTime **_ptr) { if (*_ptr) (g_date_time_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GDateTime (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_date_time_unref); } static inline void glib_slistautoptr_cleanup_GDateTime (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_date_time_unref); } # 45 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 45 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GDir *GDir_autoptr; typedef GList *GDir_listautoptr; typedef GSList *GDir_slistautoptr; # 46 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 46 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 46 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 46 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GDir (GDir **_ptr) { if (*_ptr) (g_dir_close) (*_ptr); } static inline void glib_listautoptr_cleanup_GDir (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_dir_close); } static inline void glib_slistautoptr_cleanup_GDir (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_dir_close); } # 46 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 46 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GError *GError_autoptr; typedef GList *GError_listautoptr; typedef GSList *GError_slistautoptr; # 47 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 47 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 47 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 47 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GError (GError **_ptr) { if (*_ptr) (g_error_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GError (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_error_free); } static inline void glib_slistautoptr_cleanup_GError (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_error_free); } # 47 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 47 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GHashTable *GHashTable_autoptr; typedef GList *GHashTable_listautoptr; typedef GSList *GHashTable_slistautoptr; # 48 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 48 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 48 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 48 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GHashTable (GHashTable **_ptr) { if (*_ptr) (g_hash_table_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GHashTable (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_hash_table_unref); } static inline void glib_slistautoptr_cleanup_GHashTable (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_hash_table_unref); } # 48 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 48 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GHmac *GHmac_autoptr; typedef GList *GHmac_listautoptr; typedef GSList *GHmac_slistautoptr; # 49 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 49 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 49 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 49 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GHmac (GHmac **_ptr) { if (*_ptr) (g_hmac_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GHmac (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_hmac_unref); } static inline void glib_slistautoptr_cleanup_GHmac (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_hmac_unref); } # 49 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 49 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GIOChannel *GIOChannel_autoptr; typedef GList *GIOChannel_listautoptr; typedef GSList *GIOChannel_slistautoptr; # 50 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 50 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 50 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 50 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GIOChannel (GIOChannel **_ptr) { if (*_ptr) (g_io_channel_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GIOChannel (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_io_channel_unref); } static inline void glib_slistautoptr_cleanup_GIOChannel (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_io_channel_unref); } # 50 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 50 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GKeyFile *GKeyFile_autoptr; typedef GList *GKeyFile_listautoptr; typedef GSList *GKeyFile_slistautoptr; # 51 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 51 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 51 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 51 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GKeyFile (GKeyFile **_ptr) { if (*_ptr) (g_key_file_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GKeyFile (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_key_file_unref); } static inline void glib_slistautoptr_cleanup_GKeyFile (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_key_file_unref); } # 51 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 51 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GList *GList_autoptr; typedef GList *GList_listautoptr; typedef GSList *GList_slistautoptr; # 52 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 52 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 52 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 52 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GList (GList **_ptr) { if (*_ptr) (g_list_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GList (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_list_free); } static inline void glib_slistautoptr_cleanup_GList (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_list_free); } # 52 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 52 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GArray *GArray_autoptr; typedef GList *GArray_listautoptr; typedef GSList *GArray_slistautoptr; # 53 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 53 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 53 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 53 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GArray (GArray **_ptr) { if (*_ptr) (g_array_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GArray (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_array_unref); } static inline void glib_slistautoptr_cleanup_GArray (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_array_unref); } # 53 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 53 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GPtrArray *GPtrArray_autoptr; typedef GList *GPtrArray_listautoptr; typedef GSList *GPtrArray_slistautoptr; # 54 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 54 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 54 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 54 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GPtrArray (GPtrArray **_ptr) { if (*_ptr) (g_ptr_array_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GPtrArray (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_ptr_array_unref); } static inline void glib_slistautoptr_cleanup_GPtrArray (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_ptr_array_unref); } # 54 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 54 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GByteArray *GByteArray_autoptr; typedef GList *GByteArray_listautoptr; typedef GSList *GByteArray_slistautoptr; # 55 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 55 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 55 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 55 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GByteArray (GByteArray **_ptr) { if (*_ptr) (g_byte_array_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GByteArray (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_byte_array_unref); } static inline void glib_slistautoptr_cleanup_GByteArray (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_byte_array_unref); } # 55 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 55 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GMainContext *GMainContext_autoptr; typedef GList *GMainContext_listautoptr; typedef GSList *GMainContext_slistautoptr; # 56 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 56 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 56 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 56 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GMainContext (GMainContext **_ptr) { if (*_ptr) (g_main_context_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GMainContext (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_main_context_unref); } static inline void glib_slistautoptr_cleanup_GMainContext (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_main_context_unref); } # 56 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 56 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GMainLoop *GMainLoop_autoptr; typedef GList *GMainLoop_listautoptr; typedef GSList *GMainLoop_slistautoptr; # 57 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 57 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 57 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 57 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GMainLoop (GMainLoop **_ptr) { if (*_ptr) (g_main_loop_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GMainLoop (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_main_loop_unref); } static inline void glib_slistautoptr_cleanup_GMainLoop (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_main_loop_unref); } # 57 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 57 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GSource *GSource_autoptr; typedef GList *GSource_listautoptr; typedef GSList *GSource_slistautoptr; # 58 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 58 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 58 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 58 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GSource (GSource **_ptr) { if (*_ptr) (g_source_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GSource (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_source_unref); } static inline void glib_slistautoptr_cleanup_GSource (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_source_unref); } # 58 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 58 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GMappedFile *GMappedFile_autoptr; typedef GList *GMappedFile_listautoptr; typedef GSList *GMappedFile_slistautoptr; # 59 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 59 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 59 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 59 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GMappedFile (GMappedFile **_ptr) { if (*_ptr) (g_mapped_file_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GMappedFile (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_mapped_file_unref); } static inline void glib_slistautoptr_cleanup_GMappedFile (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_mapped_file_unref); } # 59 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 59 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GMarkupParseContext *GMarkupParseContext_autoptr; typedef GList *GMarkupParseContext_listautoptr; typedef GSList *GMarkupParseContext_slistautoptr; # 60 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 60 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 60 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 60 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GMarkupParseContext (GMarkupParseContext **_ptr) { if (*_ptr) (g_markup_parse_context_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GMarkupParseContext (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_markup_parse_context_unref); } static inline void glib_slistautoptr_cleanup_GMarkupParseContext (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_markup_parse_context_unref); } # 60 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 60 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GNode *GNode_autoptr; typedef GList *GNode_listautoptr; typedef GSList *GNode_slistautoptr; # 61 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 61 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 61 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 61 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GNode (GNode **_ptr) { if (*_ptr) (g_node_destroy) (*_ptr); } static inline void glib_listautoptr_cleanup_GNode (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_node_destroy); } static inline void glib_slistautoptr_cleanup_GNode (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_node_destroy); } # 61 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 61 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GOptionContext *GOptionContext_autoptr; typedef GList *GOptionContext_listautoptr; typedef GSList *GOptionContext_slistautoptr; # 62 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 62 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 62 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 62 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GOptionContext (GOptionContext **_ptr) { if (*_ptr) (g_option_context_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GOptionContext (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_option_context_free); } static inline void glib_slistautoptr_cleanup_GOptionContext (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_option_context_free); } # 62 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 62 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GOptionGroup *GOptionGroup_autoptr; typedef GList *GOptionGroup_listautoptr; typedef GSList *GOptionGroup_slistautoptr; # 63 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 63 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 63 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 63 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GOptionGroup (GOptionGroup **_ptr) { if (*_ptr) (g_option_group_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GOptionGroup (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_option_group_unref); } static inline void glib_slistautoptr_cleanup_GOptionGroup (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_option_group_unref); } # 63 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 63 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GPatternSpec *GPatternSpec_autoptr; typedef GList *GPatternSpec_listautoptr; typedef GSList *GPatternSpec_slistautoptr; # 64 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 64 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 64 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 64 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GPatternSpec (GPatternSpec **_ptr) { if (*_ptr) (g_pattern_spec_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GPatternSpec (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_pattern_spec_free); } static inline void glib_slistautoptr_cleanup_GPatternSpec (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_pattern_spec_free); } # 64 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 64 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GQueue *GQueue_autoptr; typedef GList *GQueue_listautoptr; typedef GSList *GQueue_slistautoptr; # 65 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 65 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 65 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 65 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GQueue (GQueue **_ptr) { if (*_ptr) (g_queue_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GQueue (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_queue_free); } static inline void glib_slistautoptr_cleanup_GQueue (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_queue_free); } # 65 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 65 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 66 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 66 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 66 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 66 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_auto_cleanup_GQueue (GQueue *_ptr) { (g_queue_clear) (_ptr); } # 66 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 66 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GRand *GRand_autoptr; typedef GList *GRand_listautoptr; typedef GSList *GRand_slistautoptr; # 67 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 67 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 67 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 67 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GRand (GRand **_ptr) { if (*_ptr) (g_rand_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GRand (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_rand_free); } static inline void glib_slistautoptr_cleanup_GRand (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_rand_free); } # 67 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 67 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GRegex *GRegex_autoptr; typedef GList *GRegex_listautoptr; typedef GSList *GRegex_slistautoptr; # 68 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 68 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 68 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 68 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GRegex (GRegex **_ptr) { if (*_ptr) (g_regex_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GRegex (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_regex_unref); } static inline void glib_slistautoptr_cleanup_GRegex (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_regex_unref); } # 68 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 68 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GMatchInfo *GMatchInfo_autoptr; typedef GList *GMatchInfo_listautoptr; typedef GSList *GMatchInfo_slistautoptr; # 69 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 69 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 69 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 69 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GMatchInfo (GMatchInfo **_ptr) { if (*_ptr) (g_match_info_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GMatchInfo (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_match_info_unref); } static inline void glib_slistautoptr_cleanup_GMatchInfo (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_match_info_unref); } # 69 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 69 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GScanner *GScanner_autoptr; typedef GList *GScanner_listautoptr; typedef GSList *GScanner_slistautoptr; # 70 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 70 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 70 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 70 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GScanner (GScanner **_ptr) { if (*_ptr) (g_scanner_destroy) (*_ptr); } static inline void glib_listautoptr_cleanup_GScanner (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_scanner_destroy); } static inline void glib_slistautoptr_cleanup_GScanner (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_scanner_destroy); } # 70 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 70 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GSequence *GSequence_autoptr; typedef GList *GSequence_listautoptr; typedef GSList *GSequence_slistautoptr; # 71 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 71 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 71 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 71 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GSequence (GSequence **_ptr) { if (*_ptr) (g_sequence_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GSequence (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_sequence_free); } static inline void glib_slistautoptr_cleanup_GSequence (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_sequence_free); } # 71 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 71 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GSList *GSList_autoptr; typedef GList *GSList_listautoptr; typedef GSList *GSList_slistautoptr; # 72 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 72 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 72 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 72 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GSList (GSList **_ptr) { if (*_ptr) (g_slist_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GSList (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_slist_free); } static inline void glib_slistautoptr_cleanup_GSList (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_slist_free); } # 72 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 72 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GString *GString_autoptr; typedef GList *GString_listautoptr; typedef GSList *GString_slistautoptr; # 73 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 73 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 73 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 73 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GString (GString **_ptr) { if (*_ptr) (g_autoptr_cleanup_gstring_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GString (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_autoptr_cleanup_gstring_free); } static inline void glib_slistautoptr_cleanup_GString (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_autoptr_cleanup_gstring_free); } # 73 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 73 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GStringChunk *GStringChunk_autoptr; typedef GList *GStringChunk_listautoptr; typedef GSList *GStringChunk_slistautoptr; # 74 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 74 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 74 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 74 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GStringChunk (GStringChunk **_ptr) { if (*_ptr) (g_string_chunk_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GStringChunk (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_string_chunk_free); } static inline void glib_slistautoptr_cleanup_GStringChunk (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_string_chunk_free); } # 74 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 74 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GThread *GThread_autoptr; typedef GList *GThread_listautoptr; typedef GSList *GThread_slistautoptr; # 75 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 75 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 75 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 75 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GThread (GThread **_ptr) { if (*_ptr) (g_thread_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GThread (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_thread_unref); } static inline void glib_slistautoptr_cleanup_GThread (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_thread_unref); } # 75 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 75 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 76 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 76 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 76 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 76 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_auto_cleanup_GMutex (GMutex *_ptr) { (g_mutex_clear) (_ptr); } # 76 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 76 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GMutexLocker *GMutexLocker_autoptr; typedef GList *GMutexLocker_listautoptr; typedef GSList *GMutexLocker_slistautoptr; # 77 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 77 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 77 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 77 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GMutexLocker (GMutexLocker **_ptr) { if (*_ptr) (g_mutex_locker_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GMutexLocker (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_mutex_locker_free); } static inline void glib_slistautoptr_cleanup_GMutexLocker (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_mutex_locker_free); } # 77 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 77 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 78 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 78 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 78 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 78 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_auto_cleanup_GCond (GCond *_ptr) { (g_cond_clear) (_ptr); } # 78 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 78 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GTimer *GTimer_autoptr; typedef GList *GTimer_listautoptr; typedef GSList *GTimer_slistautoptr; # 79 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 79 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 79 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 79 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GTimer (GTimer **_ptr) { if (*_ptr) (g_timer_destroy) (*_ptr); } static inline void glib_listautoptr_cleanup_GTimer (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_timer_destroy); } static inline void glib_slistautoptr_cleanup_GTimer (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_timer_destroy); } # 79 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 79 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GTimeZone *GTimeZone_autoptr; typedef GList *GTimeZone_listautoptr; typedef GSList *GTimeZone_slistautoptr; # 80 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 80 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 80 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 80 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GTimeZone (GTimeZone **_ptr) { if (*_ptr) (g_time_zone_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GTimeZone (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_time_zone_unref); } static inline void glib_slistautoptr_cleanup_GTimeZone (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_time_zone_unref); } # 80 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 80 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GTree *GTree_autoptr; typedef GList *GTree_listautoptr; typedef GSList *GTree_slistautoptr; # 81 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 81 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 81 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 81 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GTree (GTree **_ptr) { if (*_ptr) (g_tree_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GTree (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_tree_unref); } static inline void glib_slistautoptr_cleanup_GTree (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_tree_unref); } # 81 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 81 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GVariant *GVariant_autoptr; typedef GList *GVariant_listautoptr; typedef GSList *GVariant_slistautoptr; # 82 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 82 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 82 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 82 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GVariant (GVariant **_ptr) { if (*_ptr) (g_variant_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GVariant (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_variant_unref); } static inline void glib_slistautoptr_cleanup_GVariant (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_variant_unref); } # 82 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 82 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GVariantBuilder *GVariantBuilder_autoptr; typedef GList *GVariantBuilder_listautoptr; typedef GSList *GVariantBuilder_slistautoptr; # 83 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 83 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 83 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 83 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GVariantBuilder (GVariantBuilder **_ptr) { if (*_ptr) (g_variant_builder_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GVariantBuilder (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_variant_builder_unref); } static inline void glib_slistautoptr_cleanup_GVariantBuilder (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_variant_builder_unref); } # 83 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 83 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 84 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 84 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 84 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 84 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_auto_cleanup_GVariantBuilder (GVariantBuilder *_ptr) { (g_variant_builder_clear) (_ptr); } # 84 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 84 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GVariantIter *GVariantIter_autoptr; typedef GList *GVariantIter_listautoptr; typedef GSList *GVariantIter_slistautoptr; # 85 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 85 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 85 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 85 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GVariantIter (GVariantIter **_ptr) { if (*_ptr) (g_variant_iter_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GVariantIter (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_variant_iter_free); } static inline void glib_slistautoptr_cleanup_GVariantIter (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_variant_iter_free); } # 85 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 85 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GVariantDict *GVariantDict_autoptr; typedef GList *GVariantDict_listautoptr; typedef GSList *GVariantDict_slistautoptr; # 86 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 86 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 86 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 86 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GVariantDict (GVariantDict **_ptr) { if (*_ptr) (g_variant_dict_unref) (*_ptr); } static inline void glib_listautoptr_cleanup_GVariantDict (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_variant_dict_unref); } static inline void glib_slistautoptr_cleanup_GVariantDict (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_variant_dict_unref); } # 86 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 86 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 87 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 87 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 87 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 87 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_auto_cleanup_GVariantDict (GVariantDict *_ptr) { (g_variant_dict_clear) (_ptr); } # 87 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 87 "/usr/include/glib-2.0/glib/glib-autocleanups.h" typedef GVariantType *GVariantType_autoptr; typedef GList *GVariantType_listautoptr; typedef GSList *GVariantType_slistautoptr; # 88 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 88 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 88 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 88 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_autoptr_cleanup_GVariantType (GVariantType **_ptr) { if (*_ptr) (g_variant_type_free) (*_ptr); } static inline void glib_listautoptr_cleanup_GVariantType (GList **_l) { g_list_free_full (*_l, (GDestroyNotify) g_variant_type_free); } static inline void glib_slistautoptr_cleanup_GVariantType (GSList **_l) { g_slist_free_full (*_l, (GDestroyNotify) g_variant_type_free); } # 88 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 88 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 89 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic push # 89 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 89 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic ignored "-Wdeprecated-declarations" # 89 "/usr/include/glib-2.0/glib/glib-autocleanups.h" static inline void glib_auto_cleanup_GStrv (GStrv *_ptr) { if (*_ptr != # 89 "/usr/include/glib-2.0/glib/glib-autocleanups.h" 3 4 ((void *)0) # 89 "/usr/include/glib-2.0/glib/glib-autocleanups.h" ) (g_strfreev) (*_ptr); } # 89 "/usr/include/glib-2.0/glib/glib-autocleanups.h" #pragma GCC diagnostic pop # 89 "/usr/include/glib-2.0/glib/glib-autocleanups.h" # 112 "/usr/include/glib-2.0/glib.h" 2 # 20 "//qemu-2.11+dfsg/include/glib-compat.h" 2 /* GLIB version compatibility flags */ # 359 "//qemu-2.11+dfsg/include/glib-compat.h" /* Small compat shim from glib 2.32 */ # 108 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/typedefs.h" 1 /* A load of opaque types so that device init declarations don't have to pull in all the real definitions. */ /* Please keep this list in alphabetical order */ typedef struct AdapterInfo AdapterInfo; typedef struct AddressSpace AddressSpace; typedef struct AioContext AioContext; typedef struct AllwinnerAHCIState AllwinnerAHCIState; typedef struct AudioState AudioState; typedef struct BdrvDirtyBitmap BdrvDirtyBitmap; typedef struct BdrvDirtyBitmapIter BdrvDirtyBitmapIter; typedef struct BlockBackend BlockBackend; typedef struct BlockBackendRootState BlockBackendRootState; typedef struct BlockDriverState BlockDriverState; typedef struct BusClass BusClass; typedef struct BusState BusState; typedef struct Chardev Chardev; typedef struct CompatProperty CompatProperty; typedef struct CPUAddressSpace CPUAddressSpace; typedef struct CPUState CPUState; typedef struct DeviceListener DeviceListener; typedef struct DeviceState DeviceState; typedef struct DirtyBitmapSnapshot DirtyBitmapSnapshot; typedef struct DisplayChangeListener DisplayChangeListener; typedef struct DisplayState DisplayState; typedef struct DisplaySurface DisplaySurface; typedef struct DriveInfo DriveInfo; typedef struct Error Error; typedef struct EventNotifier EventNotifier; typedef struct FlatView FlatView; typedef struct FWCfgEntry FWCfgEntry; typedef struct FWCfgIoState FWCfgIoState; typedef struct FWCfgMemState FWCfgMemState; typedef struct FWCfgState FWCfgState; typedef struct HCIInfo HCIInfo; typedef struct I2CBus I2CBus; typedef struct I2SCodec I2SCodec; typedef struct ISABus ISABus; typedef struct ISADevice ISADevice; typedef struct IsaDma IsaDma; typedef struct MACAddr MACAddr; typedef struct MachineClass MachineClass; typedef struct MachineState MachineState; typedef struct MemoryListener MemoryListener; typedef struct MemoryMappingList MemoryMappingList; typedef struct MemoryRegion MemoryRegion; typedef struct IOMMUMemoryRegion IOMMUMemoryRegion; typedef struct MemoryRegionCache MemoryRegionCache; typedef struct MemoryRegionSection MemoryRegionSection; typedef struct MigrationIncomingState MigrationIncomingState; typedef struct MigrationState MigrationState; typedef struct Monitor Monitor; typedef struct MonitorDef MonitorDef; typedef struct MouseTransformInfo MouseTransformInfo; typedef struct MSIMessage MSIMessage; typedef struct NetClientState NetClientState; typedef struct NetFilterState NetFilterState; typedef struct NICInfo NICInfo; typedef struct NumaNodeMem NumaNodeMem; typedef struct PcGuestInfo PcGuestInfo; typedef struct PCIBridge PCIBridge; typedef struct PCIBus PCIBus; typedef struct PCIDevice PCIDevice; typedef struct PCIEAERErr PCIEAERErr; typedef struct PCIEAERLog PCIEAERLog; typedef struct PCIEAERMsg PCIEAERMsg; typedef struct PCIEPort PCIEPort; typedef struct PCIESlot PCIESlot; typedef struct PCIExpressDevice PCIExpressDevice; typedef struct PCIExpressHost PCIExpressHost; typedef struct PCIHostDeviceAddress PCIHostDeviceAddress; typedef struct PCIHostState PCIHostState; typedef struct PCMachineClass PCMachineClass; typedef struct PCMachineState PCMachineState; typedef struct PCMCIACardState PCMCIACardState; typedef struct PixelFormat PixelFormat; typedef struct PostcopyDiscardState PostcopyDiscardState; typedef struct Property Property; typedef struct PropertyInfo PropertyInfo; typedef struct PS2State PS2State; typedef struct QEMUBH QEMUBH; typedef struct QemuConsole QemuConsole; typedef struct QemuDmaBuf QemuDmaBuf; typedef struct QEMUFile QEMUFile; typedef struct QemuOpt QemuOpt; typedef struct QemuOpts QemuOpts; typedef struct QemuOptsList QemuOptsList; typedef struct QEMUSGList QEMUSGList; typedef struct QEMUTimer QEMUTimer; typedef struct QEMUTimerListGroup QEMUTimerListGroup; typedef struct QObject QObject; typedef struct QNull QNull; typedef struct RAMBlock RAMBlock; typedef struct Range Range; typedef struct SerialState SerialState; typedef struct SHPCDevice SHPCDevice; typedef struct SMBusDevice SMBusDevice; typedef struct SSIBus SSIBus; typedef struct uWireSlave uWireSlave; typedef struct VirtIODevice VirtIODevice; typedef struct Visitor Visitor; typedef struct node_info NodeInfo; typedef void SaveStateHandler(QEMUFile *f, void *opaque); typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); # 109 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 /* * We have a lot of unaudited code that may fail in strange ways, or * even be a security risk during migration, if you disable assertions * at compile-time. You may comment out these safety checks if you * absolutely want to disable assertion overhead, but it is not * supported upstream so the risk is all yours. Meanwhile, please * submit patches to remove any side-effects inside an assertion, or * fixing error handling that should use Error instead of assert. */ # 151 "//qemu-2.11+dfsg/include/qemu/osdep.h" /* time_t may be either 32 or 64 bits depending on the host OS, and * can be either signed or unsigned, so we can't just hardcode a * specific maximum value. This is not a C preprocessor constant, * so you can't use TIME_MAX in an #ifdef, but for our purposes * this isn't a problem. */ /* The macros TYPE_SIGNED, TYPE_WIDTH, and TYPE_MAXIMUM are from * Gnulib, and are under the LGPL v2.1 or (at your option) any * later version. */ /* True if the real type T is signed. */ /* The width in bits of the integer type or expression T. * Padding bits are not supported. */ /* The maximum and minimum values for the integer type T. */ # 181 "//qemu-2.11+dfsg/include/qemu/osdep.h" /* HOST_LONG_BITS is the size of a native pointer in bits. */ # 190 "//qemu-2.11+dfsg/include/qemu/osdep.h" /* Mac OSX has a bug that incorrectly defines SIZE_MAX with * the wrong type. Our replacement isn't usable in preprocessor * expressions, but it is sufficient for our needs. */ # 205 "//qemu-2.11+dfsg/include/qemu/osdep.h" /* Minimum function that returns zero only iff both values are zero. * Intended for use with unsigned values only. */ /* Round number down to multiple */ /* Round number up to multiple. Safe when m is not a power of 2 (see * ROUND_UP for a faster version when a power of 2 is guaranteed) */ /* Check if n is a multiple of m */ /* n-byte align pointer down */ /* n-byte align pointer up */ /* Check if pointer p is n-bytes aligned */ /* Round number up to multiple. Requires that d be a power of 2 (see * QEMU_ALIGN_UP for a safer but slower version on arbitrary * numbers); works even if d is a smaller type than n. */ # 244 "//qemu-2.11+dfsg/include/qemu/osdep.h" /* * &(x)[0] is always a pointer - if it's same type as x then the argument is a * pointer, not an array. */ int qemu_daemon(int nochdir, int noclose); void *qemu_try_memalign(size_t alignment, size_t size); void *qemu_memalign(size_t alignment, size_t size); void *qemu_anon_ram_alloc(size_t size, uint64_t *align); void qemu_vfree(void *ptr); void qemu_anon_ram_free(void *ptr, size_t size); # 361 "//qemu-2.11+dfsg/include/qemu/osdep.h" /* Use 2 MiB alignment so transparent hugepages can be used by KVM. Valgrind does not support alignments larger than 1 MiB, therefore we need special code which handles running on Valgrind. */ # 373 "//qemu-2.11+dfsg/include/qemu/osdep.h" struct qemu_signalfd_siginfo { uint32_t ssi_signo; /* Signal number */ int32_t ssi_errno; /* Error number (unused) */ int32_t ssi_code; /* Signal code */ uint32_t ssi_pid; /* PID of sender */ uint32_t ssi_uid; /* Real UID of sender */ int32_t ssi_fd; /* File descriptor (SIGIO) */ uint32_t ssi_tid; /* Kernel timer ID (POSIX timers) */ uint32_t ssi_band; /* Band event (SIGIO) */ uint32_t ssi_overrun; /* POSIX timer overrun count */ uint32_t ssi_trapno; /* Trap number that caused signal */ int32_t ssi_status; /* Exit status or signal (SIGCHLD) */ int32_t ssi_int; /* Integer sent by sigqueue(2) */ uint64_t ssi_ptr; /* Pointer sent by sigqueue(2) */ uint64_t ssi_utime; /* User CPU time consumed (SIGCHLD) */ uint64_t ssi_stime; /* System CPU time consumed (SIGCHLD) */ uint64_t ssi_addr; /* Address that generated signal (for hardware-generated signals) */ uint8_t pad[48]; /* Pad size to 128 bytes (allow for additional fields in the future) */ }; int qemu_signalfd(const sigset_t *mask); void sigaction_invoke(struct sigaction *action, struct qemu_signalfd_siginfo *info); int qemu_madvise(void *addr, size_t len, int advice); int qemu_mprotect_rwx(void *addr, size_t size); int qemu_mprotect_none(void *addr, size_t size); int qemu_open(const char *name, int flags, ...); int qemu_close(int fd); int qemu_dup(int fd); int qemu_lock_fd(int fd, int64_t start, int64_t len, # 409 "//qemu-2.11+dfsg/include/qemu/osdep.h" 3 4 _Bool # 409 "//qemu-2.11+dfsg/include/qemu/osdep.h" exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, # 411 "//qemu-2.11+dfsg/include/qemu/osdep.h" 3 4 _Bool # 411 "//qemu-2.11+dfsg/include/qemu/osdep.h" exclusive); # 412 "//qemu-2.11+dfsg/include/qemu/osdep.h" 3 4 _Bool # 412 "//qemu-2.11+dfsg/include/qemu/osdep.h" qemu_has_ofd_lock(void); # 422 "//qemu-2.11+dfsg/include/qemu/osdep.h" int qemu_create_pidfile(const char *filename); int qemu_get_thread_id(void); # 438 "//qemu-2.11+dfsg/include/qemu/osdep.h" # 1 "/usr/include/x86_64-linux-gnu/sys/uio.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ # 23 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h" 1 3 4 /* Define struct iovec. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 24 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/uio_lim.h" 1 3 4 /* Implementation limits related to sys/uio.h - Linux version. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 25 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4 /* Read data from file descriptor FD, and put the result in the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's. The buffers are filled in the order specified. Operates just like 'read' (see ) except that data are put in IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count) /* Ignore */; /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's, to file descriptor FD. The data is written in the order specified. Operates just like 'write' (see ) except that the data are taken from IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count) /* Ignore */; /* Read data from file descriptor FD at the given position OFFSET without change the file pointer, and put the result in the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's. The buffers are filled in the order specified. Operates just like 'pread' (see ) except that data are put in IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) /* Ignore */; /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's, to file descriptor FD at the given position OFFSET without change the file pointer. The data is written in the order specified. Operates just like 'pwrite' (see ) except that the data are taken from IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) /* Ignore */; # 97 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 /* Read data from file descriptor FD at the given position OFFSET without change the file pointer, and put the result in the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's. The buffers are filled in the order specified. Operates just like 'pread' (see ) except that data are put in IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) /* Ignore */; /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's, to file descriptor FD at the given position OFFSET without change the file pointer. The data is written in the order specified. Operates just like 'pwrite' (see ) except that the data are taken from IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) /* Ignore */; /* Same as preadv but with an additional flag argumenti defined at uio.h. */ extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count, __off_t __offset, int ___flags) /* Ignore */; /* Same as preadv but with an additional flag argument defined at uio.h. */ extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count, __off_t __offset, int __flags) /* Ignore */; # 151 "/usr/include/x86_64-linux-gnu/sys/uio.h" 3 4 /* Same as preadv but with an additional flag argumenti defined at uio.h. */ extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec, int __count, __off64_t __offset, int ___flags) /* Ignore */; /* Same as preadv but with an additional flag argument defined at uio.h. */ extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev, int __count, __off64_t __offset, int __flags) /* Ignore */; /* Some operating systems provide system-specific extensions to this header. */ # 1 "/usr/include/x86_64-linux-gnu/bits/uio-ext.h" 1 3 4 /* Operating system-specific extensions to sys/uio.h - Linux version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 26 "/usr/include/x86_64-linux-gnu/bits/uio-ext.h" 3 4 /* Read from another process' address space. */ extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) __attribute__ ((__nothrow__ , __leaf__)); /* Write to another process' address space. */ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) __attribute__ ((__nothrow__ , __leaf__)); /* Flags for preadv2/pwritev2. */ # 169 "/usr/include/x86_64-linux-gnu/sys/uio.h" 2 3 4 # 439 "//qemu-2.11+dfsg/include/qemu/osdep.h" 2 # 458 "//qemu-2.11+dfsg/include/qemu/osdep.h" # 458 "//qemu-2.11+dfsg/include/qemu/osdep.h" void qemu_set_cloexec(int fd); /* Starting on QEMU 2.5, qemu_hw_version() returns "2.5+" by default * instead of QEMU_VERSION, so setting hw_version on MachineClass * is no longer mandatory. * * Do NOT change this string, or it will break compatibility on all * machine classes that don't set hw_version. */ /* QEMU "hardware version" setting. Used to replace code that exposed * QEMU_VERSION to guests in the past and need to keep compatibility. * Do not use qemu_hw_version() in new code. */ void qemu_set_hw_version(const char *); const char *qemu_hw_version(void); void fips_set_state( # 476 "//qemu-2.11+dfsg/include/qemu/osdep.h" 3 4 _Bool # 476 "//qemu-2.11+dfsg/include/qemu/osdep.h" requested); # 477 "//qemu-2.11+dfsg/include/qemu/osdep.h" 3 4 _Bool # 477 "//qemu-2.11+dfsg/include/qemu/osdep.h" fips_get_state(void); /* Return a dynamically allocated pathname denoting a file or directory that is * appropriate for storing local state. * * @relative_pathname need not start with a directory separator; one will be * added automatically. * * The caller is responsible for releasing the value returned with g_free() * after use. */ char *qemu_get_local_state_pathname(const char *relative_pathname); /* Find program directory, and save it for later usage with * qemu_get_exec_dir(). * Try OS specific API first, if not working, parse from argv0. */ void qemu_init_exec_dir(const char *argv0); /* Get the saved exec dir. * Caller needs to release the returned string by g_free() */ char *qemu_get_exec_dir(void); /** * qemu_getauxval: * @type: the auxiliary vector key to lookup * * Search the auxiliary vector for @type, returning the value * or 0 if @type is not present. */ unsigned long qemu_getauxval(unsigned long type); void qemu_set_tty_echo(int fd, # 508 "//qemu-2.11+dfsg/include/qemu/osdep.h" 3 4 _Bool # 508 "//qemu-2.11+dfsg/include/qemu/osdep.h" echo); void os_mem_prealloc(int fd, char *area, size_t sz, int smp_cpus, Error **errp); /** * qemu_get_pid_name: * @pid: pid of a process * * For given @pid fetch its name. Caller is responsible for * freeing the string when no longer needed. * Returns allocated string on success, NULL on failure. */ char *qemu_get_pid_name(pid_t pid); /** * qemu_fork: * * A version of fork that avoids signal handler race * conditions that can lead to child process getting * signals that are otherwise only expected by the * parent. It also resets all signal handlers to the * default settings. * * Returns 0 to child process, pid number to parent * or -1 on failure. */ pid_t qemu_fork(Error **errp); /* Using intptr_t ensures that qemu_*_page_mask is sign-extended even * when intptr_t is 32-bit and we are aligning a long long. */ extern uintptr_t qemu_real_host_page_size; extern intptr_t qemu_real_host_page_mask; extern int qemu_icache_linesize; extern int qemu_dcache_linesize; # 25 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/qapi/error.h" 1 /* * QEMU Error Objects * * Copyright IBM, Corp. 2011 * Copyright (C) 2011-2015 Red Hat, Inc. * * Authors: * Anthony Liguori * Markus Armbruster * * This work is licensed under the terms of the GNU LGPL, version 2. See * the COPYING.LIB file in the top-level directory. */ /* * Error reporting system loosely patterned after Glib's GError. * * Create an error: * error_setg(&err, "situation normal, all fouled up"); * * Create an error and add additional explanation: * error_setg(&err, "invalid quark"); * error_append_hint(&err, "Valid quarks are up, down, strange, " * "charm, top, bottom.\n"); * * Do *not* contract this to * error_setg(&err, "invalid quark\n" * "Valid quarks are up, down, strange, charm, top, bottom."); * * Report an error to the current monitor if we have one, else stderr: * error_report_err(err); * This frees the error object. * * Likewise, but with additional text prepended: * error_reportf_err(err, "Could not frobnicate '%s': ", name); * * Report an error somewhere else: * const char *msg = error_get_pretty(err); * do with msg what needs to be done... * error_free(err); * Note that this loses hints added with error_append_hint(). * * Handle an error without reporting it (just for completeness): * error_free(err); * * Assert that an expected error occurred, but clean it up without * reporting it (primarily useful in testsuites): * error_free_or_abort(&err); * * Pass an existing error to the caller: * error_propagate(errp, err); * where Error **errp is a parameter, by convention the last one. * * Pass an existing error to the caller with the message modified: * error_propagate(errp, err); * error_prepend(errp, "Could not frobnicate '%s': ", name); * * Create a new error and pass it to the caller: * error_setg(errp, "situation normal, all fouled up"); * * Call a function and receive an error from it: * Error *err = NULL; * foo(arg, &err); * if (err) { * handle the error... * } * * Call a function ignoring errors: * foo(arg, NULL); * * Call a function aborting on errors: * foo(arg, &error_abort); * * Call a function treating errors as fatal: * foo(arg, &error_fatal); * * Receive an error and pass it on to the caller: * Error *err = NULL; * foo(arg, &err); * if (err) { * handle the error... * error_propagate(errp, err); * } * where Error **errp is a parameter, by convention the last one. * * Do *not* "optimize" this to * foo(arg, errp); * if (*errp) { // WRONG! * handle the error... * } * because errp may be NULL! * * But when all you do with the error is pass it on, please use * foo(arg, errp); * for readability. * * Receive and accumulate multiple errors (first one wins): * Error *err = NULL, *local_err = NULL; * foo(arg, &err); * bar(arg, &local_err); * error_propagate(&err, local_err); * if (err) { * handle the error... * } * * Do *not* "optimize" this to * foo(arg, &err); * bar(arg, &err); // WRONG! * if (err) { * handle the error... * } * because this may pass a non-null err to bar(). */ # 1 "./qapi-types.h" 1 /* AUTOMATICALLY GENERATED, DO NOT MODIFY */ /* * schema-defined QAPI types * * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * */ # 1 "//qemu-2.11+dfsg/include/qapi/util.h" 1 /* * QAPI util functions * * Copyright Fujitsu, Inc. 2014 * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * */ typedef struct QEnumLookup { const char *const *array; int size; } QEnumLookup; const char *qapi_enum_lookup(const QEnumLookup *lookup, int val); int qapi_enum_parse(const QEnumLookup *lookup, const char *buf, int def, Error **errp); int parse_qapi_name(const char *name, # 23 "//qemu-2.11+dfsg/include/qapi/util.h" 3 4 _Bool # 23 "//qemu-2.11+dfsg/include/qapi/util.h" complete); # 20 "./qapi-types.h" 2 typedef enum QType { QTYPE_NONE = 0, QTYPE_QNULL = 1, QTYPE_QNUM = 2, QTYPE_QSTRING = 3, QTYPE_QDICT = 4, QTYPE_QLIST = 5, QTYPE_QBOOL = 6, QTYPE__MAX = 7, } QType; extern const QEnumLookup QType_lookup; typedef struct anyList anyList; struct anyList { anyList *next; QObject *value; }; void qapi_free_anyList(anyList *obj); typedef struct boolList boolList; struct boolList { boolList *next; # 54 "./qapi-types.h" 3 4 _Bool # 54 "./qapi-types.h" value; }; void qapi_free_boolList(boolList *obj); typedef struct int16List int16List; struct int16List { int16List *next; int16_t value; }; void qapi_free_int16List(int16List *obj); typedef struct int32List int32List; struct int32List { int32List *next; int32_t value; }; void qapi_free_int32List(int32List *obj); typedef struct int64List int64List; struct int64List { int64List *next; int64_t value; }; void qapi_free_int64List(int64List *obj); typedef struct int8List int8List; struct int8List { int8List *next; int8_t value; }; void qapi_free_int8List(int8List *obj); typedef struct intList intList; struct intList { intList *next; int64_t value; }; void qapi_free_intList(intList *obj); typedef struct nullList nullList; struct nullList { nullList *next; QNull *value; }; void qapi_free_nullList(nullList *obj); typedef struct numberList numberList; struct numberList { numberList *next; double value; }; void qapi_free_numberList(numberList *obj); typedef struct sizeList sizeList; struct sizeList { sizeList *next; uint64_t value; }; void qapi_free_sizeList(sizeList *obj); typedef struct strList strList; struct strList { strList *next; char *value; }; void qapi_free_strList(strList *obj); typedef struct uint16List uint16List; struct uint16List { uint16List *next; uint16_t value; }; void qapi_free_uint16List(uint16List *obj); typedef struct uint32List uint32List; struct uint32List { uint32List *next; uint32_t value; }; void qapi_free_uint32List(uint32List *obj); typedef struct uint64List uint64List; struct uint64List { uint64List *next; uint64_t value; }; void qapi_free_uint64List(uint64List *obj); typedef struct uint8List uint8List; struct uint8List { uint8List *next; uint8_t value; }; void qapi_free_uint8List(uint8List *obj); typedef struct ACPIOSTInfo ACPIOSTInfo; typedef struct ACPIOSTInfoList ACPIOSTInfoList; typedef enum ACPISlotType { ACPI_SLOT_TYPE_DIMM = 0, ACPI_SLOT_TYPE_CPU = 1, ACPI_SLOT_TYPE__MAX = 2, } ACPISlotType; extern const QEnumLookup ACPISlotType_lookup; typedef struct Abort Abort; typedef struct AcpiTableOptions AcpiTableOptions; typedef enum ActionCompletionMode { ACTION_COMPLETION_MODE_INDIVIDUAL = 0, ACTION_COMPLETION_MODE_GROUPED = 1, ACTION_COMPLETION_MODE__MAX = 2, } ActionCompletionMode; extern const QEnumLookup ActionCompletionMode_lookup; typedef struct AddfdInfo AddfdInfo; typedef struct BalloonInfo BalloonInfo; typedef enum BiosAtaTranslation { BIOS_ATA_TRANSLATION_AUTO = 0, BIOS_ATA_TRANSLATION_NONE = 1, BIOS_ATA_TRANSLATION_LBA = 2, BIOS_ATA_TRANSLATION_LARGE = 3, BIOS_ATA_TRANSLATION_RECHS = 4, BIOS_ATA_TRANSLATION__MAX = 5, } BiosAtaTranslation; extern const QEnumLookup BiosAtaTranslation_lookup; typedef enum BlkdebugEvent { BLKDBG_L1_UPDATE = 0, BLKDBG_L1_GROW_ALLOC_TABLE = 1, BLKDBG_L1_GROW_WRITE_TABLE = 2, BLKDBG_L1_GROW_ACTIVATE_TABLE = 3, BLKDBG_L2_LOAD = 4, BLKDBG_L2_UPDATE = 5, BLKDBG_L2_UPDATE_COMPRESSED = 6, BLKDBG_L2_ALLOC_COW_READ = 7, BLKDBG_L2_ALLOC_WRITE = 8, BLKDBG_READ_AIO = 9, BLKDBG_READ_BACKING_AIO = 10, BLKDBG_READ_COMPRESSED = 11, BLKDBG_WRITE_AIO = 12, BLKDBG_WRITE_COMPRESSED = 13, BLKDBG_VMSTATE_LOAD = 14, BLKDBG_VMSTATE_SAVE = 15, BLKDBG_COW_READ = 16, BLKDBG_COW_WRITE = 17, BLKDBG_REFTABLE_LOAD = 18, BLKDBG_REFTABLE_GROW = 19, BLKDBG_REFTABLE_UPDATE = 20, BLKDBG_REFBLOCK_LOAD = 21, BLKDBG_REFBLOCK_UPDATE = 22, BLKDBG_REFBLOCK_UPDATE_PART = 23, BLKDBG_REFBLOCK_ALLOC = 24, BLKDBG_REFBLOCK_ALLOC_HOOKUP = 25, BLKDBG_REFBLOCK_ALLOC_WRITE = 26, BLKDBG_REFBLOCK_ALLOC_WRITE_BLOCKS = 27, BLKDBG_REFBLOCK_ALLOC_WRITE_TABLE = 28, BLKDBG_REFBLOCK_ALLOC_SWITCH_TABLE = 29, BLKDBG_CLUSTER_ALLOC = 30, BLKDBG_CLUSTER_ALLOC_BYTES = 31, BLKDBG_CLUSTER_FREE = 32, BLKDBG_FLUSH_TO_OS = 33, BLKDBG_FLUSH_TO_DISK = 34, BLKDBG_PWRITEV_RMW_HEAD = 35, BLKDBG_PWRITEV_RMW_AFTER_HEAD = 36, BLKDBG_PWRITEV_RMW_TAIL = 37, BLKDBG_PWRITEV_RMW_AFTER_TAIL = 38, BLKDBG_PWRITEV = 39, BLKDBG_PWRITEV_ZERO = 40, BLKDBG_PWRITEV_DONE = 41, BLKDBG_EMPTY_IMAGE_PREPARE = 42, BLKDBG_L1_SHRINK_WRITE_TABLE = 43, BLKDBG_L1_SHRINK_FREE_L2_CLUSTERS = 44, BLKDBG_COR_WRITE = 45, BLKDBG__MAX = 46, } BlkdebugEvent; extern const QEnumLookup BlkdebugEvent_lookup; typedef struct BlkdebugInjectErrorOptions BlkdebugInjectErrorOptions; typedef struct BlkdebugInjectErrorOptionsList BlkdebugInjectErrorOptionsList; typedef struct BlkdebugSetStateOptions BlkdebugSetStateOptions; typedef struct BlkdebugSetStateOptionsList BlkdebugSetStateOptionsList; typedef struct BlockDeviceInfo BlockDeviceInfo; typedef struct BlockDeviceInfoList BlockDeviceInfoList; typedef enum BlockDeviceIoStatus { BLOCK_DEVICE_IO_STATUS_OK = 0, BLOCK_DEVICE_IO_STATUS_FAILED = 1, BLOCK_DEVICE_IO_STATUS_NOSPACE = 2, BLOCK_DEVICE_IO_STATUS__MAX = 3, } BlockDeviceIoStatus; extern const QEnumLookup BlockDeviceIoStatus_lookup; typedef struct BlockDeviceMapEntry BlockDeviceMapEntry; typedef struct BlockDeviceStats BlockDeviceStats; typedef struct BlockDeviceTimedStats BlockDeviceTimedStats; typedef struct BlockDeviceTimedStatsList BlockDeviceTimedStatsList; typedef struct BlockDirtyBitmap BlockDirtyBitmap; typedef struct BlockDirtyBitmapAdd BlockDirtyBitmapAdd; typedef struct BlockDirtyBitmapSha256 BlockDirtyBitmapSha256; typedef struct BlockDirtyInfo BlockDirtyInfo; typedef struct BlockDirtyInfoList BlockDirtyInfoList; typedef enum BlockErrorAction { BLOCK_ERROR_ACTION_IGNORE = 0, BLOCK_ERROR_ACTION_REPORT = 1, BLOCK_ERROR_ACTION_STOP = 2, BLOCK_ERROR_ACTION__MAX = 3, } BlockErrorAction; extern const QEnumLookup BlockErrorAction_lookup; typedef struct BlockIOThrottle BlockIOThrottle; typedef struct BlockInfo BlockInfo; typedef struct BlockInfoList BlockInfoList; typedef struct BlockJobInfo BlockJobInfo; typedef struct BlockJobInfoList BlockJobInfoList; typedef enum BlockJobType { BLOCK_JOB_TYPE_COMMIT = 0, BLOCK_JOB_TYPE_STREAM = 1, BLOCK_JOB_TYPE_MIRROR = 2, BLOCK_JOB_TYPE_BACKUP = 3, BLOCK_JOB_TYPE__MAX = 4, } BlockJobType; extern const QEnumLookup BlockJobType_lookup; typedef struct BlockMeasureInfo BlockMeasureInfo; typedef struct BlockStats BlockStats; typedef struct BlockStatsList BlockStatsList; typedef enum BlockdevAioOptions { BLOCKDEV_AIO_OPTIONS_THREADS = 0, BLOCKDEV_AIO_OPTIONS_NATIVE = 1, BLOCKDEV_AIO_OPTIONS__MAX = 2, } BlockdevAioOptions; extern const QEnumLookup BlockdevAioOptions_lookup; typedef struct BlockdevBackup BlockdevBackup; typedef struct BlockdevCacheInfo BlockdevCacheInfo; typedef struct BlockdevCacheOptions BlockdevCacheOptions; typedef enum BlockdevChangeReadOnlyMode { BLOCKDEV_CHANGE_READ_ONLY_MODE_RETAIN = 0, BLOCKDEV_CHANGE_READ_ONLY_MODE_READ_ONLY = 1, BLOCKDEV_CHANGE_READ_ONLY_MODE_READ_WRITE = 2, BLOCKDEV_CHANGE_READ_ONLY_MODE__MAX = 3, } BlockdevChangeReadOnlyMode; extern const QEnumLookup BlockdevChangeReadOnlyMode_lookup; typedef enum BlockdevDetectZeroesOptions { BLOCKDEV_DETECT_ZEROES_OPTIONS_OFF = 0, BLOCKDEV_DETECT_ZEROES_OPTIONS_ON = 1, BLOCKDEV_DETECT_ZEROES_OPTIONS_UNMAP = 2, BLOCKDEV_DETECT_ZEROES_OPTIONS__MAX = 3, } BlockdevDetectZeroesOptions; extern const QEnumLookup BlockdevDetectZeroesOptions_lookup; typedef enum BlockdevDiscardOptions { BLOCKDEV_DISCARD_OPTIONS_IGNORE = 0, BLOCKDEV_DISCARD_OPTIONS_UNMAP = 1, BLOCKDEV_DISCARD_OPTIONS__MAX = 2, } BlockdevDiscardOptions; extern const QEnumLookup BlockdevDiscardOptions_lookup; typedef enum BlockdevDriver { BLOCKDEV_DRIVER_BLKDEBUG = 0, BLOCKDEV_DRIVER_BLKVERIFY = 1, BLOCKDEV_DRIVER_BOCHS = 2, BLOCKDEV_DRIVER_CLOOP = 3, BLOCKDEV_DRIVER_DMG = 4, BLOCKDEV_DRIVER_FILE = 5, BLOCKDEV_DRIVER_FTP = 6, BLOCKDEV_DRIVER_FTPS = 7, BLOCKDEV_DRIVER_GLUSTER = 8, BLOCKDEV_DRIVER_HOST_CDROM = 9, BLOCKDEV_DRIVER_HOST_DEVICE = 10, BLOCKDEV_DRIVER_HTTP = 11, BLOCKDEV_DRIVER_HTTPS = 12, BLOCKDEV_DRIVER_ISCSI = 13, BLOCKDEV_DRIVER_LUKS = 14, BLOCKDEV_DRIVER_NBD = 15, BLOCKDEV_DRIVER_NFS = 16, BLOCKDEV_DRIVER_NULL_AIO = 17, BLOCKDEV_DRIVER_NULL_CO = 18, BLOCKDEV_DRIVER_PARALLELS = 19, BLOCKDEV_DRIVER_QCOW = 20, BLOCKDEV_DRIVER_QCOW2 = 21, BLOCKDEV_DRIVER_QED = 22, BLOCKDEV_DRIVER_QUORUM = 23, BLOCKDEV_DRIVER_RAW = 24, BLOCKDEV_DRIVER_RBD = 25, BLOCKDEV_DRIVER_REPLICATION = 26, BLOCKDEV_DRIVER_SHEEPDOG = 27, BLOCKDEV_DRIVER_SSH = 28, BLOCKDEV_DRIVER_THROTTLE = 29, BLOCKDEV_DRIVER_VDI = 30, BLOCKDEV_DRIVER_VHDX = 31, BLOCKDEV_DRIVER_VMDK = 32, BLOCKDEV_DRIVER_VPC = 33, BLOCKDEV_DRIVER_VVFAT = 34, BLOCKDEV_DRIVER_VXHS = 35, BLOCKDEV_DRIVER__MAX = 36, } BlockdevDriver; extern const QEnumLookup BlockdevDriver_lookup; typedef enum BlockdevOnError { BLOCKDEV_ON_ERROR_REPORT = 0, BLOCKDEV_ON_ERROR_IGNORE = 1, BLOCKDEV_ON_ERROR_ENOSPC = 2, BLOCKDEV_ON_ERROR_STOP = 3, BLOCKDEV_ON_ERROR_AUTO = 4, BLOCKDEV_ON_ERROR__MAX = 5, } BlockdevOnError; extern const QEnumLookup BlockdevOnError_lookup; typedef struct BlockdevOptions BlockdevOptions; typedef struct BlockdevOptionsBlkdebug BlockdevOptionsBlkdebug; typedef struct BlockdevOptionsBlkverify BlockdevOptionsBlkverify; typedef struct BlockdevOptionsCurlBase BlockdevOptionsCurlBase; typedef struct BlockdevOptionsCurlFtp BlockdevOptionsCurlFtp; typedef struct BlockdevOptionsCurlFtps BlockdevOptionsCurlFtps; typedef struct BlockdevOptionsCurlHttp BlockdevOptionsCurlHttp; typedef struct BlockdevOptionsCurlHttps BlockdevOptionsCurlHttps; typedef struct BlockdevOptionsFile BlockdevOptionsFile; typedef struct BlockdevOptionsGenericCOWFormat BlockdevOptionsGenericCOWFormat; typedef struct BlockdevOptionsGenericFormat BlockdevOptionsGenericFormat; typedef struct BlockdevOptionsGluster BlockdevOptionsGluster; typedef struct BlockdevOptionsIscsi BlockdevOptionsIscsi; typedef struct BlockdevOptionsLUKS BlockdevOptionsLUKS; typedef struct BlockdevOptionsNbd BlockdevOptionsNbd; typedef struct BlockdevOptionsNfs BlockdevOptionsNfs; typedef struct BlockdevOptionsNull BlockdevOptionsNull; typedef struct BlockdevOptionsQcow BlockdevOptionsQcow; typedef struct BlockdevOptionsQcow2 BlockdevOptionsQcow2; typedef struct BlockdevOptionsQuorum BlockdevOptionsQuorum; typedef struct BlockdevOptionsRaw BlockdevOptionsRaw; typedef struct BlockdevOptionsRbd BlockdevOptionsRbd; typedef struct BlockdevOptionsReplication BlockdevOptionsReplication; typedef struct BlockdevOptionsSheepdog BlockdevOptionsSheepdog; typedef struct BlockdevOptionsSsh BlockdevOptionsSsh; typedef struct BlockdevOptionsThrottle BlockdevOptionsThrottle; typedef struct BlockdevOptionsVVFAT BlockdevOptionsVVFAT; typedef struct BlockdevOptionsVxHS BlockdevOptionsVxHS; typedef struct BlockdevQcow2Encryption BlockdevQcow2Encryption; typedef enum BlockdevQcow2EncryptionFormat { BLOCKDEV_QCOW2_ENCRYPTION_FORMAT_AES = 0, BLOCKDEV_QCOW2_ENCRYPTION_FORMAT_LUKS = 1, BLOCKDEV_QCOW2_ENCRYPTION_FORMAT__MAX = 2, } BlockdevQcow2EncryptionFormat; extern const QEnumLookup BlockdevQcow2EncryptionFormat_lookup; typedef struct BlockdevQcowEncryption BlockdevQcowEncryption; typedef enum BlockdevQcowEncryptionFormat { BLOCKDEV_QCOW_ENCRYPTION_FORMAT_AES = 0, BLOCKDEV_QCOW_ENCRYPTION_FORMAT__MAX = 1, } BlockdevQcowEncryptionFormat; extern const QEnumLookup BlockdevQcowEncryptionFormat_lookup; typedef struct BlockdevRef BlockdevRef; typedef struct BlockdevRefList BlockdevRefList; typedef struct BlockdevRefOrNull BlockdevRefOrNull; typedef struct BlockdevSnapshot BlockdevSnapshot; typedef struct BlockdevSnapshotInternal BlockdevSnapshotInternal; typedef struct BlockdevSnapshotSync BlockdevSnapshotSync; typedef enum COLOMessage { COLO_MESSAGE_CHECKPOINT_READY = 0, COLO_MESSAGE_CHECKPOINT_REQUEST = 1, COLO_MESSAGE_CHECKPOINT_REPLY = 2, COLO_MESSAGE_VMSTATE_SEND = 3, COLO_MESSAGE_VMSTATE_SIZE = 4, COLO_MESSAGE_VMSTATE_RECEIVED = 5, COLO_MESSAGE_VMSTATE_LOADED = 6, COLO_MESSAGE__MAX = 7, } COLOMessage; extern const QEnumLookup COLOMessage_lookup; typedef enum COLOMode { COLO_MODE_UNKNOWN = 0, COLO_MODE_PRIMARY = 1, COLO_MODE_SECONDARY = 2, COLO_MODE__MAX = 3, } COLOMode; extern const QEnumLookup COLOMode_lookup; typedef struct ChardevBackend ChardevBackend; typedef struct ChardevBackendInfo ChardevBackendInfo; typedef struct ChardevBackendInfoList ChardevBackendInfoList; typedef enum ChardevBackendKind { CHARDEV_BACKEND_KIND_FILE = 0, CHARDEV_BACKEND_KIND_SERIAL = 1, CHARDEV_BACKEND_KIND_PARALLEL = 2, CHARDEV_BACKEND_KIND_PIPE = 3, CHARDEV_BACKEND_KIND_SOCKET = 4, CHARDEV_BACKEND_KIND_UDP = 5, CHARDEV_BACKEND_KIND_PTY = 6, CHARDEV_BACKEND_KIND_NULL = 7, CHARDEV_BACKEND_KIND_MUX = 8, CHARDEV_BACKEND_KIND_MSMOUSE = 9, CHARDEV_BACKEND_KIND_WCTABLET = 10, CHARDEV_BACKEND_KIND_BRAILLE = 11, CHARDEV_BACKEND_KIND_TESTDEV = 12, CHARDEV_BACKEND_KIND_STDIO = 13, CHARDEV_BACKEND_KIND_CONSOLE = 14, CHARDEV_BACKEND_KIND_SPICEVMC = 15, CHARDEV_BACKEND_KIND_SPICEPORT = 16, CHARDEV_BACKEND_KIND_VC = 17, CHARDEV_BACKEND_KIND_RINGBUF = 18, CHARDEV_BACKEND_KIND_MEMORY = 19, CHARDEV_BACKEND_KIND__MAX = 20, } ChardevBackendKind; extern const QEnumLookup ChardevBackendKind_lookup; typedef struct ChardevCommon ChardevCommon; typedef struct ChardevFile ChardevFile; typedef struct ChardevHostdev ChardevHostdev; typedef struct ChardevInfo ChardevInfo; typedef struct ChardevInfoList ChardevInfoList; typedef struct ChardevMux ChardevMux; typedef struct ChardevReturn ChardevReturn; typedef struct ChardevRingbuf ChardevRingbuf; typedef struct ChardevSocket ChardevSocket; typedef struct ChardevSpiceChannel ChardevSpiceChannel; typedef struct ChardevSpicePort ChardevSpicePort; typedef struct ChardevStdio ChardevStdio; typedef struct ChardevUdp ChardevUdp; typedef struct ChardevVC ChardevVC; typedef struct CommandInfo CommandInfo; typedef struct CommandInfoList CommandInfoList; typedef struct CommandLineOptionInfo CommandLineOptionInfo; typedef struct CommandLineOptionInfoList CommandLineOptionInfoList; typedef struct CommandLineParameterInfo CommandLineParameterInfo; typedef struct CommandLineParameterInfoList CommandLineParameterInfoList; typedef enum CommandLineParameterType { COMMAND_LINE_PARAMETER_TYPE_STRING = 0, COMMAND_LINE_PARAMETER_TYPE_BOOLEAN = 1, COMMAND_LINE_PARAMETER_TYPE_NUMBER = 2, COMMAND_LINE_PARAMETER_TYPE_SIZE = 3, COMMAND_LINE_PARAMETER_TYPE__MAX = 4, } CommandLineParameterType; extern const QEnumLookup CommandLineParameterType_lookup; typedef struct CpuDefinitionInfo CpuDefinitionInfo; typedef struct CpuDefinitionInfoList CpuDefinitionInfoList; typedef struct CpuInfo CpuInfo; typedef enum CpuInfoArch { CPU_INFO_ARCH_X86 = 0, CPU_INFO_ARCH_SPARC = 1, CPU_INFO_ARCH_PPC = 2, CPU_INFO_ARCH_MIPS = 3, CPU_INFO_ARCH_TRICORE = 4, CPU_INFO_ARCH_OTHER = 5, CPU_INFO_ARCH__MAX = 6, } CpuInfoArch; extern const QEnumLookup CpuInfoArch_lookup; typedef struct CpuInfoList CpuInfoList; typedef struct CpuInfoMIPS CpuInfoMIPS; typedef struct CpuInfoOther CpuInfoOther; typedef struct CpuInfoPPC CpuInfoPPC; typedef struct CpuInfoSPARC CpuInfoSPARC; typedef struct CpuInfoTricore CpuInfoTricore; typedef struct CpuInfoX86 CpuInfoX86; typedef struct CpuInstanceProperties CpuInstanceProperties; typedef struct CpuModelBaselineInfo CpuModelBaselineInfo; typedef struct CpuModelCompareInfo CpuModelCompareInfo; typedef enum CpuModelCompareResult { CPU_MODEL_COMPARE_RESULT_INCOMPATIBLE = 0, CPU_MODEL_COMPARE_RESULT_IDENTICAL = 1, CPU_MODEL_COMPARE_RESULT_SUPERSET = 2, CPU_MODEL_COMPARE_RESULT_SUBSET = 3, CPU_MODEL_COMPARE_RESULT__MAX = 4, } CpuModelCompareResult; extern const QEnumLookup CpuModelCompareResult_lookup; typedef struct CpuModelExpansionInfo CpuModelExpansionInfo; typedef enum CpuModelExpansionType { CPU_MODEL_EXPANSION_TYPE_STATIC = 0, CPU_MODEL_EXPANSION_TYPE_FULL = 1, CPU_MODEL_EXPANSION_TYPE__MAX = 2, } CpuModelExpansionType; extern const QEnumLookup CpuModelExpansionType_lookup; typedef struct CpuModelInfo CpuModelInfo; typedef enum DataFormat { DATA_FORMAT_UTF8 = 0, DATA_FORMAT_BASE64 = 1, DATA_FORMAT__MAX = 2, } DataFormat; extern const QEnumLookup DataFormat_lookup; typedef struct DevicePropertyInfo DevicePropertyInfo; typedef struct DevicePropertyInfoList DevicePropertyInfoList; typedef enum DirtyBitmapStatus { DIRTY_BITMAP_STATUS_ACTIVE = 0, DIRTY_BITMAP_STATUS_DISABLED = 1, DIRTY_BITMAP_STATUS_FROZEN = 2, DIRTY_BITMAP_STATUS__MAX = 3, } DirtyBitmapStatus; extern const QEnumLookup DirtyBitmapStatus_lookup; typedef struct DriveBackup DriveBackup; typedef struct DriveMirror DriveMirror; typedef struct DummyForceArrays DummyForceArrays; typedef struct DumpGuestMemoryCapability DumpGuestMemoryCapability; typedef enum DumpGuestMemoryFormat { DUMP_GUEST_MEMORY_FORMAT_ELF = 0, DUMP_GUEST_MEMORY_FORMAT_KDUMP_ZLIB = 1, DUMP_GUEST_MEMORY_FORMAT_KDUMP_LZO = 2, DUMP_GUEST_MEMORY_FORMAT_KDUMP_SNAPPY = 3, DUMP_GUEST_MEMORY_FORMAT__MAX = 4, } DumpGuestMemoryFormat; extern const QEnumLookup DumpGuestMemoryFormat_lookup; typedef struct DumpGuestMemoryFormatList DumpGuestMemoryFormatList; typedef struct DumpQueryResult DumpQueryResult; typedef enum DumpStatus { DUMP_STATUS_NONE = 0, DUMP_STATUS_ACTIVE = 1, DUMP_STATUS_COMPLETED = 2, DUMP_STATUS_FAILED = 3, DUMP_STATUS__MAX = 4, } DumpStatus; extern const QEnumLookup DumpStatus_lookup; typedef struct EventInfo EventInfo; typedef struct EventInfoList EventInfoList; typedef enum FailoverStatus { FAILOVER_STATUS_NONE = 0, FAILOVER_STATUS_REQUIRE = 1, FAILOVER_STATUS_ACTIVE = 2, FAILOVER_STATUS_COMPLETED = 3, FAILOVER_STATUS_RELAUNCH = 4, FAILOVER_STATUS__MAX = 5, } FailoverStatus; extern const QEnumLookup FailoverStatus_lookup; typedef struct FdsetFdInfo FdsetFdInfo; typedef struct FdsetFdInfoList FdsetFdInfoList; typedef struct FdsetInfo FdsetInfo; typedef struct FdsetInfoList FdsetInfoList; typedef enum FloppyDriveType { FLOPPY_DRIVE_TYPE_144 = 0, FLOPPY_DRIVE_TYPE_288 = 1, FLOPPY_DRIVE_TYPE_120 = 2, FLOPPY_DRIVE_TYPE_NONE = 3, FLOPPY_DRIVE_TYPE_AUTO = 4, FLOPPY_DRIVE_TYPE__MAX = 5, } FloppyDriveType; extern const QEnumLookup FloppyDriveType_lookup; typedef struct GICCapability GICCapability; typedef struct GICCapabilityList GICCapabilityList; typedef enum GuestPanicAction { GUEST_PANIC_ACTION_PAUSE = 0, GUEST_PANIC_ACTION_POWEROFF = 1, GUEST_PANIC_ACTION__MAX = 2, } GuestPanicAction; extern const QEnumLookup GuestPanicAction_lookup; typedef struct GuestPanicInformation GuestPanicInformation; typedef struct GuestPanicInformationHyperV GuestPanicInformationHyperV; typedef enum GuestPanicInformationType { GUEST_PANIC_INFORMATION_TYPE_HYPER_V = 0, GUEST_PANIC_INFORMATION_TYPE__MAX = 1, } GuestPanicInformationType; extern const QEnumLookup GuestPanicInformationType_lookup; typedef struct GuidInfo GuidInfo; typedef enum HostMemPolicy { HOST_MEM_POLICY_DEFAULT = 0, HOST_MEM_POLICY_PREFERRED = 1, HOST_MEM_POLICY_BIND = 2, HOST_MEM_POLICY_INTERLEAVE = 3, HOST_MEM_POLICY__MAX = 4, } HostMemPolicy; extern const QEnumLookup HostMemPolicy_lookup; typedef struct HotpluggableCPU HotpluggableCPU; typedef struct HotpluggableCPUList HotpluggableCPUList; typedef struct IOThreadInfo IOThreadInfo; typedef struct IOThreadInfoList IOThreadInfoList; typedef struct ImageCheck ImageCheck; typedef struct ImageInfo ImageInfo; typedef struct ImageInfoList ImageInfoList; typedef struct ImageInfoSpecific ImageInfoSpecific; typedef enum ImageInfoSpecificKind { IMAGE_INFO_SPECIFIC_KIND_QCOW2 = 0, IMAGE_INFO_SPECIFIC_KIND_VMDK = 1, IMAGE_INFO_SPECIFIC_KIND_LUKS = 2, IMAGE_INFO_SPECIFIC_KIND__MAX = 3, } ImageInfoSpecificKind; extern const QEnumLookup ImageInfoSpecificKind_lookup; typedef struct ImageInfoSpecificQCow2 ImageInfoSpecificQCow2; typedef struct ImageInfoSpecificQCow2Encryption ImageInfoSpecificQCow2Encryption; typedef struct ImageInfoSpecificQCow2EncryptionBase ImageInfoSpecificQCow2EncryptionBase; typedef struct ImageInfoSpecificVmdk ImageInfoSpecificVmdk; typedef struct InetSocketAddress InetSocketAddress; typedef struct InetSocketAddressBase InetSocketAddressBase; typedef struct InetSocketAddressBaseList InetSocketAddressBaseList; typedef enum InputAxis { INPUT_AXIS_X = 0, INPUT_AXIS_Y = 1, INPUT_AXIS__MAX = 2, } InputAxis; extern const QEnumLookup InputAxis_lookup; typedef struct InputBtnEvent InputBtnEvent; typedef enum InputButton { INPUT_BUTTON_LEFT = 0, INPUT_BUTTON_MIDDLE = 1, INPUT_BUTTON_RIGHT = 2, INPUT_BUTTON_WHEEL_UP = 3, INPUT_BUTTON_WHEEL_DOWN = 4, INPUT_BUTTON_SIDE = 5, INPUT_BUTTON_EXTRA = 6, INPUT_BUTTON__MAX = 7, } InputButton; extern const QEnumLookup InputButton_lookup; typedef struct InputEvent InputEvent; typedef enum InputEventKind { INPUT_EVENT_KIND_KEY = 0, INPUT_EVENT_KIND_BTN = 1, INPUT_EVENT_KIND_REL = 2, INPUT_EVENT_KIND_ABS = 3, INPUT_EVENT_KIND__MAX = 4, } InputEventKind; extern const QEnumLookup InputEventKind_lookup; typedef struct InputEventList InputEventList; typedef struct InputKeyEvent InputKeyEvent; typedef struct InputMoveEvent InputMoveEvent; typedef enum IoOperationType { IO_OPERATION_TYPE_READ = 0, IO_OPERATION_TYPE_WRITE = 1, IO_OPERATION_TYPE__MAX = 2, } IoOperationType; extern const QEnumLookup IoOperationType_lookup; typedef enum IscsiHeaderDigest { QAPI_ISCSI_HEADER_DIGEST_CRC32C = 0, QAPI_ISCSI_HEADER_DIGEST_NONE = 1, QAPI_ISCSI_HEADER_DIGEST_CRC32C_NONE = 2, QAPI_ISCSI_HEADER_DIGEST_NONE_CRC32C = 3, QAPI_ISCSI_HEADER_DIGEST__MAX = 4, } IscsiHeaderDigest; extern const QEnumLookup IscsiHeaderDigest_lookup; typedef enum IscsiTransport { ISCSI_TRANSPORT_TCP = 0, ISCSI_TRANSPORT_ISER = 1, ISCSI_TRANSPORT__MAX = 2, } IscsiTransport; extern const QEnumLookup IscsiTransport_lookup; typedef enum JSONType { JSON_TYPE_STRING = 0, JSON_TYPE_NUMBER = 1, JSON_TYPE_INT = 2, JSON_TYPE_BOOLEAN = 3, JSON_TYPE_NULL = 4, JSON_TYPE_OBJECT = 5, JSON_TYPE_ARRAY = 6, JSON_TYPE_VALUE = 7, JSON_TYPE__MAX = 8, } JSONType; extern const QEnumLookup JSONType_lookup; typedef struct KeyValue KeyValue; typedef enum KeyValueKind { KEY_VALUE_KIND_NUMBER = 0, KEY_VALUE_KIND_QCODE = 1, KEY_VALUE_KIND__MAX = 2, } KeyValueKind; extern const QEnumLookup KeyValueKind_lookup; typedef struct KeyValueList KeyValueList; typedef struct KvmInfo KvmInfo; typedef enum LostTickPolicy { LOST_TICK_POLICY_DISCARD = 0, LOST_TICK_POLICY_DELAY = 1, LOST_TICK_POLICY_MERGE = 2, LOST_TICK_POLICY_SLEW = 3, LOST_TICK_POLICY__MAX = 4, } LostTickPolicy; extern const QEnumLookup LostTickPolicy_lookup; typedef struct MachineInfo MachineInfo; typedef struct MachineInfoList MachineInfoList; typedef struct MapEntry MapEntry; typedef struct Memdev Memdev; typedef struct MemdevList MemdevList; typedef struct MemoryDeviceInfo MemoryDeviceInfo; typedef enum MemoryDeviceInfoKind { MEMORY_DEVICE_INFO_KIND_DIMM = 0, MEMORY_DEVICE_INFO_KIND__MAX = 1, } MemoryDeviceInfoKind; extern const QEnumLookup MemoryDeviceInfoKind_lookup; typedef struct MemoryDeviceInfoList MemoryDeviceInfoList; typedef struct MemoryInfo MemoryInfo; typedef struct MigrateSetParameters MigrateSetParameters; typedef enum MigrationCapability { MIGRATION_CAPABILITY_XBZRLE = 0, MIGRATION_CAPABILITY_RDMA_PIN_ALL = 1, MIGRATION_CAPABILITY_AUTO_CONVERGE = 2, MIGRATION_CAPABILITY_ZERO_BLOCKS = 3, MIGRATION_CAPABILITY_COMPRESS = 4, MIGRATION_CAPABILITY_EVENTS = 5, MIGRATION_CAPABILITY_POSTCOPY_RAM = 6, MIGRATION_CAPABILITY_X_COLO = 7, MIGRATION_CAPABILITY_RELEASE_RAM = 8, MIGRATION_CAPABILITY_BLOCK = 9, MIGRATION_CAPABILITY_RETURN_PATH = 10, MIGRATION_CAPABILITY_PAUSE_BEFORE_SWITCHOVER = 11, MIGRATION_CAPABILITY_X_MULTIFD = 12, MIGRATION_CAPABILITY__MAX = 13, } MigrationCapability; extern const QEnumLookup MigrationCapability_lookup; typedef struct MigrationCapabilityStatus MigrationCapabilityStatus; typedef struct MigrationCapabilityStatusList MigrationCapabilityStatusList; typedef struct MigrationInfo MigrationInfo; typedef enum MigrationParameter { MIGRATION_PARAMETER_COMPRESS_LEVEL = 0, MIGRATION_PARAMETER_COMPRESS_THREADS = 1, MIGRATION_PARAMETER_DECOMPRESS_THREADS = 2, MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL = 3, MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT = 4, MIGRATION_PARAMETER_TLS_CREDS = 5, MIGRATION_PARAMETER_TLS_HOSTNAME = 6, MIGRATION_PARAMETER_MAX_BANDWIDTH = 7, MIGRATION_PARAMETER_DOWNTIME_LIMIT = 8, MIGRATION_PARAMETER_X_CHECKPOINT_DELAY = 9, MIGRATION_PARAMETER_BLOCK_INCREMENTAL = 10, MIGRATION_PARAMETER_X_MULTIFD_CHANNELS = 11, MIGRATION_PARAMETER_X_MULTIFD_PAGE_COUNT = 12, MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE = 13, MIGRATION_PARAMETER__MAX = 14, } MigrationParameter; extern const QEnumLookup MigrationParameter_lookup; typedef struct MigrationParameters MigrationParameters; typedef struct MigrationStats MigrationStats; typedef enum MigrationStatus { MIGRATION_STATUS_NONE = 0, MIGRATION_STATUS_SETUP = 1, MIGRATION_STATUS_CANCELLING = 2, MIGRATION_STATUS_CANCELLED = 3, MIGRATION_STATUS_ACTIVE = 4, MIGRATION_STATUS_POSTCOPY_ACTIVE = 5, MIGRATION_STATUS_COMPLETED = 6, MIGRATION_STATUS_FAILED = 7, MIGRATION_STATUS_COLO = 8, MIGRATION_STATUS_PRE_SWITCHOVER = 9, MIGRATION_STATUS_DEVICE = 10, MIGRATION_STATUS__MAX = 11, } MigrationStatus; extern const QEnumLookup MigrationStatus_lookup; typedef enum MirrorSyncMode { MIRROR_SYNC_MODE_TOP = 0, MIRROR_SYNC_MODE_FULL = 1, MIRROR_SYNC_MODE_NONE = 2, MIRROR_SYNC_MODE_INCREMENTAL = 3, MIRROR_SYNC_MODE__MAX = 4, } MirrorSyncMode; extern const QEnumLookup MirrorSyncMode_lookup; typedef struct MouseInfo MouseInfo; typedef struct MouseInfoList MouseInfoList; typedef struct NFSServer NFSServer; typedef enum NFSTransport { NFS_TRANSPORT_INET = 0, NFS_TRANSPORT__MAX = 1, } NFSTransport; extern const QEnumLookup NFSTransport_lookup; typedef struct NameInfo NameInfo; typedef enum NetClientDriver { NET_CLIENT_DRIVER_NONE = 0, NET_CLIENT_DRIVER_NIC = 1, NET_CLIENT_DRIVER_USER = 2, NET_CLIENT_DRIVER_TAP = 3, NET_CLIENT_DRIVER_L2TPV3 = 4, NET_CLIENT_DRIVER_SOCKET = 5, NET_CLIENT_DRIVER_VDE = 6, NET_CLIENT_DRIVER_DUMP = 7, NET_CLIENT_DRIVER_BRIDGE = 8, NET_CLIENT_DRIVER_HUBPORT = 9, NET_CLIENT_DRIVER_NETMAP = 10, NET_CLIENT_DRIVER_VHOST_USER = 11, NET_CLIENT_DRIVER__MAX = 12, } NetClientDriver; extern const QEnumLookup NetClientDriver_lookup; typedef enum NetFilterDirection { NET_FILTER_DIRECTION_ALL = 0, NET_FILTER_DIRECTION_RX = 1, NET_FILTER_DIRECTION_TX = 2, NET_FILTER_DIRECTION__MAX = 3, } NetFilterDirection; extern const QEnumLookup NetFilterDirection_lookup; typedef struct NetLegacy NetLegacy; typedef struct NetLegacyNicOptions NetLegacyNicOptions; typedef struct NetLegacyOptions NetLegacyOptions; typedef enum NetLegacyOptionsType { NET_LEGACY_OPTIONS_TYPE_NONE = 0, NET_LEGACY_OPTIONS_TYPE_NIC = 1, NET_LEGACY_OPTIONS_TYPE_USER = 2, NET_LEGACY_OPTIONS_TYPE_TAP = 3, NET_LEGACY_OPTIONS_TYPE_L2TPV3 = 4, NET_LEGACY_OPTIONS_TYPE_SOCKET = 5, NET_LEGACY_OPTIONS_TYPE_VDE = 6, NET_LEGACY_OPTIONS_TYPE_DUMP = 7, NET_LEGACY_OPTIONS_TYPE_BRIDGE = 8, NET_LEGACY_OPTIONS_TYPE_NETMAP = 9, NET_LEGACY_OPTIONS_TYPE_VHOST_USER = 10, NET_LEGACY_OPTIONS_TYPE__MAX = 11, } NetLegacyOptionsType; extern const QEnumLookup NetLegacyOptionsType_lookup; typedef struct Netdev Netdev; typedef struct NetdevBridgeOptions NetdevBridgeOptions; typedef struct NetdevDumpOptions NetdevDumpOptions; typedef struct NetdevHubPortOptions NetdevHubPortOptions; typedef struct NetdevL2TPv3Options NetdevL2TPv3Options; typedef struct NetdevNetmapOptions NetdevNetmapOptions; typedef struct NetdevNoneOptions NetdevNoneOptions; typedef struct NetdevSocketOptions NetdevSocketOptions; typedef struct NetdevTapOptions NetdevTapOptions; typedef struct NetdevUserOptions NetdevUserOptions; typedef struct NetdevVdeOptions NetdevVdeOptions; typedef struct NetdevVhostUserOptions NetdevVhostUserOptions; typedef enum NetworkAddressFamily { NETWORK_ADDRESS_FAMILY_IPV4 = 0, NETWORK_ADDRESS_FAMILY_IPV6 = 1, NETWORK_ADDRESS_FAMILY_UNIX = 2, NETWORK_ADDRESS_FAMILY_VSOCK = 3, NETWORK_ADDRESS_FAMILY_UNKNOWN = 4, NETWORK_ADDRESS_FAMILY__MAX = 5, } NetworkAddressFamily; extern const QEnumLookup NetworkAddressFamily_lookup; typedef enum NewImageMode { NEW_IMAGE_MODE_EXISTING = 0, NEW_IMAGE_MODE_ABSOLUTE_PATHS = 1, NEW_IMAGE_MODE__MAX = 2, } NewImageMode; extern const QEnumLookup NewImageMode_lookup; typedef struct NumaCpuOptions NumaCpuOptions; typedef struct NumaDistOptions NumaDistOptions; typedef struct NumaNodeOptions NumaNodeOptions; typedef struct NumaOptions NumaOptions; typedef enum NumaOptionsType { NUMA_OPTIONS_TYPE_NODE = 0, NUMA_OPTIONS_TYPE_DIST = 1, NUMA_OPTIONS_TYPE_CPU = 2, NUMA_OPTIONS_TYPE__MAX = 3, } NumaOptionsType; extern const QEnumLookup NumaOptionsType_lookup; typedef struct ObjectPropertyInfo ObjectPropertyInfo; typedef struct ObjectPropertyInfoList ObjectPropertyInfoList; typedef struct ObjectTypeInfo ObjectTypeInfo; typedef struct ObjectTypeInfoList ObjectTypeInfoList; typedef enum OnOffAuto { ON_OFF_AUTO_AUTO = 0, ON_OFF_AUTO_ON = 1, ON_OFF_AUTO_OFF = 2, ON_OFF_AUTO__MAX = 3, } OnOffAuto; extern const QEnumLookup OnOffAuto_lookup; typedef enum OnOffSplit { ON_OFF_SPLIT_ON = 0, ON_OFF_SPLIT_OFF = 1, ON_OFF_SPLIT_SPLIT = 2, ON_OFF_SPLIT__MAX = 3, } OnOffSplit; extern const QEnumLookup OnOffSplit_lookup; typedef struct PCDIMMDeviceInfo PCDIMMDeviceInfo; typedef struct PciBridgeInfo PciBridgeInfo; typedef struct PciBusInfo PciBusInfo; typedef struct PciDeviceClass PciDeviceClass; typedef struct PciDeviceId PciDeviceId; typedef struct PciDeviceInfo PciDeviceInfo; typedef struct PciDeviceInfoList PciDeviceInfoList; typedef struct PciInfo PciInfo; typedef struct PciInfoList PciInfoList; typedef struct PciMemoryRange PciMemoryRange; typedef struct PciMemoryRegion PciMemoryRegion; typedef struct PciMemoryRegionList PciMemoryRegionList; typedef enum PreallocMode { PREALLOC_MODE_OFF = 0, PREALLOC_MODE_METADATA = 1, PREALLOC_MODE_FALLOC = 2, PREALLOC_MODE_FULL = 3, PREALLOC_MODE__MAX = 4, } PreallocMode; extern const QEnumLookup PreallocMode_lookup; typedef struct QCryptoBlockCreateOptions QCryptoBlockCreateOptions; typedef struct QCryptoBlockCreateOptionsLUKS QCryptoBlockCreateOptionsLUKS; typedef enum QCryptoBlockFormat { Q_CRYPTO_BLOCK_FORMAT_QCOW = 0, Q_CRYPTO_BLOCK_FORMAT_LUKS = 1, Q_CRYPTO_BLOCK_FORMAT__MAX = 2, } QCryptoBlockFormat; extern const QEnumLookup QCryptoBlockFormat_lookup; typedef struct QCryptoBlockInfo QCryptoBlockInfo; typedef struct QCryptoBlockInfoBase QCryptoBlockInfoBase; typedef struct QCryptoBlockInfoLUKS QCryptoBlockInfoLUKS; typedef struct QCryptoBlockInfoLUKSSlot QCryptoBlockInfoLUKSSlot; typedef struct QCryptoBlockInfoLUKSSlotList QCryptoBlockInfoLUKSSlotList; typedef struct QCryptoBlockInfoQCow QCryptoBlockInfoQCow; typedef struct QCryptoBlockOpenOptions QCryptoBlockOpenOptions; typedef struct QCryptoBlockOptionsBase QCryptoBlockOptionsBase; typedef struct QCryptoBlockOptionsLUKS QCryptoBlockOptionsLUKS; typedef struct QCryptoBlockOptionsQCow QCryptoBlockOptionsQCow; typedef enum QCryptoCipherAlgorithm { QCRYPTO_CIPHER_ALG_AES_128 = 0, QCRYPTO_CIPHER_ALG_AES_192 = 1, QCRYPTO_CIPHER_ALG_AES_256 = 2, QCRYPTO_CIPHER_ALG_DES_RFB = 3, QCRYPTO_CIPHER_ALG_3DES = 4, QCRYPTO_CIPHER_ALG_CAST5_128 = 5, QCRYPTO_CIPHER_ALG_SERPENT_128 = 6, QCRYPTO_CIPHER_ALG_SERPENT_192 = 7, QCRYPTO_CIPHER_ALG_SERPENT_256 = 8, QCRYPTO_CIPHER_ALG_TWOFISH_128 = 9, QCRYPTO_CIPHER_ALG_TWOFISH_192 = 10, QCRYPTO_CIPHER_ALG_TWOFISH_256 = 11, QCRYPTO_CIPHER_ALG__MAX = 12, } QCryptoCipherAlgorithm; extern const QEnumLookup QCryptoCipherAlgorithm_lookup; typedef enum QCryptoCipherMode { QCRYPTO_CIPHER_MODE_ECB = 0, QCRYPTO_CIPHER_MODE_CBC = 1, QCRYPTO_CIPHER_MODE_XTS = 2, QCRYPTO_CIPHER_MODE_CTR = 3, QCRYPTO_CIPHER_MODE__MAX = 4, } QCryptoCipherMode; extern const QEnumLookup QCryptoCipherMode_lookup; typedef enum QCryptoHashAlgorithm { QCRYPTO_HASH_ALG_MD5 = 0, QCRYPTO_HASH_ALG_SHA1 = 1, QCRYPTO_HASH_ALG_SHA224 = 2, QCRYPTO_HASH_ALG_SHA256 = 3, QCRYPTO_HASH_ALG_SHA384 = 4, QCRYPTO_HASH_ALG_SHA512 = 5, QCRYPTO_HASH_ALG_RIPEMD160 = 6, QCRYPTO_HASH_ALG__MAX = 7, } QCryptoHashAlgorithm; extern const QEnumLookup QCryptoHashAlgorithm_lookup; typedef enum QCryptoIVGenAlgorithm { QCRYPTO_IVGEN_ALG_PLAIN = 0, QCRYPTO_IVGEN_ALG_PLAIN64 = 1, QCRYPTO_IVGEN_ALG_ESSIV = 2, QCRYPTO_IVGEN_ALG__MAX = 3, } QCryptoIVGenAlgorithm; extern const QEnumLookup QCryptoIVGenAlgorithm_lookup; typedef enum QCryptoSecretFormat { QCRYPTO_SECRET_FORMAT_RAW = 0, QCRYPTO_SECRET_FORMAT_BASE64 = 1, QCRYPTO_SECRET_FORMAT__MAX = 2, } QCryptoSecretFormat; extern const QEnumLookup QCryptoSecretFormat_lookup; typedef enum QCryptoTLSCredsEndpoint { QCRYPTO_TLS_CREDS_ENDPOINT_CLIENT = 0, QCRYPTO_TLS_CREDS_ENDPOINT_SERVER = 1, QCRYPTO_TLS_CREDS_ENDPOINT__MAX = 2, } QCryptoTLSCredsEndpoint; extern const QEnumLookup QCryptoTLSCredsEndpoint_lookup; typedef enum QKeyCode { Q_KEY_CODE_UNMAPPED = 0, Q_KEY_CODE_SHIFT = 1, Q_KEY_CODE_SHIFT_R = 2, Q_KEY_CODE_ALT = 3, Q_KEY_CODE_ALT_R = 4, Q_KEY_CODE_CTRL = 5, Q_KEY_CODE_CTRL_R = 6, Q_KEY_CODE_MENU = 7, Q_KEY_CODE_ESC = 8, Q_KEY_CODE_1 = 9, Q_KEY_CODE_2 = 10, Q_KEY_CODE_3 = 11, Q_KEY_CODE_4 = 12, Q_KEY_CODE_5 = 13, Q_KEY_CODE_6 = 14, Q_KEY_CODE_7 = 15, Q_KEY_CODE_8 = 16, Q_KEY_CODE_9 = 17, Q_KEY_CODE_0 = 18, Q_KEY_CODE_MINUS = 19, Q_KEY_CODE_EQUAL = 20, Q_KEY_CODE_BACKSPACE = 21, Q_KEY_CODE_TAB = 22, Q_KEY_CODE_Q = 23, Q_KEY_CODE_W = 24, Q_KEY_CODE_E = 25, Q_KEY_CODE_R = 26, Q_KEY_CODE_T = 27, Q_KEY_CODE_Y = 28, Q_KEY_CODE_U = 29, Q_KEY_CODE_I = 30, Q_KEY_CODE_O = 31, Q_KEY_CODE_P = 32, Q_KEY_CODE_BRACKET_LEFT = 33, Q_KEY_CODE_BRACKET_RIGHT = 34, Q_KEY_CODE_RET = 35, Q_KEY_CODE_A = 36, Q_KEY_CODE_S = 37, Q_KEY_CODE_D = 38, Q_KEY_CODE_F = 39, Q_KEY_CODE_G = 40, Q_KEY_CODE_H = 41, Q_KEY_CODE_J = 42, Q_KEY_CODE_K = 43, Q_KEY_CODE_L = 44, Q_KEY_CODE_SEMICOLON = 45, Q_KEY_CODE_APOSTROPHE = 46, Q_KEY_CODE_GRAVE_ACCENT = 47, Q_KEY_CODE_BACKSLASH = 48, Q_KEY_CODE_Z = 49, Q_KEY_CODE_X = 50, Q_KEY_CODE_C = 51, Q_KEY_CODE_V = 52, Q_KEY_CODE_B = 53, Q_KEY_CODE_N = 54, Q_KEY_CODE_M = 55, Q_KEY_CODE_COMMA = 56, Q_KEY_CODE_DOT = 57, Q_KEY_CODE_SLASH = 58, Q_KEY_CODE_ASTERISK = 59, Q_KEY_CODE_SPC = 60, Q_KEY_CODE_CAPS_LOCK = 61, Q_KEY_CODE_F1 = 62, Q_KEY_CODE_F2 = 63, Q_KEY_CODE_F3 = 64, Q_KEY_CODE_F4 = 65, Q_KEY_CODE_F5 = 66, Q_KEY_CODE_F6 = 67, Q_KEY_CODE_F7 = 68, Q_KEY_CODE_F8 = 69, Q_KEY_CODE_F9 = 70, Q_KEY_CODE_F10 = 71, Q_KEY_CODE_NUM_LOCK = 72, Q_KEY_CODE_SCROLL_LOCK = 73, Q_KEY_CODE_KP_DIVIDE = 74, Q_KEY_CODE_KP_MULTIPLY = 75, Q_KEY_CODE_KP_SUBTRACT = 76, Q_KEY_CODE_KP_ADD = 77, Q_KEY_CODE_KP_ENTER = 78, Q_KEY_CODE_KP_DECIMAL = 79, Q_KEY_CODE_SYSRQ = 80, Q_KEY_CODE_KP_0 = 81, Q_KEY_CODE_KP_1 = 82, Q_KEY_CODE_KP_2 = 83, Q_KEY_CODE_KP_3 = 84, Q_KEY_CODE_KP_4 = 85, Q_KEY_CODE_KP_5 = 86, Q_KEY_CODE_KP_6 = 87, Q_KEY_CODE_KP_7 = 88, Q_KEY_CODE_KP_8 = 89, Q_KEY_CODE_KP_9 = 90, Q_KEY_CODE_LESS = 91, Q_KEY_CODE_F11 = 92, Q_KEY_CODE_F12 = 93, Q_KEY_CODE_PRINT = 94, Q_KEY_CODE_HOME = 95, Q_KEY_CODE_PGUP = 96, Q_KEY_CODE_PGDN = 97, Q_KEY_CODE_END = 98, Q_KEY_CODE_LEFT = 99, Q_KEY_CODE_UP = 100, Q_KEY_CODE_DOWN = 101, Q_KEY_CODE_RIGHT = 102, Q_KEY_CODE_INSERT = 103, Q_KEY_CODE_DELETE = 104, Q_KEY_CODE_STOP = 105, Q_KEY_CODE_AGAIN = 106, Q_KEY_CODE_PROPS = 107, Q_KEY_CODE_UNDO = 108, Q_KEY_CODE_FRONT = 109, Q_KEY_CODE_COPY = 110, Q_KEY_CODE_OPEN = 111, Q_KEY_CODE_PASTE = 112, Q_KEY_CODE_FIND = 113, Q_KEY_CODE_CUT = 114, Q_KEY_CODE_LF = 115, Q_KEY_CODE_HELP = 116, Q_KEY_CODE_META_L = 117, Q_KEY_CODE_META_R = 118, Q_KEY_CODE_COMPOSE = 119, Q_KEY_CODE_PAUSE = 120, Q_KEY_CODE_RO = 121, Q_KEY_CODE_HIRAGANA = 122, Q_KEY_CODE_HENKAN = 123, Q_KEY_CODE_YEN = 124, Q_KEY_CODE_KP_COMMA = 125, Q_KEY_CODE_KP_EQUALS = 126, Q_KEY_CODE_POWER = 127, Q_KEY_CODE_SLEEP = 128, Q_KEY_CODE_WAKE = 129, Q_KEY_CODE_AUDIONEXT = 130, Q_KEY_CODE_AUDIOPREV = 131, Q_KEY_CODE_AUDIOSTOP = 132, Q_KEY_CODE_AUDIOPLAY = 133, Q_KEY_CODE_AUDIOMUTE = 134, Q_KEY_CODE_VOLUMEUP = 135, Q_KEY_CODE_VOLUMEDOWN = 136, Q_KEY_CODE_MEDIASELECT = 137, Q_KEY_CODE_MAIL = 138, Q_KEY_CODE_CALCULATOR = 139, Q_KEY_CODE_COMPUTER = 140, Q_KEY_CODE_AC_HOME = 141, Q_KEY_CODE_AC_BACK = 142, Q_KEY_CODE_AC_FORWARD = 143, Q_KEY_CODE_AC_REFRESH = 144, Q_KEY_CODE_AC_BOOKMARKS = 145, Q_KEY_CODE__MAX = 146, } QKeyCode; extern const QEnumLookup QKeyCode_lookup; typedef enum QapiErrorClass { QAPI_ERROR_CLASS_GENERICERROR = 0, QAPI_ERROR_CLASS_COMMANDNOTFOUND = 1, QAPI_ERROR_CLASS_DEVICENOTACTIVE = 2, QAPI_ERROR_CLASS_DEVICENOTFOUND = 3, QAPI_ERROR_CLASS_KVMMISSINGCAP = 4, QAPI_ERROR_CLASS__MAX = 5, } QapiErrorClass; extern const QEnumLookup QapiErrorClass_lookup; typedef struct Qcow2OverlapCheckFlags Qcow2OverlapCheckFlags; typedef enum Qcow2OverlapCheckMode { QCOW2_OVERLAP_CHECK_MODE_NONE = 0, QCOW2_OVERLAP_CHECK_MODE_CONSTANT = 1, QCOW2_OVERLAP_CHECK_MODE_CACHED = 2, QCOW2_OVERLAP_CHECK_MODE_ALL = 3, QCOW2_OVERLAP_CHECK_MODE__MAX = 4, } Qcow2OverlapCheckMode; extern const QEnumLookup Qcow2OverlapCheckMode_lookup; typedef struct Qcow2OverlapChecks Qcow2OverlapChecks; typedef enum QuorumOpType { QUORUM_OP_TYPE_READ = 0, QUORUM_OP_TYPE_WRITE = 1, QUORUM_OP_TYPE_FLUSH = 2, QUORUM_OP_TYPE__MAX = 3, } QuorumOpType; extern const QEnumLookup QuorumOpType_lookup; typedef enum QuorumReadPattern { QUORUM_READ_PATTERN_QUORUM = 0, QUORUM_READ_PATTERN_FIFO = 1, QUORUM_READ_PATTERN__MAX = 2, } QuorumReadPattern; extern const QEnumLookup QuorumReadPattern_lookup; typedef enum ReplayMode { REPLAY_MODE_NONE = 0, REPLAY_MODE_RECORD = 1, REPLAY_MODE_PLAY = 2, REPLAY_MODE__MAX = 3, } ReplayMode; extern const QEnumLookup ReplayMode_lookup; typedef enum ReplicationMode { REPLICATION_MODE_PRIMARY = 0, REPLICATION_MODE_SECONDARY = 1, REPLICATION_MODE__MAX = 2, } ReplicationMode; extern const QEnumLookup ReplicationMode_lookup; typedef struct ReplicationStatus ReplicationStatus; typedef struct RockerOfDpaFlow RockerOfDpaFlow; typedef struct RockerOfDpaFlowAction RockerOfDpaFlowAction; typedef struct RockerOfDpaFlowKey RockerOfDpaFlowKey; typedef struct RockerOfDpaFlowList RockerOfDpaFlowList; typedef struct RockerOfDpaFlowMask RockerOfDpaFlowMask; typedef struct RockerOfDpaGroup RockerOfDpaGroup; typedef struct RockerOfDpaGroupList RockerOfDpaGroupList; typedef struct RockerPort RockerPort; typedef enum RockerPortAutoneg { ROCKER_PORT_AUTONEG_OFF = 0, ROCKER_PORT_AUTONEG_ON = 1, ROCKER_PORT_AUTONEG__MAX = 2, } RockerPortAutoneg; extern const QEnumLookup RockerPortAutoneg_lookup; typedef enum RockerPortDuplex { ROCKER_PORT_DUPLEX_HALF = 0, ROCKER_PORT_DUPLEX_FULL = 1, ROCKER_PORT_DUPLEX__MAX = 2, } RockerPortDuplex; extern const QEnumLookup RockerPortDuplex_lookup; typedef struct RockerPortList RockerPortList; typedef struct RockerSwitch RockerSwitch; typedef enum RunState { RUN_STATE_DEBUG = 0, RUN_STATE_INMIGRATE = 1, RUN_STATE_INTERNAL_ERROR = 2, RUN_STATE_IO_ERROR = 3, RUN_STATE_PAUSED = 4, RUN_STATE_POSTMIGRATE = 5, RUN_STATE_PRELAUNCH = 6, RUN_STATE_FINISH_MIGRATE = 7, RUN_STATE_RESTORE_VM = 8, RUN_STATE_RUNNING = 9, RUN_STATE_SAVE_VM = 10, RUN_STATE_SHUTDOWN = 11, RUN_STATE_SUSPENDED = 12, RUN_STATE_WATCHDOG = 13, RUN_STATE_GUEST_PANICKED = 14, RUN_STATE_COLO = 15, RUN_STATE__MAX = 16, } RunState; extern const QEnumLookup RunState_lookup; typedef struct RxFilterInfo RxFilterInfo; typedef struct RxFilterInfoList RxFilterInfoList; typedef enum RxState { RX_STATE_NORMAL = 0, RX_STATE_NONE = 1, RX_STATE_ALL = 2, RX_STATE__MAX = 3, } RxState; extern const QEnumLookup RxState_lookup; typedef struct SchemaInfo SchemaInfo; typedef struct SchemaInfoAlternate SchemaInfoAlternate; typedef struct SchemaInfoAlternateMember SchemaInfoAlternateMember; typedef struct SchemaInfoAlternateMemberList SchemaInfoAlternateMemberList; typedef struct SchemaInfoArray SchemaInfoArray; typedef struct SchemaInfoBuiltin SchemaInfoBuiltin; typedef struct SchemaInfoCommand SchemaInfoCommand; typedef struct SchemaInfoEnum SchemaInfoEnum; typedef struct SchemaInfoEvent SchemaInfoEvent; typedef struct SchemaInfoList SchemaInfoList; typedef struct SchemaInfoObject SchemaInfoObject; typedef struct SchemaInfoObjectMember SchemaInfoObjectMember; typedef struct SchemaInfoObjectMemberList SchemaInfoObjectMemberList; typedef struct SchemaInfoObjectVariant SchemaInfoObjectVariant; typedef struct SchemaInfoObjectVariantList SchemaInfoObjectVariantList; typedef enum SchemaMetaType { SCHEMA_META_TYPE_BUILTIN = 0, SCHEMA_META_TYPE_ENUM = 1, SCHEMA_META_TYPE_ARRAY = 2, SCHEMA_META_TYPE_OBJECT = 3, SCHEMA_META_TYPE_ALTERNATE = 4, SCHEMA_META_TYPE_COMMAND = 5, SCHEMA_META_TYPE_EVENT = 6, SCHEMA_META_TYPE__MAX = 7, } SchemaMetaType; extern const QEnumLookup SchemaMetaType_lookup; typedef struct SnapshotInfo SnapshotInfo; typedef struct SnapshotInfoList SnapshotInfoList; typedef struct SocketAddress SocketAddress; typedef struct SocketAddressLegacy SocketAddressLegacy; typedef enum SocketAddressLegacyKind { SOCKET_ADDRESS_LEGACY_KIND_INET = 0, SOCKET_ADDRESS_LEGACY_KIND_UNIX = 1, SOCKET_ADDRESS_LEGACY_KIND_VSOCK = 2, SOCKET_ADDRESS_LEGACY_KIND_FD = 3, SOCKET_ADDRESS_LEGACY_KIND__MAX = 4, } SocketAddressLegacyKind; extern const QEnumLookup SocketAddressLegacyKind_lookup; typedef struct SocketAddressList SocketAddressList; typedef enum SocketAddressType { SOCKET_ADDRESS_TYPE_INET = 0, SOCKET_ADDRESS_TYPE_UNIX = 1, SOCKET_ADDRESS_TYPE_VSOCK = 2, SOCKET_ADDRESS_TYPE_FD = 3, SOCKET_ADDRESS_TYPE__MAX = 4, } SocketAddressType; extern const QEnumLookup SocketAddressType_lookup; typedef struct SpiceBasicInfo SpiceBasicInfo; typedef struct SpiceChannel SpiceChannel; typedef struct SpiceChannelList SpiceChannelList; typedef struct SpiceInfo SpiceInfo; typedef enum SpiceQueryMouseMode { SPICE_QUERY_MOUSE_MODE_CLIENT = 0, SPICE_QUERY_MOUSE_MODE_SERVER = 1, SPICE_QUERY_MOUSE_MODE_UNKNOWN = 2, SPICE_QUERY_MOUSE_MODE__MAX = 3, } SpiceQueryMouseMode; extern const QEnumLookup SpiceQueryMouseMode_lookup; typedef struct SpiceServerInfo SpiceServerInfo; typedef struct StatusInfo StatusInfo; typedef struct StrOrNull StrOrNull; typedef struct String String; typedef struct StringList StringList; typedef struct TPMEmulatorOptions TPMEmulatorOptions; typedef struct TPMInfo TPMInfo; typedef struct TPMInfoList TPMInfoList; typedef struct TPMPassthroughOptions TPMPassthroughOptions; typedef struct TargetInfo TargetInfo; typedef struct ThrottleLimits ThrottleLimits; typedef enum TpmModel { TPM_MODEL_TPM_TIS = 0, TPM_MODEL__MAX = 1, } TpmModel; extern const QEnumLookup TpmModel_lookup; typedef struct TpmModelList TpmModelList; typedef enum TpmType { TPM_TYPE_PASSTHROUGH = 0, TPM_TYPE_EMULATOR = 1, TPM_TYPE__MAX = 2, } TpmType; extern const QEnumLookup TpmType_lookup; typedef struct TpmTypeList TpmTypeList; typedef struct TpmTypeOptions TpmTypeOptions; typedef enum TpmTypeOptionsKind { TPM_TYPE_OPTIONS_KIND_PASSTHROUGH = 0, TPM_TYPE_OPTIONS_KIND_EMULATOR = 1, TPM_TYPE_OPTIONS_KIND__MAX = 2, } TpmTypeOptionsKind; extern const QEnumLookup TpmTypeOptionsKind_lookup; typedef struct TraceEventInfo TraceEventInfo; typedef struct TraceEventInfoList TraceEventInfoList; typedef enum TraceEventState { TRACE_EVENT_STATE_UNAVAILABLE = 0, TRACE_EVENT_STATE_DISABLED = 1, TRACE_EVENT_STATE_ENABLED = 2, TRACE_EVENT_STATE__MAX = 3, } TraceEventState; extern const QEnumLookup TraceEventState_lookup; typedef struct TransactionAction TransactionAction; typedef enum TransactionActionKind { TRANSACTION_ACTION_KIND_ABORT = 0, TRANSACTION_ACTION_KIND_BLOCK_DIRTY_BITMAP_ADD = 1, TRANSACTION_ACTION_KIND_BLOCK_DIRTY_BITMAP_CLEAR = 2, TRANSACTION_ACTION_KIND_BLOCKDEV_BACKUP = 3, TRANSACTION_ACTION_KIND_BLOCKDEV_SNAPSHOT = 4, TRANSACTION_ACTION_KIND_BLOCKDEV_SNAPSHOT_INTERNAL_SYNC = 5, TRANSACTION_ACTION_KIND_BLOCKDEV_SNAPSHOT_SYNC = 6, TRANSACTION_ACTION_KIND_DRIVE_BACKUP = 7, TRANSACTION_ACTION_KIND__MAX = 8, } TransactionActionKind; extern const QEnumLookup TransactionActionKind_lookup; typedef struct TransactionActionList TransactionActionList; typedef struct TransactionProperties TransactionProperties; typedef struct UnixSocketAddress UnixSocketAddress; typedef struct UuidInfo UuidInfo; typedef struct VersionInfo VersionInfo; typedef struct VersionTriple VersionTriple; typedef struct VncBasicInfo VncBasicInfo; typedef struct VncClientInfo VncClientInfo; typedef struct VncClientInfoList VncClientInfoList; typedef struct VncInfo VncInfo; typedef struct VncInfo2 VncInfo2; typedef struct VncInfo2List VncInfo2List; typedef enum VncPrimaryAuth { VNC_PRIMARY_AUTH_NONE = 0, VNC_PRIMARY_AUTH_VNC = 1, VNC_PRIMARY_AUTH_RA2 = 2, VNC_PRIMARY_AUTH_RA2NE = 3, VNC_PRIMARY_AUTH_TIGHT = 4, VNC_PRIMARY_AUTH_ULTRA = 5, VNC_PRIMARY_AUTH_TLS = 6, VNC_PRIMARY_AUTH_VENCRYPT = 7, VNC_PRIMARY_AUTH_SASL = 8, VNC_PRIMARY_AUTH__MAX = 9, } VncPrimaryAuth; extern const QEnumLookup VncPrimaryAuth_lookup; typedef struct VncServerInfo VncServerInfo; typedef struct VncServerInfo2 VncServerInfo2; typedef struct VncServerInfo2List VncServerInfo2List; typedef enum VncVencryptSubAuth { VNC_VENCRYPT_SUB_AUTH_PLAIN = 0, VNC_VENCRYPT_SUB_AUTH_TLS_NONE = 1, VNC_VENCRYPT_SUB_AUTH_X509_NONE = 2, VNC_VENCRYPT_SUB_AUTH_TLS_VNC = 3, VNC_VENCRYPT_SUB_AUTH_X509_VNC = 4, VNC_VENCRYPT_SUB_AUTH_TLS_PLAIN = 5, VNC_VENCRYPT_SUB_AUTH_X509_PLAIN = 6, VNC_VENCRYPT_SUB_AUTH_TLS_SASL = 7, VNC_VENCRYPT_SUB_AUTH_X509_SASL = 8, VNC_VENCRYPT_SUB_AUTH__MAX = 9, } VncVencryptSubAuth; extern const QEnumLookup VncVencryptSubAuth_lookup; typedef struct VsockSocketAddress VsockSocketAddress; typedef enum WatchdogAction { WATCHDOG_ACTION_RESET = 0, WATCHDOG_ACTION_SHUTDOWN = 1, WATCHDOG_ACTION_POWEROFF = 2, WATCHDOG_ACTION_PAUSE = 3, WATCHDOG_ACTION_DEBUG = 4, WATCHDOG_ACTION_NONE = 5, WATCHDOG_ACTION_INJECT_NMI = 6, WATCHDOG_ACTION__MAX = 7, } WatchdogAction; extern const QEnumLookup WatchdogAction_lookup; typedef struct X86CPUFeatureWordInfo X86CPUFeatureWordInfo; typedef struct X86CPUFeatureWordInfoList X86CPUFeatureWordInfoList; typedef enum X86CPURegister32 { X86_CPU_REGISTER32_EAX = 0, X86_CPU_REGISTER32_EBX = 1, X86_CPU_REGISTER32_ECX = 2, X86_CPU_REGISTER32_EDX = 3, X86_CPU_REGISTER32_ESP = 4, X86_CPU_REGISTER32_EBP = 5, X86_CPU_REGISTER32_ESI = 6, X86_CPU_REGISTER32_EDI = 7, X86_CPU_REGISTER32__MAX = 8, } X86CPURegister32; extern const QEnumLookup X86CPURegister32_lookup; typedef struct XBZRLECacheStats XBZRLECacheStats; typedef struct q_obj_ACPI_DEVICE_OST_arg q_obj_ACPI_DEVICE_OST_arg; typedef struct q_obj_Abort_wrapper q_obj_Abort_wrapper; typedef struct q_obj_BALLOON_CHANGE_arg q_obj_BALLOON_CHANGE_arg; typedef struct q_obj_BLOCK_IMAGE_CORRUPTED_arg q_obj_BLOCK_IMAGE_CORRUPTED_arg; typedef struct q_obj_BLOCK_IO_ERROR_arg q_obj_BLOCK_IO_ERROR_arg; typedef struct q_obj_BLOCK_JOB_CANCELLED_arg q_obj_BLOCK_JOB_CANCELLED_arg; typedef struct q_obj_BLOCK_JOB_COMPLETED_arg q_obj_BLOCK_JOB_COMPLETED_arg; typedef struct q_obj_BLOCK_JOB_ERROR_arg q_obj_BLOCK_JOB_ERROR_arg; typedef struct q_obj_BLOCK_JOB_READY_arg q_obj_BLOCK_JOB_READY_arg; typedef struct q_obj_BLOCK_WRITE_THRESHOLD_arg q_obj_BLOCK_WRITE_THRESHOLD_arg; typedef struct q_obj_BlockDirtyBitmap_wrapper q_obj_BlockDirtyBitmap_wrapper; typedef struct q_obj_BlockDirtyBitmapAdd_wrapper q_obj_BlockDirtyBitmapAdd_wrapper; typedef struct q_obj_BlockdevBackup_wrapper q_obj_BlockdevBackup_wrapper; typedef struct q_obj_BlockdevOptions_base q_obj_BlockdevOptions_base; typedef struct q_obj_BlockdevQcow2Encryption_base q_obj_BlockdevQcow2Encryption_base; typedef struct q_obj_BlockdevQcowEncryption_base q_obj_BlockdevQcowEncryption_base; typedef struct q_obj_BlockdevSnapshot_wrapper q_obj_BlockdevSnapshot_wrapper; typedef struct q_obj_BlockdevSnapshotInternal_wrapper q_obj_BlockdevSnapshotInternal_wrapper; typedef struct q_obj_BlockdevSnapshotSync_wrapper q_obj_BlockdevSnapshotSync_wrapper; typedef struct q_obj_ChardevCommon_wrapper q_obj_ChardevCommon_wrapper; typedef struct q_obj_ChardevFile_wrapper q_obj_ChardevFile_wrapper; typedef struct q_obj_ChardevHostdev_wrapper q_obj_ChardevHostdev_wrapper; typedef struct q_obj_ChardevMux_wrapper q_obj_ChardevMux_wrapper; typedef struct q_obj_ChardevRingbuf_wrapper q_obj_ChardevRingbuf_wrapper; typedef struct q_obj_ChardevSocket_wrapper q_obj_ChardevSocket_wrapper; typedef struct q_obj_ChardevSpiceChannel_wrapper q_obj_ChardevSpiceChannel_wrapper; typedef struct q_obj_ChardevSpicePort_wrapper q_obj_ChardevSpicePort_wrapper; typedef struct q_obj_ChardevStdio_wrapper q_obj_ChardevStdio_wrapper; typedef struct q_obj_ChardevUdp_wrapper q_obj_ChardevUdp_wrapper; typedef struct q_obj_ChardevVC_wrapper q_obj_ChardevVC_wrapper; typedef struct q_obj_CpuInfo_base q_obj_CpuInfo_base; typedef struct q_obj_DEVICE_DELETED_arg q_obj_DEVICE_DELETED_arg; typedef struct q_obj_DEVICE_TRAY_MOVED_arg q_obj_DEVICE_TRAY_MOVED_arg; typedef struct q_obj_DUMP_COMPLETED_arg q_obj_DUMP_COMPLETED_arg; typedef struct q_obj_DriveBackup_wrapper q_obj_DriveBackup_wrapper; typedef struct q_obj_GUEST_PANICKED_arg q_obj_GUEST_PANICKED_arg; typedef struct q_obj_GuestPanicInformation_base q_obj_GuestPanicInformation_base; typedef struct q_obj_ImageInfoSpecificQCow2_wrapper q_obj_ImageInfoSpecificQCow2_wrapper; typedef struct q_obj_ImageInfoSpecificVmdk_wrapper q_obj_ImageInfoSpecificVmdk_wrapper; typedef struct q_obj_InetSocketAddress_wrapper q_obj_InetSocketAddress_wrapper; typedef struct q_obj_InputBtnEvent_wrapper q_obj_InputBtnEvent_wrapper; typedef struct q_obj_InputKeyEvent_wrapper q_obj_InputKeyEvent_wrapper; typedef struct q_obj_InputMoveEvent_wrapper q_obj_InputMoveEvent_wrapper; typedef struct q_obj_MEM_UNPLUG_ERROR_arg q_obj_MEM_UNPLUG_ERROR_arg; typedef struct q_obj_MIGRATION_arg q_obj_MIGRATION_arg; typedef struct q_obj_MIGRATION_PASS_arg q_obj_MIGRATION_PASS_arg; typedef struct q_obj_NIC_RX_FILTER_CHANGED_arg q_obj_NIC_RX_FILTER_CHANGED_arg; typedef struct q_obj_NetLegacyOptions_base q_obj_NetLegacyOptions_base; typedef struct q_obj_Netdev_base q_obj_Netdev_base; typedef struct q_obj_NumaOptions_base q_obj_NumaOptions_base; typedef struct q_obj_PCDIMMDeviceInfo_wrapper q_obj_PCDIMMDeviceInfo_wrapper; typedef struct q_obj_QCryptoBlockInfoLUKS_wrapper q_obj_QCryptoBlockInfoLUKS_wrapper; typedef struct q_obj_QKeyCode_wrapper q_obj_QKeyCode_wrapper; typedef struct q_obj_QUORUM_FAILURE_arg q_obj_QUORUM_FAILURE_arg; typedef struct q_obj_QUORUM_REPORT_BAD_arg q_obj_QUORUM_REPORT_BAD_arg; typedef struct q_obj_RESET_arg q_obj_RESET_arg; typedef struct q_obj_RTC_CHANGE_arg q_obj_RTC_CHANGE_arg; typedef struct q_obj_SHUTDOWN_arg q_obj_SHUTDOWN_arg; typedef struct q_obj_SPICE_CONNECTED_arg q_obj_SPICE_CONNECTED_arg; typedef struct q_obj_SPICE_DISCONNECTED_arg q_obj_SPICE_DISCONNECTED_arg; typedef struct q_obj_SPICE_INITIALIZED_arg q_obj_SPICE_INITIALIZED_arg; typedef struct q_obj_SchemaInfo_base q_obj_SchemaInfo_base; typedef struct q_obj_SocketAddress_base q_obj_SocketAddress_base; typedef struct q_obj_String_wrapper q_obj_String_wrapper; typedef struct q_obj_TPMEmulatorOptions_wrapper q_obj_TPMEmulatorOptions_wrapper; typedef struct q_obj_TPMPassthroughOptions_wrapper q_obj_TPMPassthroughOptions_wrapper; typedef struct q_obj_UnixSocketAddress_wrapper q_obj_UnixSocketAddress_wrapper; typedef struct q_obj_VNC_CONNECTED_arg q_obj_VNC_CONNECTED_arg; typedef struct q_obj_VNC_DISCONNECTED_arg q_obj_VNC_DISCONNECTED_arg; typedef struct q_obj_VNC_INITIALIZED_arg q_obj_VNC_INITIALIZED_arg; typedef struct q_obj_VSERPORT_CHANGE_arg q_obj_VSERPORT_CHANGE_arg; typedef struct q_obj_VsockSocketAddress_wrapper q_obj_VsockSocketAddress_wrapper; typedef struct q_obj_WATCHDOG_arg q_obj_WATCHDOG_arg; typedef struct q_obj_add_fd_arg q_obj_add_fd_arg; typedef struct q_obj_add_client_arg q_obj_add_client_arg; typedef struct q_obj_balloon_arg q_obj_balloon_arg; typedef struct q_obj_block_commit_arg q_obj_block_commit_arg; typedef struct q_obj_block_job_cancel_arg q_obj_block_job_cancel_arg; typedef struct q_obj_block_job_complete_arg q_obj_block_job_complete_arg; typedef struct q_obj_block_job_pause_arg q_obj_block_job_pause_arg; typedef struct q_obj_block_job_resume_arg q_obj_block_job_resume_arg; typedef struct q_obj_block_job_set_speed_arg q_obj_block_job_set_speed_arg; typedef struct q_obj_block_set_write_threshold_arg q_obj_block_set_write_threshold_arg; typedef struct q_obj_block_stream_arg q_obj_block_stream_arg; typedef struct q_obj_block_passwd_arg q_obj_block_passwd_arg; typedef struct q_obj_block_resize_arg q_obj_block_resize_arg; typedef struct q_obj_blockdev_change_medium_arg q_obj_blockdev_change_medium_arg; typedef struct q_obj_blockdev_close_tray_arg q_obj_blockdev_close_tray_arg; typedef struct q_obj_blockdev_del_arg q_obj_blockdev_del_arg; typedef struct q_obj_blockdev_mirror_arg q_obj_blockdev_mirror_arg; typedef struct q_obj_blockdev_open_tray_arg q_obj_blockdev_open_tray_arg; typedef struct q_obj_blockdev_snapshot_delete_internal_sync_arg q_obj_blockdev_snapshot_delete_internal_sync_arg; typedef struct q_obj_change_arg q_obj_change_arg; typedef struct q_obj_change_backing_file_arg q_obj_change_backing_file_arg; typedef struct q_obj_change_vnc_password_arg q_obj_change_vnc_password_arg; typedef struct q_obj_chardev_add_arg q_obj_chardev_add_arg; typedef struct q_obj_chardev_change_arg q_obj_chardev_change_arg; typedef struct q_obj_chardev_remove_arg q_obj_chardev_remove_arg; typedef struct q_obj_chardev_send_break_arg q_obj_chardev_send_break_arg; typedef struct q_obj_client_migrate_info_arg q_obj_client_migrate_info_arg; typedef struct q_obj_closefd_arg q_obj_closefd_arg; typedef struct q_obj_cpu_add_arg q_obj_cpu_add_arg; typedef struct q_obj_cpu_arg q_obj_cpu_arg; typedef struct q_obj_device_list_properties_arg q_obj_device_list_properties_arg; typedef struct q_obj_device_add_arg q_obj_device_add_arg; typedef struct q_obj_device_del_arg q_obj_device_del_arg; typedef struct q_obj_dump_guest_memory_arg q_obj_dump_guest_memory_arg; typedef struct q_obj_dump_skeys_arg q_obj_dump_skeys_arg; typedef struct q_obj_eject_arg q_obj_eject_arg; typedef struct q_obj_expire_password_arg q_obj_expire_password_arg; typedef struct q_obj_getfd_arg q_obj_getfd_arg; typedef struct q_obj_human_monitor_command_arg q_obj_human_monitor_command_arg; typedef struct q_obj_input_send_event_arg q_obj_input_send_event_arg; typedef struct q_obj_int_wrapper q_obj_int_wrapper; typedef struct q_obj_memsave_arg q_obj_memsave_arg; typedef struct q_obj_migrate_arg q_obj_migrate_arg; typedef struct q_obj_migrate_continue_arg q_obj_migrate_continue_arg; typedef struct q_obj_migrate_incoming_arg q_obj_migrate_incoming_arg; typedef struct q_obj_migrate_set_cache_size_arg q_obj_migrate_set_cache_size_arg; typedef struct q_obj_migrate_set_capabilities_arg q_obj_migrate_set_capabilities_arg; typedef struct q_obj_migrate_set_downtime_arg q_obj_migrate_set_downtime_arg; typedef struct q_obj_migrate_set_speed_arg q_obj_migrate_set_speed_arg; typedef struct q_obj_nbd_server_add_arg q_obj_nbd_server_add_arg; typedef struct q_obj_nbd_server_start_arg q_obj_nbd_server_start_arg; typedef struct q_obj_netdev_add_arg q_obj_netdev_add_arg; typedef struct q_obj_netdev_del_arg q_obj_netdev_del_arg; typedef struct q_obj_object_add_arg q_obj_object_add_arg; typedef struct q_obj_object_del_arg q_obj_object_del_arg; typedef struct q_obj_pmemsave_arg q_obj_pmemsave_arg; typedef struct q_obj_qom_get_arg q_obj_qom_get_arg; typedef struct q_obj_qom_list_arg q_obj_qom_list_arg; typedef struct q_obj_qom_list_types_arg q_obj_qom_list_types_arg; typedef struct q_obj_qom_set_arg q_obj_qom_set_arg; typedef struct q_obj_query_blockstats_arg q_obj_query_blockstats_arg; typedef struct q_obj_query_command_line_options_arg q_obj_query_command_line_options_arg; typedef struct q_obj_query_cpu_model_baseline_arg q_obj_query_cpu_model_baseline_arg; typedef struct q_obj_query_cpu_model_comparison_arg q_obj_query_cpu_model_comparison_arg; typedef struct q_obj_query_cpu_model_expansion_arg q_obj_query_cpu_model_expansion_arg; typedef struct q_obj_query_rocker_arg q_obj_query_rocker_arg; typedef struct q_obj_query_rocker_of_dpa_flows_arg q_obj_query_rocker_of_dpa_flows_arg; typedef struct q_obj_query_rocker_of_dpa_groups_arg q_obj_query_rocker_of_dpa_groups_arg; typedef struct q_obj_query_rocker_ports_arg q_obj_query_rocker_ports_arg; typedef struct q_obj_query_rx_filter_arg q_obj_query_rx_filter_arg; typedef struct q_obj_remove_fd_arg q_obj_remove_fd_arg; typedef struct q_obj_ringbuf_read_arg q_obj_ringbuf_read_arg; typedef struct q_obj_ringbuf_write_arg q_obj_ringbuf_write_arg; typedef struct q_obj_screendump_arg q_obj_screendump_arg; typedef struct q_obj_send_key_arg q_obj_send_key_arg; typedef struct q_obj_set_link_arg q_obj_set_link_arg; typedef struct q_obj_set_password_arg q_obj_set_password_arg; typedef struct q_obj_trace_event_get_state_arg q_obj_trace_event_get_state_arg; typedef struct q_obj_trace_event_set_state_arg q_obj_trace_event_set_state_arg; typedef struct q_obj_transaction_arg q_obj_transaction_arg; typedef struct q_obj_watchdog_set_action_arg q_obj_watchdog_set_action_arg; typedef struct q_obj_x_blockdev_change_arg q_obj_x_blockdev_change_arg; typedef struct q_obj_x_blockdev_insert_medium_arg q_obj_x_blockdev_insert_medium_arg; typedef struct q_obj_x_blockdev_remove_medium_arg q_obj_x_blockdev_remove_medium_arg; typedef struct q_obj_xen_load_devices_state_arg q_obj_xen_load_devices_state_arg; typedef struct q_obj_xen_save_devices_state_arg q_obj_xen_save_devices_state_arg; typedef struct q_obj_xen_set_global_dirty_log_arg q_obj_xen_set_global_dirty_log_arg; typedef struct q_obj_xen_set_replication_arg q_obj_xen_set_replication_arg; struct ACPIOSTInfo { # 2471 "./qapi-types.h" 3 4 _Bool # 2471 "./qapi-types.h" has_device; char *device; char *slot; ACPISlotType slot_type; int64_t source; int64_t status; }; void qapi_free_ACPIOSTInfo(ACPIOSTInfo *obj); struct ACPIOSTInfoList { ACPIOSTInfoList *next; ACPIOSTInfo *value; }; void qapi_free_ACPIOSTInfoList(ACPIOSTInfoList *obj); struct Abort { char qapi_dummy_for_empty_struct; }; void qapi_free_Abort(Abort *obj); struct AcpiTableOptions { # 2495 "./qapi-types.h" 3 4 _Bool # 2495 "./qapi-types.h" has_sig; char *sig; # 2497 "./qapi-types.h" 3 4 _Bool # 2497 "./qapi-types.h" has_rev; uint8_t rev; # 2499 "./qapi-types.h" 3 4 _Bool # 2499 "./qapi-types.h" has_oem_id; char *oem_id; # 2501 "./qapi-types.h" 3 4 _Bool # 2501 "./qapi-types.h" has_oem_table_id; char *oem_table_id; # 2503 "./qapi-types.h" 3 4 _Bool # 2503 "./qapi-types.h" has_oem_rev; uint32_t oem_rev; # 2505 "./qapi-types.h" 3 4 _Bool # 2505 "./qapi-types.h" has_asl_compiler_id; char *asl_compiler_id; # 2507 "./qapi-types.h" 3 4 _Bool # 2507 "./qapi-types.h" has_asl_compiler_rev; uint32_t asl_compiler_rev; # 2509 "./qapi-types.h" 3 4 _Bool # 2509 "./qapi-types.h" has_file; char *file; # 2511 "./qapi-types.h" 3 4 _Bool # 2511 "./qapi-types.h" has_data; char *data; }; void qapi_free_AcpiTableOptions(AcpiTableOptions *obj); struct AddfdInfo { int64_t fdset_id; int64_t fd; }; void qapi_free_AddfdInfo(AddfdInfo *obj); struct BalloonInfo { int64_t actual; }; void qapi_free_BalloonInfo(BalloonInfo *obj); struct BlkdebugInjectErrorOptions { BlkdebugEvent event; # 2532 "./qapi-types.h" 3 4 _Bool # 2532 "./qapi-types.h" has_state; int64_t state; # 2534 "./qapi-types.h" 3 4 _Bool # 2534 "./qapi-types.h" has_q_errno; int64_t q_errno; # 2536 "./qapi-types.h" 3 4 _Bool # 2536 "./qapi-types.h" has_sector; int64_t sector; # 2538 "./qapi-types.h" 3 4 _Bool # 2538 "./qapi-types.h" has_once; # 2539 "./qapi-types.h" 3 4 _Bool # 2539 "./qapi-types.h" once; # 2540 "./qapi-types.h" 3 4 _Bool # 2540 "./qapi-types.h" has_immediately; # 2541 "./qapi-types.h" 3 4 _Bool # 2541 "./qapi-types.h" immediately; }; void qapi_free_BlkdebugInjectErrorOptions(BlkdebugInjectErrorOptions *obj); struct BlkdebugInjectErrorOptionsList { BlkdebugInjectErrorOptionsList *next; BlkdebugInjectErrorOptions *value; }; void qapi_free_BlkdebugInjectErrorOptionsList(BlkdebugInjectErrorOptionsList *obj); struct BlkdebugSetStateOptions { BlkdebugEvent event; # 2555 "./qapi-types.h" 3 4 _Bool # 2555 "./qapi-types.h" has_state; int64_t state; int64_t new_state; }; void qapi_free_BlkdebugSetStateOptions(BlkdebugSetStateOptions *obj); struct BlkdebugSetStateOptionsList { BlkdebugSetStateOptionsList *next; BlkdebugSetStateOptions *value; }; void qapi_free_BlkdebugSetStateOptionsList(BlkdebugSetStateOptionsList *obj); struct BlockDeviceInfo { char *file; # 2571 "./qapi-types.h" 3 4 _Bool # 2571 "./qapi-types.h" has_node_name; char *node_name; # 2573 "./qapi-types.h" 3 4 _Bool # 2573 "./qapi-types.h" ro; char *drv; # 2575 "./qapi-types.h" 3 4 _Bool # 2575 "./qapi-types.h" has_backing_file; char *backing_file; int64_t backing_file_depth; # 2578 "./qapi-types.h" 3 4 _Bool # 2578 "./qapi-types.h" encrypted; # 2579 "./qapi-types.h" 3 4 _Bool # 2579 "./qapi-types.h" encryption_key_missing; BlockdevDetectZeroesOptions detect_zeroes; int64_t bps; int64_t bps_rd; int64_t bps_wr; int64_t iops; int64_t iops_rd; int64_t iops_wr; ImageInfo *image; # 2588 "./qapi-types.h" 3 4 _Bool # 2588 "./qapi-types.h" has_bps_max; int64_t bps_max; # 2590 "./qapi-types.h" 3 4 _Bool # 2590 "./qapi-types.h" has_bps_rd_max; int64_t bps_rd_max; # 2592 "./qapi-types.h" 3 4 _Bool # 2592 "./qapi-types.h" has_bps_wr_max; int64_t bps_wr_max; # 2594 "./qapi-types.h" 3 4 _Bool # 2594 "./qapi-types.h" has_iops_max; int64_t iops_max; # 2596 "./qapi-types.h" 3 4 _Bool # 2596 "./qapi-types.h" has_iops_rd_max; int64_t iops_rd_max; # 2598 "./qapi-types.h" 3 4 _Bool # 2598 "./qapi-types.h" has_iops_wr_max; int64_t iops_wr_max; # 2600 "./qapi-types.h" 3 4 _Bool # 2600 "./qapi-types.h" has_bps_max_length; int64_t bps_max_length; # 2602 "./qapi-types.h" 3 4 _Bool # 2602 "./qapi-types.h" has_bps_rd_max_length; int64_t bps_rd_max_length; # 2604 "./qapi-types.h" 3 4 _Bool # 2604 "./qapi-types.h" has_bps_wr_max_length; int64_t bps_wr_max_length; # 2606 "./qapi-types.h" 3 4 _Bool # 2606 "./qapi-types.h" has_iops_max_length; int64_t iops_max_length; # 2608 "./qapi-types.h" 3 4 _Bool # 2608 "./qapi-types.h" has_iops_rd_max_length; int64_t iops_rd_max_length; # 2610 "./qapi-types.h" 3 4 _Bool # 2610 "./qapi-types.h" has_iops_wr_max_length; int64_t iops_wr_max_length; # 2612 "./qapi-types.h" 3 4 _Bool # 2612 "./qapi-types.h" has_iops_size; int64_t iops_size; # 2614 "./qapi-types.h" 3 4 _Bool # 2614 "./qapi-types.h" has_group; char *group; BlockdevCacheInfo *cache; int64_t write_threshold; }; void qapi_free_BlockDeviceInfo(BlockDeviceInfo *obj); struct BlockDeviceInfoList { BlockDeviceInfoList *next; BlockDeviceInfo *value; }; void qapi_free_BlockDeviceInfoList(BlockDeviceInfoList *obj); struct BlockDeviceMapEntry { int64_t start; int64_t length; int64_t depth; # 2633 "./qapi-types.h" 3 4 _Bool # 2633 "./qapi-types.h" zero; # 2634 "./qapi-types.h" 3 4 _Bool # 2634 "./qapi-types.h" data; # 2635 "./qapi-types.h" 3 4 _Bool # 2635 "./qapi-types.h" has_offset; int64_t offset; }; void qapi_free_BlockDeviceMapEntry(BlockDeviceMapEntry *obj); struct BlockDeviceStats { int64_t rd_bytes; int64_t wr_bytes; int64_t rd_operations; int64_t wr_operations; int64_t flush_operations; int64_t flush_total_time_ns; int64_t wr_total_time_ns; int64_t rd_total_time_ns; int64_t wr_highest_offset; int64_t rd_merged; int64_t wr_merged; # 2653 "./qapi-types.h" 3 4 _Bool # 2653 "./qapi-types.h" has_idle_time_ns; int64_t idle_time_ns; int64_t failed_rd_operations; int64_t failed_wr_operations; int64_t failed_flush_operations; int64_t invalid_rd_operations; int64_t invalid_wr_operations; int64_t invalid_flush_operations; # 2661 "./qapi-types.h" 3 4 _Bool # 2661 "./qapi-types.h" account_invalid; # 2662 "./qapi-types.h" 3 4 _Bool # 2662 "./qapi-types.h" account_failed; BlockDeviceTimedStatsList *timed_stats; }; void qapi_free_BlockDeviceStats(BlockDeviceStats *obj); struct BlockDeviceTimedStats { int64_t interval_length; int64_t min_rd_latency_ns; int64_t max_rd_latency_ns; int64_t avg_rd_latency_ns; int64_t min_wr_latency_ns; int64_t max_wr_latency_ns; int64_t avg_wr_latency_ns; int64_t min_flush_latency_ns; int64_t max_flush_latency_ns; int64_t avg_flush_latency_ns; double avg_rd_queue_depth; double avg_wr_queue_depth; }; void qapi_free_BlockDeviceTimedStats(BlockDeviceTimedStats *obj); struct BlockDeviceTimedStatsList { BlockDeviceTimedStatsList *next; BlockDeviceTimedStats *value; }; void qapi_free_BlockDeviceTimedStatsList(BlockDeviceTimedStatsList *obj); struct BlockDirtyBitmap { char *node; char *name; }; void qapi_free_BlockDirtyBitmap(BlockDirtyBitmap *obj); struct BlockDirtyBitmapAdd { char *node; char *name; # 2702 "./qapi-types.h" 3 4 _Bool # 2702 "./qapi-types.h" has_granularity; uint32_t granularity; # 2704 "./qapi-types.h" 3 4 _Bool # 2704 "./qapi-types.h" has_persistent; # 2705 "./qapi-types.h" 3 4 _Bool # 2705 "./qapi-types.h" persistent; # 2706 "./qapi-types.h" 3 4 _Bool # 2706 "./qapi-types.h" has_autoload; # 2707 "./qapi-types.h" 3 4 _Bool # 2707 "./qapi-types.h" autoload; }; void qapi_free_BlockDirtyBitmapAdd(BlockDirtyBitmapAdd *obj); struct BlockDirtyBitmapSha256 { char *sha256; }; void qapi_free_BlockDirtyBitmapSha256(BlockDirtyBitmapSha256 *obj); struct BlockDirtyInfo { # 2719 "./qapi-types.h" 3 4 _Bool # 2719 "./qapi-types.h" has_name; char *name; int64_t count; uint32_t granularity; DirtyBitmapStatus status; }; void qapi_free_BlockDirtyInfo(BlockDirtyInfo *obj); struct BlockDirtyInfoList { BlockDirtyInfoList *next; BlockDirtyInfo *value; }; void qapi_free_BlockDirtyInfoList(BlockDirtyInfoList *obj); struct BlockIOThrottle { # 2736 "./qapi-types.h" 3 4 _Bool # 2736 "./qapi-types.h" has_device; char *device; # 2738 "./qapi-types.h" 3 4 _Bool # 2738 "./qapi-types.h" has_id; char *id; int64_t bps; int64_t bps_rd; int64_t bps_wr; int64_t iops; int64_t iops_rd; int64_t iops_wr; # 2746 "./qapi-types.h" 3 4 _Bool # 2746 "./qapi-types.h" has_bps_max; int64_t bps_max; # 2748 "./qapi-types.h" 3 4 _Bool # 2748 "./qapi-types.h" has_bps_rd_max; int64_t bps_rd_max; # 2750 "./qapi-types.h" 3 4 _Bool # 2750 "./qapi-types.h" has_bps_wr_max; int64_t bps_wr_max; # 2752 "./qapi-types.h" 3 4 _Bool # 2752 "./qapi-types.h" has_iops_max; int64_t iops_max; # 2754 "./qapi-types.h" 3 4 _Bool # 2754 "./qapi-types.h" has_iops_rd_max; int64_t iops_rd_max; # 2756 "./qapi-types.h" 3 4 _Bool # 2756 "./qapi-types.h" has_iops_wr_max; int64_t iops_wr_max; # 2758 "./qapi-types.h" 3 4 _Bool # 2758 "./qapi-types.h" has_bps_max_length; int64_t bps_max_length; # 2760 "./qapi-types.h" 3 4 _Bool # 2760 "./qapi-types.h" has_bps_rd_max_length; int64_t bps_rd_max_length; # 2762 "./qapi-types.h" 3 4 _Bool # 2762 "./qapi-types.h" has_bps_wr_max_length; int64_t bps_wr_max_length; # 2764 "./qapi-types.h" 3 4 _Bool # 2764 "./qapi-types.h" has_iops_max_length; int64_t iops_max_length; # 2766 "./qapi-types.h" 3 4 _Bool # 2766 "./qapi-types.h" has_iops_rd_max_length; int64_t iops_rd_max_length; # 2768 "./qapi-types.h" 3 4 _Bool # 2768 "./qapi-types.h" has_iops_wr_max_length; int64_t iops_wr_max_length; # 2770 "./qapi-types.h" 3 4 _Bool # 2770 "./qapi-types.h" has_iops_size; int64_t iops_size; # 2772 "./qapi-types.h" 3 4 _Bool # 2772 "./qapi-types.h" has_group; char *group; }; void qapi_free_BlockIOThrottle(BlockIOThrottle *obj); struct BlockInfo { char *device; # 2780 "./qapi-types.h" 3 4 _Bool # 2780 "./qapi-types.h" has_qdev; char *qdev; char *type; # 2783 "./qapi-types.h" 3 4 _Bool # 2783 "./qapi-types.h" removable; # 2784 "./qapi-types.h" 3 4 _Bool # 2784 "./qapi-types.h" locked; # 2785 "./qapi-types.h" 3 4 _Bool # 2785 "./qapi-types.h" has_inserted; BlockDeviceInfo *inserted; # 2787 "./qapi-types.h" 3 4 _Bool # 2787 "./qapi-types.h" has_tray_open; # 2788 "./qapi-types.h" 3 4 _Bool # 2788 "./qapi-types.h" tray_open; # 2789 "./qapi-types.h" 3 4 _Bool # 2789 "./qapi-types.h" has_io_status; BlockDeviceIoStatus io_status; # 2791 "./qapi-types.h" 3 4 _Bool # 2791 "./qapi-types.h" has_dirty_bitmaps; BlockDirtyInfoList *dirty_bitmaps; }; void qapi_free_BlockInfo(BlockInfo *obj); struct BlockInfoList { BlockInfoList *next; BlockInfo *value; }; void qapi_free_BlockInfoList(BlockInfoList *obj); struct BlockJobInfo { char *type; char *device; int64_t len; int64_t offset; # 2809 "./qapi-types.h" 3 4 _Bool # 2809 "./qapi-types.h" busy; # 2810 "./qapi-types.h" 3 4 _Bool # 2810 "./qapi-types.h" paused; int64_t speed; BlockDeviceIoStatus io_status; # 2813 "./qapi-types.h" 3 4 _Bool # 2813 "./qapi-types.h" ready; }; void qapi_free_BlockJobInfo(BlockJobInfo *obj); struct BlockJobInfoList { BlockJobInfoList *next; BlockJobInfo *value; }; void qapi_free_BlockJobInfoList(BlockJobInfoList *obj); struct BlockMeasureInfo { int64_t required; int64_t fully_allocated; }; void qapi_free_BlockMeasureInfo(BlockMeasureInfo *obj); struct BlockStats { # 2833 "./qapi-types.h" 3 4 _Bool # 2833 "./qapi-types.h" has_device; char *device; # 2835 "./qapi-types.h" 3 4 _Bool # 2835 "./qapi-types.h" has_node_name; char *node_name; BlockDeviceStats *stats; # 2838 "./qapi-types.h" 3 4 _Bool # 2838 "./qapi-types.h" has_parent; BlockStats *parent; # 2840 "./qapi-types.h" 3 4 _Bool # 2840 "./qapi-types.h" has_backing; BlockStats *backing; }; void qapi_free_BlockStats(BlockStats *obj); struct BlockStatsList { BlockStatsList *next; BlockStats *value; }; void qapi_free_BlockStatsList(BlockStatsList *obj); struct BlockdevBackup { # 2854 "./qapi-types.h" 3 4 _Bool # 2854 "./qapi-types.h" has_job_id; char *job_id; char *device; char *target; MirrorSyncMode sync; # 2859 "./qapi-types.h" 3 4 _Bool # 2859 "./qapi-types.h" has_speed; int64_t speed; # 2861 "./qapi-types.h" 3 4 _Bool # 2861 "./qapi-types.h" has_compress; # 2862 "./qapi-types.h" 3 4 _Bool # 2862 "./qapi-types.h" compress; # 2863 "./qapi-types.h" 3 4 _Bool # 2863 "./qapi-types.h" has_on_source_error; BlockdevOnError on_source_error; # 2865 "./qapi-types.h" 3 4 _Bool # 2865 "./qapi-types.h" has_on_target_error; BlockdevOnError on_target_error; }; void qapi_free_BlockdevBackup(BlockdevBackup *obj); struct BlockdevCacheInfo { # 2872 "./qapi-types.h" 3 4 _Bool # 2872 "./qapi-types.h" writeback; # 2873 "./qapi-types.h" 3 4 _Bool # 2873 "./qapi-types.h" direct; # 2874 "./qapi-types.h" 3 4 _Bool # 2874 "./qapi-types.h" no_flush; }; void qapi_free_BlockdevCacheInfo(BlockdevCacheInfo *obj); struct BlockdevCacheOptions { # 2880 "./qapi-types.h" 3 4 _Bool # 2880 "./qapi-types.h" has_direct; # 2881 "./qapi-types.h" 3 4 _Bool # 2881 "./qapi-types.h" direct; # 2882 "./qapi-types.h" 3 4 _Bool # 2882 "./qapi-types.h" has_no_flush; # 2883 "./qapi-types.h" 3 4 _Bool # 2883 "./qapi-types.h" no_flush; }; void qapi_free_BlockdevCacheOptions(BlockdevCacheOptions *obj); struct BlockdevOptionsBlkdebug { BlockdevRef *image; # 2890 "./qapi-types.h" 3 4 _Bool # 2890 "./qapi-types.h" has_config; char *config; # 2892 "./qapi-types.h" 3 4 _Bool # 2892 "./qapi-types.h" has_align; int64_t align; # 2894 "./qapi-types.h" 3 4 _Bool # 2894 "./qapi-types.h" has_max_transfer; int32_t max_transfer; # 2896 "./qapi-types.h" 3 4 _Bool # 2896 "./qapi-types.h" has_opt_write_zero; int32_t opt_write_zero; # 2898 "./qapi-types.h" 3 4 _Bool # 2898 "./qapi-types.h" has_max_write_zero; int32_t max_write_zero; # 2900 "./qapi-types.h" 3 4 _Bool # 2900 "./qapi-types.h" has_opt_discard; int32_t opt_discard; # 2902 "./qapi-types.h" 3 4 _Bool # 2902 "./qapi-types.h" has_max_discard; int32_t max_discard; # 2904 "./qapi-types.h" 3 4 _Bool # 2904 "./qapi-types.h" has_inject_error; BlkdebugInjectErrorOptionsList *inject_error; # 2906 "./qapi-types.h" 3 4 _Bool # 2906 "./qapi-types.h" has_set_state; BlkdebugSetStateOptionsList *set_state; }; struct BlockdevOptionsBlkverify { BlockdevRef *test; BlockdevRef *raw; }; struct BlockdevOptionsGenericFormat { BlockdevRef *file; }; struct BlockdevOptionsFile { char *filename; # 2921 "./qapi-types.h" 3 4 _Bool # 2921 "./qapi-types.h" has_pr_manager; char *pr_manager; # 2923 "./qapi-types.h" 3 4 _Bool # 2923 "./qapi-types.h" has_locking; OnOffAuto locking; # 2925 "./qapi-types.h" 3 4 _Bool # 2925 "./qapi-types.h" has_aio; BlockdevAioOptions aio; }; struct BlockdevOptionsCurlFtp { /* Members inherited from BlockdevOptionsCurlBase: */ char *url; # 2932 "./qapi-types.h" 3 4 _Bool # 2932 "./qapi-types.h" has_readahead; int64_t readahead; # 2934 "./qapi-types.h" 3 4 _Bool # 2934 "./qapi-types.h" has_timeout; int64_t timeout; # 2936 "./qapi-types.h" 3 4 _Bool # 2936 "./qapi-types.h" has_username; char *username; # 2938 "./qapi-types.h" 3 4 _Bool # 2938 "./qapi-types.h" has_password_secret; char *password_secret; # 2940 "./qapi-types.h" 3 4 _Bool # 2940 "./qapi-types.h" has_proxy_username; char *proxy_username; # 2942 "./qapi-types.h" 3 4 _Bool # 2942 "./qapi-types.h" has_proxy_password_secret; char *proxy_password_secret; /* Own members: */ }; struct BlockdevOptionsCurlFtps { /* Members inherited from BlockdevOptionsCurlBase: */ char *url; # 2950 "./qapi-types.h" 3 4 _Bool # 2950 "./qapi-types.h" has_readahead; int64_t readahead; # 2952 "./qapi-types.h" 3 4 _Bool # 2952 "./qapi-types.h" has_timeout; int64_t timeout; # 2954 "./qapi-types.h" 3 4 _Bool # 2954 "./qapi-types.h" has_username; char *username; # 2956 "./qapi-types.h" 3 4 _Bool # 2956 "./qapi-types.h" has_password_secret; char *password_secret; # 2958 "./qapi-types.h" 3 4 _Bool # 2958 "./qapi-types.h" has_proxy_username; char *proxy_username; # 2960 "./qapi-types.h" 3 4 _Bool # 2960 "./qapi-types.h" has_proxy_password_secret; char *proxy_password_secret; /* Own members: */ # 2963 "./qapi-types.h" 3 4 _Bool # 2963 "./qapi-types.h" has_sslverify; # 2964 "./qapi-types.h" 3 4 _Bool # 2964 "./qapi-types.h" sslverify; }; struct BlockdevOptionsGluster { char *volume; char *path; SocketAddressList *server; # 2971 "./qapi-types.h" 3 4 _Bool # 2971 "./qapi-types.h" has_debug; int64_t debug; # 2973 "./qapi-types.h" 3 4 _Bool # 2973 "./qapi-types.h" has_logfile; char *logfile; }; struct BlockdevOptionsCurlHttp { /* Members inherited from BlockdevOptionsCurlBase: */ char *url; # 2980 "./qapi-types.h" 3 4 _Bool # 2980 "./qapi-types.h" has_readahead; int64_t readahead; # 2982 "./qapi-types.h" 3 4 _Bool # 2982 "./qapi-types.h" has_timeout; int64_t timeout; # 2984 "./qapi-types.h" 3 4 _Bool # 2984 "./qapi-types.h" has_username; char *username; # 2986 "./qapi-types.h" 3 4 _Bool # 2986 "./qapi-types.h" has_password_secret; char *password_secret; # 2988 "./qapi-types.h" 3 4 _Bool # 2988 "./qapi-types.h" has_proxy_username; char *proxy_username; # 2990 "./qapi-types.h" 3 4 _Bool # 2990 "./qapi-types.h" has_proxy_password_secret; char *proxy_password_secret; /* Own members: */ # 2993 "./qapi-types.h" 3 4 _Bool # 2993 "./qapi-types.h" has_cookie; char *cookie; # 2995 "./qapi-types.h" 3 4 _Bool # 2995 "./qapi-types.h" has_cookie_secret; char *cookie_secret; }; struct BlockdevOptionsCurlHttps { /* Members inherited from BlockdevOptionsCurlBase: */ char *url; # 3002 "./qapi-types.h" 3 4 _Bool # 3002 "./qapi-types.h" has_readahead; int64_t readahead; # 3004 "./qapi-types.h" 3 4 _Bool # 3004 "./qapi-types.h" has_timeout; int64_t timeout; # 3006 "./qapi-types.h" 3 4 _Bool # 3006 "./qapi-types.h" has_username; char *username; # 3008 "./qapi-types.h" 3 4 _Bool # 3008 "./qapi-types.h" has_password_secret; char *password_secret; # 3010 "./qapi-types.h" 3 4 _Bool # 3010 "./qapi-types.h" has_proxy_username; char *proxy_username; # 3012 "./qapi-types.h" 3 4 _Bool # 3012 "./qapi-types.h" has_proxy_password_secret; char *proxy_password_secret; /* Own members: */ # 3015 "./qapi-types.h" 3 4 _Bool # 3015 "./qapi-types.h" has_cookie; char *cookie; # 3017 "./qapi-types.h" 3 4 _Bool # 3017 "./qapi-types.h" has_sslverify; # 3018 "./qapi-types.h" 3 4 _Bool # 3018 "./qapi-types.h" sslverify; # 3019 "./qapi-types.h" 3 4 _Bool # 3019 "./qapi-types.h" has_cookie_secret; char *cookie_secret; }; struct BlockdevOptionsIscsi { IscsiTransport transport; char *portal; char *target; # 3027 "./qapi-types.h" 3 4 _Bool # 3027 "./qapi-types.h" has_lun; int64_t lun; # 3029 "./qapi-types.h" 3 4 _Bool # 3029 "./qapi-types.h" has_user; char *user; # 3031 "./qapi-types.h" 3 4 _Bool # 3031 "./qapi-types.h" has_password_secret; char *password_secret; # 3033 "./qapi-types.h" 3 4 _Bool # 3033 "./qapi-types.h" has_initiator_name; char *initiator_name; # 3035 "./qapi-types.h" 3 4 _Bool # 3035 "./qapi-types.h" has_header_digest; IscsiHeaderDigest header_digest; # 3037 "./qapi-types.h" 3 4 _Bool # 3037 "./qapi-types.h" has_timeout; int64_t timeout; }; struct BlockdevOptionsLUKS { /* Members inherited from BlockdevOptionsGenericFormat: */ BlockdevRef *file; /* Own members: */ # 3045 "./qapi-types.h" 3 4 _Bool # 3045 "./qapi-types.h" has_key_secret; char *key_secret; }; struct BlockdevOptionsNbd { SocketAddress *server; # 3051 "./qapi-types.h" 3 4 _Bool # 3051 "./qapi-types.h" has_export; char *export; # 3053 "./qapi-types.h" 3 4 _Bool # 3053 "./qapi-types.h" has_tls_creds; char *tls_creds; }; struct BlockdevOptionsNfs { NFSServer *server; char *path; # 3060 "./qapi-types.h" 3 4 _Bool # 3060 "./qapi-types.h" has_user; int64_t user; # 3062 "./qapi-types.h" 3 4 _Bool # 3062 "./qapi-types.h" has_group; int64_t group; # 3064 "./qapi-types.h" 3 4 _Bool # 3064 "./qapi-types.h" has_tcp_syn_count; int64_t tcp_syn_count; # 3066 "./qapi-types.h" 3 4 _Bool # 3066 "./qapi-types.h" has_readahead_size; int64_t readahead_size; # 3068 "./qapi-types.h" 3 4 _Bool # 3068 "./qapi-types.h" has_page_cache_size; int64_t page_cache_size; # 3070 "./qapi-types.h" 3 4 _Bool # 3070 "./qapi-types.h" has_debug; int64_t debug; }; struct BlockdevOptionsNull { # 3075 "./qapi-types.h" 3 4 _Bool # 3075 "./qapi-types.h" has_size; int64_t size; # 3077 "./qapi-types.h" 3 4 _Bool # 3077 "./qapi-types.h" has_latency_ns; uint64_t latency_ns; }; struct BlockdevOptionsQcow2 { /* Members inherited from BlockdevOptionsGenericCOWFormat: */ BlockdevRef *file; # 3084 "./qapi-types.h" 3 4 _Bool # 3084 "./qapi-types.h" has_backing; BlockdevRefOrNull *backing; /* Own members: */ # 3087 "./qapi-types.h" 3 4 _Bool # 3087 "./qapi-types.h" has_lazy_refcounts; # 3088 "./qapi-types.h" 3 4 _Bool # 3088 "./qapi-types.h" lazy_refcounts; # 3089 "./qapi-types.h" 3 4 _Bool # 3089 "./qapi-types.h" has_pass_discard_request; # 3090 "./qapi-types.h" 3 4 _Bool # 3090 "./qapi-types.h" pass_discard_request; # 3091 "./qapi-types.h" 3 4 _Bool # 3091 "./qapi-types.h" has_pass_discard_snapshot; # 3092 "./qapi-types.h" 3 4 _Bool # 3092 "./qapi-types.h" pass_discard_snapshot; # 3093 "./qapi-types.h" 3 4 _Bool # 3093 "./qapi-types.h" has_pass_discard_other; # 3094 "./qapi-types.h" 3 4 _Bool # 3094 "./qapi-types.h" pass_discard_other; # 3095 "./qapi-types.h" 3 4 _Bool # 3095 "./qapi-types.h" has_overlap_check; Qcow2OverlapChecks *overlap_check; # 3097 "./qapi-types.h" 3 4 _Bool # 3097 "./qapi-types.h" has_cache_size; int64_t cache_size; # 3099 "./qapi-types.h" 3 4 _Bool # 3099 "./qapi-types.h" has_l2_cache_size; int64_t l2_cache_size; # 3101 "./qapi-types.h" 3 4 _Bool # 3101 "./qapi-types.h" has_refcount_cache_size; int64_t refcount_cache_size; # 3103 "./qapi-types.h" 3 4 _Bool # 3103 "./qapi-types.h" has_cache_clean_interval; int64_t cache_clean_interval; # 3105 "./qapi-types.h" 3 4 _Bool # 3105 "./qapi-types.h" has_encrypt; BlockdevQcow2Encryption *encrypt; }; struct BlockdevOptionsQcow { /* Members inherited from BlockdevOptionsGenericCOWFormat: */ BlockdevRef *file; # 3112 "./qapi-types.h" 3 4 _Bool # 3112 "./qapi-types.h" has_backing; BlockdevRefOrNull *backing; /* Own members: */ # 3115 "./qapi-types.h" 3 4 _Bool # 3115 "./qapi-types.h" has_encrypt; BlockdevQcowEncryption *encrypt; }; struct BlockdevOptionsGenericCOWFormat { /* Members inherited from BlockdevOptionsGenericFormat: */ BlockdevRef *file; /* Own members: */ # 3123 "./qapi-types.h" 3 4 _Bool # 3123 "./qapi-types.h" has_backing; BlockdevRefOrNull *backing; }; struct BlockdevOptionsQuorum { # 3128 "./qapi-types.h" 3 4 _Bool # 3128 "./qapi-types.h" has_blkverify; # 3129 "./qapi-types.h" 3 4 _Bool # 3129 "./qapi-types.h" blkverify; BlockdevRefList *children; int64_t vote_threshold; # 3132 "./qapi-types.h" 3 4 _Bool # 3132 "./qapi-types.h" has_rewrite_corrupted; # 3133 "./qapi-types.h" 3 4 _Bool # 3133 "./qapi-types.h" rewrite_corrupted; # 3134 "./qapi-types.h" 3 4 _Bool # 3134 "./qapi-types.h" has_read_pattern; QuorumReadPattern read_pattern; }; struct BlockdevOptionsRaw { /* Members inherited from BlockdevOptionsGenericFormat: */ BlockdevRef *file; /* Own members: */ # 3142 "./qapi-types.h" 3 4 _Bool # 3142 "./qapi-types.h" has_offset; int64_t offset; # 3144 "./qapi-types.h" 3 4 _Bool # 3144 "./qapi-types.h" has_size; int64_t size; }; struct BlockdevOptionsRbd { char *pool; char *image; # 3151 "./qapi-types.h" 3 4 _Bool # 3151 "./qapi-types.h" has_conf; char *conf; # 3153 "./qapi-types.h" 3 4 _Bool # 3153 "./qapi-types.h" has_snapshot; char *snapshot; # 3155 "./qapi-types.h" 3 4 _Bool # 3155 "./qapi-types.h" has_user; char *user; # 3157 "./qapi-types.h" 3 4 _Bool # 3157 "./qapi-types.h" has_server; InetSocketAddressBaseList *server; }; struct BlockdevOptionsReplication { /* Members inherited from BlockdevOptionsGenericFormat: */ BlockdevRef *file; /* Own members: */ ReplicationMode mode; # 3166 "./qapi-types.h" 3 4 _Bool # 3166 "./qapi-types.h" has_top_id; char *top_id; }; struct BlockdevOptionsSheepdog { SocketAddress *server; char *vdi; # 3173 "./qapi-types.h" 3 4 _Bool # 3173 "./qapi-types.h" has_snap_id; uint32_t snap_id; # 3175 "./qapi-types.h" 3 4 _Bool # 3175 "./qapi-types.h" has_tag; char *tag; }; struct BlockdevOptionsSsh { InetSocketAddress *server; char *path; # 3182 "./qapi-types.h" 3 4 _Bool # 3182 "./qapi-types.h" has_user; char *user; }; struct BlockdevOptionsThrottle { char *throttle_group; BlockdevRef *file; }; struct BlockdevOptionsVVFAT { char *dir; # 3193 "./qapi-types.h" 3 4 _Bool # 3193 "./qapi-types.h" has_fat_type; int64_t fat_type; # 3195 "./qapi-types.h" 3 4 _Bool # 3195 "./qapi-types.h" has_floppy; # 3196 "./qapi-types.h" 3 4 _Bool # 3196 "./qapi-types.h" floppy; # 3197 "./qapi-types.h" 3 4 _Bool # 3197 "./qapi-types.h" has_label; char *label; # 3199 "./qapi-types.h" 3 4 _Bool # 3199 "./qapi-types.h" has_rw; # 3200 "./qapi-types.h" 3 4 _Bool # 3200 "./qapi-types.h" rw; }; struct BlockdevOptionsVxHS { char *vdisk_id; InetSocketAddressBase *server; # 3206 "./qapi-types.h" 3 4 _Bool # 3206 "./qapi-types.h" has_tls_creds; char *tls_creds; }; struct BlockdevOptions { BlockdevDriver driver; # 3212 "./qapi-types.h" 3 4 _Bool # 3212 "./qapi-types.h" has_node_name; char *node_name; # 3214 "./qapi-types.h" 3 4 _Bool # 3214 "./qapi-types.h" has_discard; BlockdevDiscardOptions discard; # 3216 "./qapi-types.h" 3 4 _Bool # 3216 "./qapi-types.h" has_cache; BlockdevCacheOptions *cache; # 3218 "./qapi-types.h" 3 4 _Bool # 3218 "./qapi-types.h" has_read_only; # 3219 "./qapi-types.h" 3 4 _Bool # 3219 "./qapi-types.h" read_only; # 3220 "./qapi-types.h" 3 4 _Bool # 3220 "./qapi-types.h" has_force_share; # 3221 "./qapi-types.h" 3 4 _Bool # 3221 "./qapi-types.h" force_share; # 3222 "./qapi-types.h" 3 4 _Bool # 3222 "./qapi-types.h" has_detect_zeroes; BlockdevDetectZeroesOptions detect_zeroes; union { /* union tag is @driver */ BlockdevOptionsBlkdebug blkdebug; BlockdevOptionsBlkverify blkverify; BlockdevOptionsGenericFormat bochs; BlockdevOptionsGenericFormat cloop; BlockdevOptionsGenericFormat dmg; BlockdevOptionsFile file; BlockdevOptionsCurlFtp ftp; BlockdevOptionsCurlFtps ftps; BlockdevOptionsGluster gluster; BlockdevOptionsFile host_cdrom; BlockdevOptionsFile host_device; BlockdevOptionsCurlHttp http; BlockdevOptionsCurlHttps https; BlockdevOptionsIscsi iscsi; BlockdevOptionsLUKS luks; BlockdevOptionsNbd nbd; BlockdevOptionsNfs nfs; BlockdevOptionsNull null_aio; BlockdevOptionsNull null_co; BlockdevOptionsGenericFormat parallels; BlockdevOptionsQcow2 qcow2; BlockdevOptionsQcow qcow; BlockdevOptionsGenericCOWFormat qed; BlockdevOptionsQuorum quorum; BlockdevOptionsRaw raw; BlockdevOptionsRbd rbd; BlockdevOptionsReplication replication; BlockdevOptionsSheepdog sheepdog; BlockdevOptionsSsh ssh; BlockdevOptionsThrottle throttle; BlockdevOptionsGenericFormat vdi; BlockdevOptionsGenericFormat vhdx; BlockdevOptionsGenericCOWFormat vmdk; BlockdevOptionsGenericFormat vpc; BlockdevOptionsVVFAT vvfat; BlockdevOptionsVxHS vxhs; } u; }; void qapi_free_BlockdevOptions(BlockdevOptions *obj); void qapi_free_BlockdevOptionsBlkdebug(BlockdevOptionsBlkdebug *obj); void qapi_free_BlockdevOptionsBlkverify(BlockdevOptionsBlkverify *obj); struct BlockdevOptionsCurlBase { char *url; # 3272 "./qapi-types.h" 3 4 _Bool # 3272 "./qapi-types.h" has_readahead; int64_t readahead; # 3274 "./qapi-types.h" 3 4 _Bool # 3274 "./qapi-types.h" has_timeout; int64_t timeout; # 3276 "./qapi-types.h" 3 4 _Bool # 3276 "./qapi-types.h" has_username; char *username; # 3278 "./qapi-types.h" 3 4 _Bool # 3278 "./qapi-types.h" has_password_secret; char *password_secret; # 3280 "./qapi-types.h" 3 4 _Bool # 3280 "./qapi-types.h" has_proxy_username; char *proxy_username; # 3282 "./qapi-types.h" 3 4 _Bool # 3282 "./qapi-types.h" has_proxy_password_secret; char *proxy_password_secret; }; void qapi_free_BlockdevOptionsCurlBase(BlockdevOptionsCurlBase *obj); static inline BlockdevOptionsCurlBase *qapi_BlockdevOptionsCurlFtp_base(const BlockdevOptionsCurlFtp *obj) { return (BlockdevOptionsCurlBase *)obj; } void qapi_free_BlockdevOptionsCurlFtp(BlockdevOptionsCurlFtp *obj); static inline BlockdevOptionsCurlBase *qapi_BlockdevOptionsCurlFtps_base(const BlockdevOptionsCurlFtps *obj) { return (BlockdevOptionsCurlBase *)obj; } void qapi_free_BlockdevOptionsCurlFtps(BlockdevOptionsCurlFtps *obj); static inline BlockdevOptionsCurlBase *qapi_BlockdevOptionsCurlHttp_base(const BlockdevOptionsCurlHttp *obj) { return (BlockdevOptionsCurlBase *)obj; } void qapi_free_BlockdevOptionsCurlHttp(BlockdevOptionsCurlHttp *obj); static inline BlockdevOptionsCurlBase *qapi_BlockdevOptionsCurlHttps_base(const BlockdevOptionsCurlHttps *obj) { return (BlockdevOptionsCurlBase *)obj; } void qapi_free_BlockdevOptionsCurlHttps(BlockdevOptionsCurlHttps *obj); void qapi_free_BlockdevOptionsFile(BlockdevOptionsFile *obj); static inline BlockdevOptionsGenericFormat *qapi_BlockdevOptionsGenericCOWFormat_base(const BlockdevOptionsGenericCOWFormat *obj) { return (BlockdevOptionsGenericFormat *)obj; } void qapi_free_BlockdevOptionsGenericCOWFormat(BlockdevOptionsGenericCOWFormat *obj); void qapi_free_BlockdevOptionsGenericFormat(BlockdevOptionsGenericFormat *obj); void qapi_free_BlockdevOptionsGluster(BlockdevOptionsGluster *obj); void qapi_free_BlockdevOptionsIscsi(BlockdevOptionsIscsi *obj); static inline BlockdevOptionsGenericFormat *qapi_BlockdevOptionsLUKS_base(const BlockdevOptionsLUKS *obj) { return (BlockdevOptionsGenericFormat *)obj; } void qapi_free_BlockdevOptionsLUKS(BlockdevOptionsLUKS *obj); void qapi_free_BlockdevOptionsNbd(BlockdevOptionsNbd *obj); void qapi_free_BlockdevOptionsNfs(BlockdevOptionsNfs *obj); void qapi_free_BlockdevOptionsNull(BlockdevOptionsNull *obj); static inline BlockdevOptionsGenericCOWFormat *qapi_BlockdevOptionsQcow_base(const BlockdevOptionsQcow *obj) { return (BlockdevOptionsGenericCOWFormat *)obj; } void qapi_free_BlockdevOptionsQcow(BlockdevOptionsQcow *obj); static inline BlockdevOptionsGenericCOWFormat *qapi_BlockdevOptionsQcow2_base(const BlockdevOptionsQcow2 *obj) { return (BlockdevOptionsGenericCOWFormat *)obj; } void qapi_free_BlockdevOptionsQcow2(BlockdevOptionsQcow2 *obj); void qapi_free_BlockdevOptionsQuorum(BlockdevOptionsQuorum *obj); static inline BlockdevOptionsGenericFormat *qapi_BlockdevOptionsRaw_base(const BlockdevOptionsRaw *obj) { return (BlockdevOptionsGenericFormat *)obj; } void qapi_free_BlockdevOptionsRaw(BlockdevOptionsRaw *obj); void qapi_free_BlockdevOptionsRbd(BlockdevOptionsRbd *obj); static inline BlockdevOptionsGenericFormat *qapi_BlockdevOptionsReplication_base(const BlockdevOptionsReplication *obj) { return (BlockdevOptionsGenericFormat *)obj; } void qapi_free_BlockdevOptionsReplication(BlockdevOptionsReplication *obj); void qapi_free_BlockdevOptionsSheepdog(BlockdevOptionsSheepdog *obj); void qapi_free_BlockdevOptionsSsh(BlockdevOptionsSsh *obj); void qapi_free_BlockdevOptionsThrottle(BlockdevOptionsThrottle *obj); void qapi_free_BlockdevOptionsVVFAT(BlockdevOptionsVVFAT *obj); void qapi_free_BlockdevOptionsVxHS(BlockdevOptionsVxHS *obj); struct QCryptoBlockOptionsQCow { # 3387 "./qapi-types.h" 3 4 _Bool # 3387 "./qapi-types.h" has_key_secret; char *key_secret; }; struct QCryptoBlockOptionsLUKS { # 3392 "./qapi-types.h" 3 4 _Bool # 3392 "./qapi-types.h" has_key_secret; char *key_secret; }; struct BlockdevQcow2Encryption { BlockdevQcow2EncryptionFormat format; union { /* union tag is @format */ QCryptoBlockOptionsQCow aes; QCryptoBlockOptionsLUKS luks; } u; }; void qapi_free_BlockdevQcow2Encryption(BlockdevQcow2Encryption *obj); struct BlockdevQcowEncryption { BlockdevQcowEncryptionFormat format; union { /* union tag is @format */ QCryptoBlockOptionsQCow aes; } u; }; void qapi_free_BlockdevQcowEncryption(BlockdevQcowEncryption *obj); struct BlockdevRef { QType type; union { /* union tag is @type */ BlockdevOptions definition; char *reference; } u; }; void qapi_free_BlockdevRef(BlockdevRef *obj); struct BlockdevRefList { BlockdevRefList *next; BlockdevRef *value; }; void qapi_free_BlockdevRefList(BlockdevRefList *obj); struct BlockdevRefOrNull { QType type; union { /* union tag is @type */ BlockdevOptions definition; char *reference; QNull *null; } u; }; void qapi_free_BlockdevRefOrNull(BlockdevRefOrNull *obj); struct BlockdevSnapshot { char *node; char *overlay; }; void qapi_free_BlockdevSnapshot(BlockdevSnapshot *obj); struct BlockdevSnapshotInternal { char *device; char *name; }; void qapi_free_BlockdevSnapshotInternal(BlockdevSnapshotInternal *obj); struct BlockdevSnapshotSync { # 3458 "./qapi-types.h" 3 4 _Bool # 3458 "./qapi-types.h" has_device; char *device; # 3460 "./qapi-types.h" 3 4 _Bool # 3460 "./qapi-types.h" has_node_name; char *node_name; char *snapshot_file; # 3463 "./qapi-types.h" 3 4 _Bool # 3463 "./qapi-types.h" has_snapshot_node_name; char *snapshot_node_name; # 3465 "./qapi-types.h" 3 4 _Bool # 3465 "./qapi-types.h" has_format; char *format; # 3467 "./qapi-types.h" 3 4 _Bool # 3467 "./qapi-types.h" has_mode; NewImageMode mode; }; void qapi_free_BlockdevSnapshotSync(BlockdevSnapshotSync *obj); struct q_obj_ChardevFile_wrapper { ChardevFile *data; }; struct q_obj_ChardevHostdev_wrapper { ChardevHostdev *data; }; struct q_obj_ChardevSocket_wrapper { ChardevSocket *data; }; struct q_obj_ChardevUdp_wrapper { ChardevUdp *data; }; struct q_obj_ChardevCommon_wrapper { ChardevCommon *data; }; struct q_obj_ChardevMux_wrapper { ChardevMux *data; }; struct q_obj_ChardevStdio_wrapper { ChardevStdio *data; }; struct q_obj_ChardevSpiceChannel_wrapper { ChardevSpiceChannel *data; }; struct q_obj_ChardevSpicePort_wrapper { ChardevSpicePort *data; }; struct q_obj_ChardevVC_wrapper { ChardevVC *data; }; struct q_obj_ChardevRingbuf_wrapper { ChardevRingbuf *data; }; struct ChardevBackend { ChardevBackendKind type; union { /* union tag is @type */ q_obj_ChardevFile_wrapper file; q_obj_ChardevHostdev_wrapper serial; q_obj_ChardevHostdev_wrapper parallel; q_obj_ChardevHostdev_wrapper pipe; q_obj_ChardevSocket_wrapper socket; q_obj_ChardevUdp_wrapper udp; q_obj_ChardevCommon_wrapper pty; q_obj_ChardevCommon_wrapper null; q_obj_ChardevMux_wrapper mux; q_obj_ChardevCommon_wrapper msmouse; q_obj_ChardevCommon_wrapper wctablet; q_obj_ChardevCommon_wrapper braille; q_obj_ChardevCommon_wrapper testdev; q_obj_ChardevStdio_wrapper stdio; q_obj_ChardevCommon_wrapper console; q_obj_ChardevSpiceChannel_wrapper spicevmc; q_obj_ChardevSpicePort_wrapper spiceport; q_obj_ChardevVC_wrapper vc; q_obj_ChardevRingbuf_wrapper ringbuf; q_obj_ChardevRingbuf_wrapper memory; } u; }; void qapi_free_ChardevBackend(ChardevBackend *obj); struct ChardevBackendInfo { char *name; }; void qapi_free_ChardevBackendInfo(ChardevBackendInfo *obj); struct ChardevBackendInfoList { ChardevBackendInfoList *next; ChardevBackendInfo *value; }; void qapi_free_ChardevBackendInfoList(ChardevBackendInfoList *obj); struct ChardevCommon { # 3559 "./qapi-types.h" 3 4 _Bool # 3559 "./qapi-types.h" has_logfile; char *logfile; # 3561 "./qapi-types.h" 3 4 _Bool # 3561 "./qapi-types.h" has_logappend; # 3562 "./qapi-types.h" 3 4 _Bool # 3562 "./qapi-types.h" logappend; }; void qapi_free_ChardevCommon(ChardevCommon *obj); struct ChardevFile { /* Members inherited from ChardevCommon: */ # 3569 "./qapi-types.h" 3 4 _Bool # 3569 "./qapi-types.h" has_logfile; char *logfile; # 3571 "./qapi-types.h" 3 4 _Bool # 3571 "./qapi-types.h" has_logappend; # 3572 "./qapi-types.h" 3 4 _Bool # 3572 "./qapi-types.h" logappend; /* Own members: */ # 3574 "./qapi-types.h" 3 4 _Bool # 3574 "./qapi-types.h" has_in; char *in; char *out; # 3577 "./qapi-types.h" 3 4 _Bool # 3577 "./qapi-types.h" has_append; # 3578 "./qapi-types.h" 3 4 _Bool # 3578 "./qapi-types.h" append; }; static inline ChardevCommon *qapi_ChardevFile_base(const ChardevFile *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevFile(ChardevFile *obj); struct ChardevHostdev { /* Members inherited from ChardevCommon: */ # 3590 "./qapi-types.h" 3 4 _Bool # 3590 "./qapi-types.h" has_logfile; char *logfile; # 3592 "./qapi-types.h" 3 4 _Bool # 3592 "./qapi-types.h" has_logappend; # 3593 "./qapi-types.h" 3 4 _Bool # 3593 "./qapi-types.h" logappend; /* Own members: */ char *device; }; static inline ChardevCommon *qapi_ChardevHostdev_base(const ChardevHostdev *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevHostdev(ChardevHostdev *obj); struct ChardevInfo { char *label; char *filename; # 3608 "./qapi-types.h" 3 4 _Bool # 3608 "./qapi-types.h" frontend_open; }; void qapi_free_ChardevInfo(ChardevInfo *obj); struct ChardevInfoList { ChardevInfoList *next; ChardevInfo *value; }; void qapi_free_ChardevInfoList(ChardevInfoList *obj); struct ChardevMux { /* Members inherited from ChardevCommon: */ # 3622 "./qapi-types.h" 3 4 _Bool # 3622 "./qapi-types.h" has_logfile; char *logfile; # 3624 "./qapi-types.h" 3 4 _Bool # 3624 "./qapi-types.h" has_logappend; # 3625 "./qapi-types.h" 3 4 _Bool # 3625 "./qapi-types.h" logappend; /* Own members: */ char *chardev; }; static inline ChardevCommon *qapi_ChardevMux_base(const ChardevMux *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevMux(ChardevMux *obj); struct ChardevReturn { # 3638 "./qapi-types.h" 3 4 _Bool # 3638 "./qapi-types.h" has_pty; char *pty; }; void qapi_free_ChardevReturn(ChardevReturn *obj); struct ChardevRingbuf { /* Members inherited from ChardevCommon: */ # 3646 "./qapi-types.h" 3 4 _Bool # 3646 "./qapi-types.h" has_logfile; char *logfile; # 3648 "./qapi-types.h" 3 4 _Bool # 3648 "./qapi-types.h" has_logappend; # 3649 "./qapi-types.h" 3 4 _Bool # 3649 "./qapi-types.h" logappend; /* Own members: */ # 3651 "./qapi-types.h" 3 4 _Bool # 3651 "./qapi-types.h" has_size; int64_t size; }; static inline ChardevCommon *qapi_ChardevRingbuf_base(const ChardevRingbuf *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevRingbuf(ChardevRingbuf *obj); struct ChardevSocket { /* Members inherited from ChardevCommon: */ # 3664 "./qapi-types.h" 3 4 _Bool # 3664 "./qapi-types.h" has_logfile; char *logfile; # 3666 "./qapi-types.h" 3 4 _Bool # 3666 "./qapi-types.h" has_logappend; # 3667 "./qapi-types.h" 3 4 _Bool # 3667 "./qapi-types.h" logappend; /* Own members: */ SocketAddressLegacy *addr; # 3670 "./qapi-types.h" 3 4 _Bool # 3670 "./qapi-types.h" has_tls_creds; char *tls_creds; # 3672 "./qapi-types.h" 3 4 _Bool # 3672 "./qapi-types.h" has_server; # 3673 "./qapi-types.h" 3 4 _Bool # 3673 "./qapi-types.h" server; # 3674 "./qapi-types.h" 3 4 _Bool # 3674 "./qapi-types.h" has_wait; # 3675 "./qapi-types.h" 3 4 _Bool # 3675 "./qapi-types.h" wait; # 3676 "./qapi-types.h" 3 4 _Bool # 3676 "./qapi-types.h" has_nodelay; # 3677 "./qapi-types.h" 3 4 _Bool # 3677 "./qapi-types.h" nodelay; # 3678 "./qapi-types.h" 3 4 _Bool # 3678 "./qapi-types.h" has_telnet; # 3679 "./qapi-types.h" 3 4 _Bool # 3679 "./qapi-types.h" telnet; # 3680 "./qapi-types.h" 3 4 _Bool # 3680 "./qapi-types.h" has_tn3270; # 3681 "./qapi-types.h" 3 4 _Bool # 3681 "./qapi-types.h" tn3270; # 3682 "./qapi-types.h" 3 4 _Bool # 3682 "./qapi-types.h" has_reconnect; int64_t reconnect; }; static inline ChardevCommon *qapi_ChardevSocket_base(const ChardevSocket *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevSocket(ChardevSocket *obj); struct ChardevSpiceChannel { /* Members inherited from ChardevCommon: */ # 3695 "./qapi-types.h" 3 4 _Bool # 3695 "./qapi-types.h" has_logfile; char *logfile; # 3697 "./qapi-types.h" 3 4 _Bool # 3697 "./qapi-types.h" has_logappend; # 3698 "./qapi-types.h" 3 4 _Bool # 3698 "./qapi-types.h" logappend; /* Own members: */ char *type; }; static inline ChardevCommon *qapi_ChardevSpiceChannel_base(const ChardevSpiceChannel *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevSpiceChannel(ChardevSpiceChannel *obj); struct ChardevSpicePort { /* Members inherited from ChardevCommon: */ # 3712 "./qapi-types.h" 3 4 _Bool # 3712 "./qapi-types.h" has_logfile; char *logfile; # 3714 "./qapi-types.h" 3 4 _Bool # 3714 "./qapi-types.h" has_logappend; # 3715 "./qapi-types.h" 3 4 _Bool # 3715 "./qapi-types.h" logappend; /* Own members: */ char *fqdn; }; static inline ChardevCommon *qapi_ChardevSpicePort_base(const ChardevSpicePort *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevSpicePort(ChardevSpicePort *obj); struct ChardevStdio { /* Members inherited from ChardevCommon: */ # 3729 "./qapi-types.h" 3 4 _Bool # 3729 "./qapi-types.h" has_logfile; char *logfile; # 3731 "./qapi-types.h" 3 4 _Bool # 3731 "./qapi-types.h" has_logappend; # 3732 "./qapi-types.h" 3 4 _Bool # 3732 "./qapi-types.h" logappend; /* Own members: */ # 3734 "./qapi-types.h" 3 4 _Bool # 3734 "./qapi-types.h" has_signal; # 3735 "./qapi-types.h" 3 4 _Bool # 3735 "./qapi-types.h" signal; }; static inline ChardevCommon *qapi_ChardevStdio_base(const ChardevStdio *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevStdio(ChardevStdio *obj); struct ChardevUdp { /* Members inherited from ChardevCommon: */ # 3747 "./qapi-types.h" 3 4 _Bool # 3747 "./qapi-types.h" has_logfile; char *logfile; # 3749 "./qapi-types.h" 3 4 _Bool # 3749 "./qapi-types.h" has_logappend; # 3750 "./qapi-types.h" 3 4 _Bool # 3750 "./qapi-types.h" logappend; /* Own members: */ SocketAddressLegacy *remote; # 3753 "./qapi-types.h" 3 4 _Bool # 3753 "./qapi-types.h" has_local; SocketAddressLegacy *local; }; static inline ChardevCommon *qapi_ChardevUdp_base(const ChardevUdp *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevUdp(ChardevUdp *obj); struct ChardevVC { /* Members inherited from ChardevCommon: */ # 3766 "./qapi-types.h" 3 4 _Bool # 3766 "./qapi-types.h" has_logfile; char *logfile; # 3768 "./qapi-types.h" 3 4 _Bool # 3768 "./qapi-types.h" has_logappend; # 3769 "./qapi-types.h" 3 4 _Bool # 3769 "./qapi-types.h" logappend; /* Own members: */ # 3771 "./qapi-types.h" 3 4 _Bool # 3771 "./qapi-types.h" has_width; int64_t width; # 3773 "./qapi-types.h" 3 4 _Bool # 3773 "./qapi-types.h" has_height; int64_t height; # 3775 "./qapi-types.h" 3 4 _Bool # 3775 "./qapi-types.h" has_cols; int64_t cols; # 3777 "./qapi-types.h" 3 4 _Bool # 3777 "./qapi-types.h" has_rows; int64_t rows; }; static inline ChardevCommon *qapi_ChardevVC_base(const ChardevVC *obj) { return (ChardevCommon *)obj; } void qapi_free_ChardevVC(ChardevVC *obj); struct CommandInfo { char *name; }; void qapi_free_CommandInfo(CommandInfo *obj); struct CommandInfoList { CommandInfoList *next; CommandInfo *value; }; void qapi_free_CommandInfoList(CommandInfoList *obj); struct CommandLineOptionInfo { char *option; CommandLineParameterInfoList *parameters; }; void qapi_free_CommandLineOptionInfo(CommandLineOptionInfo *obj); struct CommandLineOptionInfoList { CommandLineOptionInfoList *next; CommandLineOptionInfo *value; }; void qapi_free_CommandLineOptionInfoList(CommandLineOptionInfoList *obj); struct CommandLineParameterInfo { char *name; CommandLineParameterType type; # 3818 "./qapi-types.h" 3 4 _Bool # 3818 "./qapi-types.h" has_help; char *help; # 3820 "./qapi-types.h" 3 4 _Bool # 3820 "./qapi-types.h" has_q_default; char *q_default; }; void qapi_free_CommandLineParameterInfo(CommandLineParameterInfo *obj); struct CommandLineParameterInfoList { CommandLineParameterInfoList *next; CommandLineParameterInfo *value; }; void qapi_free_CommandLineParameterInfoList(CommandLineParameterInfoList *obj); struct CpuDefinitionInfo { char *name; # 3835 "./qapi-types.h" 3 4 _Bool # 3835 "./qapi-types.h" has_migration_safe; # 3836 "./qapi-types.h" 3 4 _Bool # 3836 "./qapi-types.h" migration_safe; # 3837 "./qapi-types.h" 3 4 _Bool # 3837 "./qapi-types.h" q_static; # 3838 "./qapi-types.h" 3 4 _Bool # 3838 "./qapi-types.h" has_unavailable_features; strList *unavailable_features; char *q_typename; }; void qapi_free_CpuDefinitionInfo(CpuDefinitionInfo *obj); struct CpuDefinitionInfoList { CpuDefinitionInfoList *next; CpuDefinitionInfo *value; }; void qapi_free_CpuDefinitionInfoList(CpuDefinitionInfoList *obj); struct CpuInfoX86 { int64_t pc; }; struct CpuInfoSPARC { int64_t pc; int64_t npc; }; struct CpuInfoPPC { int64_t nip; }; struct CpuInfoMIPS { int64_t PC; }; struct CpuInfoTricore { int64_t PC; }; struct CpuInfoOther { char qapi_dummy_for_empty_struct; }; struct CpuInfo { int64_t CPU; # 3879 "./qapi-types.h" 3 4 _Bool # 3879 "./qapi-types.h" current; # 3880 "./qapi-types.h" 3 4 _Bool # 3880 "./qapi-types.h" halted; char *qom_path; int64_t thread_id; # 3883 "./qapi-types.h" 3 4 _Bool # 3883 "./qapi-types.h" has_props; CpuInstanceProperties *props; CpuInfoArch arch; union { /* union tag is @arch */ CpuInfoX86 x86; CpuInfoSPARC q_sparc; CpuInfoPPC ppc; CpuInfoMIPS q_mips; CpuInfoTricore tricore; CpuInfoOther other; } u; }; void qapi_free_CpuInfo(CpuInfo *obj); struct CpuInfoList { CpuInfoList *next; CpuInfo *value; }; void qapi_free_CpuInfoList(CpuInfoList *obj); void qapi_free_CpuInfoMIPS(CpuInfoMIPS *obj); void qapi_free_CpuInfoOther(CpuInfoOther *obj); void qapi_free_CpuInfoPPC(CpuInfoPPC *obj); void qapi_free_CpuInfoSPARC(CpuInfoSPARC *obj); void qapi_free_CpuInfoTricore(CpuInfoTricore *obj); void qapi_free_CpuInfoX86(CpuInfoX86 *obj); struct CpuInstanceProperties { # 3918 "./qapi-types.h" 3 4 _Bool # 3918 "./qapi-types.h" has_node_id; int64_t node_id; # 3920 "./qapi-types.h" 3 4 _Bool # 3920 "./qapi-types.h" has_socket_id; int64_t socket_id; # 3922 "./qapi-types.h" 3 4 _Bool # 3922 "./qapi-types.h" has_core_id; int64_t core_id; # 3924 "./qapi-types.h" 3 4 _Bool # 3924 "./qapi-types.h" has_thread_id; int64_t thread_id; }; void qapi_free_CpuInstanceProperties(CpuInstanceProperties *obj); struct CpuModelBaselineInfo { CpuModelInfo *model; }; void qapi_free_CpuModelBaselineInfo(CpuModelBaselineInfo *obj); struct CpuModelCompareInfo { CpuModelCompareResult result; strList *responsible_properties; }; void qapi_free_CpuModelCompareInfo(CpuModelCompareInfo *obj); struct CpuModelExpansionInfo { CpuModelInfo *model; }; void qapi_free_CpuModelExpansionInfo(CpuModelExpansionInfo *obj); struct CpuModelInfo { char *name; # 3951 "./qapi-types.h" 3 4 _Bool # 3951 "./qapi-types.h" has_props; QObject *props; }; void qapi_free_CpuModelInfo(CpuModelInfo *obj); struct DevicePropertyInfo { char *name; char *type; # 3960 "./qapi-types.h" 3 4 _Bool # 3960 "./qapi-types.h" has_description; char *description; }; void qapi_free_DevicePropertyInfo(DevicePropertyInfo *obj); struct DevicePropertyInfoList { DevicePropertyInfoList *next; DevicePropertyInfo *value; }; void qapi_free_DevicePropertyInfoList(DevicePropertyInfoList *obj); struct DriveBackup { # 3974 "./qapi-types.h" 3 4 _Bool # 3974 "./qapi-types.h" has_job_id; char *job_id; char *device; char *target; # 3978 "./qapi-types.h" 3 4 _Bool # 3978 "./qapi-types.h" has_format; char *format; MirrorSyncMode sync; # 3981 "./qapi-types.h" 3 4 _Bool # 3981 "./qapi-types.h" has_mode; NewImageMode mode; # 3983 "./qapi-types.h" 3 4 _Bool # 3983 "./qapi-types.h" has_speed; int64_t speed; # 3985 "./qapi-types.h" 3 4 _Bool # 3985 "./qapi-types.h" has_bitmap; char *bitmap; # 3987 "./qapi-types.h" 3 4 _Bool # 3987 "./qapi-types.h" has_compress; # 3988 "./qapi-types.h" 3 4 _Bool # 3988 "./qapi-types.h" compress; # 3989 "./qapi-types.h" 3 4 _Bool # 3989 "./qapi-types.h" has_on_source_error; BlockdevOnError on_source_error; # 3991 "./qapi-types.h" 3 4 _Bool # 3991 "./qapi-types.h" has_on_target_error; BlockdevOnError on_target_error; }; void qapi_free_DriveBackup(DriveBackup *obj); struct DriveMirror { # 3998 "./qapi-types.h" 3 4 _Bool # 3998 "./qapi-types.h" has_job_id; char *job_id; char *device; char *target; # 4002 "./qapi-types.h" 3 4 _Bool # 4002 "./qapi-types.h" has_format; char *format; # 4004 "./qapi-types.h" 3 4 _Bool # 4004 "./qapi-types.h" has_node_name; char *node_name; # 4006 "./qapi-types.h" 3 4 _Bool # 4006 "./qapi-types.h" has_replaces; char *replaces; MirrorSyncMode sync; # 4009 "./qapi-types.h" 3 4 _Bool # 4009 "./qapi-types.h" has_mode; NewImageMode mode; # 4011 "./qapi-types.h" 3 4 _Bool # 4011 "./qapi-types.h" has_speed; int64_t speed; # 4013 "./qapi-types.h" 3 4 _Bool # 4013 "./qapi-types.h" has_granularity; uint32_t granularity; # 4015 "./qapi-types.h" 3 4 _Bool # 4015 "./qapi-types.h" has_buf_size; int64_t buf_size; # 4017 "./qapi-types.h" 3 4 _Bool # 4017 "./qapi-types.h" has_on_source_error; BlockdevOnError on_source_error; # 4019 "./qapi-types.h" 3 4 _Bool # 4019 "./qapi-types.h" has_on_target_error; BlockdevOnError on_target_error; # 4021 "./qapi-types.h" 3 4 _Bool # 4021 "./qapi-types.h" has_unmap; # 4022 "./qapi-types.h" 3 4 _Bool # 4022 "./qapi-types.h" unmap; }; void qapi_free_DriveMirror(DriveMirror *obj); struct DummyForceArrays { X86CPUFeatureWordInfoList *unused; }; void qapi_free_DummyForceArrays(DummyForceArrays *obj); struct DumpGuestMemoryCapability { DumpGuestMemoryFormatList *formats; }; void qapi_free_DumpGuestMemoryCapability(DumpGuestMemoryCapability *obj); struct DumpGuestMemoryFormatList { DumpGuestMemoryFormatList *next; DumpGuestMemoryFormat value; }; void qapi_free_DumpGuestMemoryFormatList(DumpGuestMemoryFormatList *obj); struct DumpQueryResult { DumpStatus status; int64_t completed; int64_t total; }; void qapi_free_DumpQueryResult(DumpQueryResult *obj); struct EventInfo { char *name; }; void qapi_free_EventInfo(EventInfo *obj); struct EventInfoList { EventInfoList *next; EventInfo *value; }; void qapi_free_EventInfoList(EventInfoList *obj); struct FdsetFdInfo { int64_t fd; # 4069 "./qapi-types.h" 3 4 _Bool # 4069 "./qapi-types.h" has_opaque; char *opaque; }; void qapi_free_FdsetFdInfo(FdsetFdInfo *obj); struct FdsetFdInfoList { FdsetFdInfoList *next; FdsetFdInfo *value; }; void qapi_free_FdsetFdInfoList(FdsetFdInfoList *obj); struct FdsetInfo { int64_t fdset_id; FdsetFdInfoList *fds; }; void qapi_free_FdsetInfo(FdsetInfo *obj); struct FdsetInfoList { FdsetInfoList *next; FdsetInfo *value; }; void qapi_free_FdsetInfoList(FdsetInfoList *obj); struct GICCapability { int64_t version; # 4098 "./qapi-types.h" 3 4 _Bool # 4098 "./qapi-types.h" emulated; # 4099 "./qapi-types.h" 3 4 _Bool # 4099 "./qapi-types.h" kernel; }; void qapi_free_GICCapability(GICCapability *obj); struct GICCapabilityList { GICCapabilityList *next; GICCapability *value; }; void qapi_free_GICCapabilityList(GICCapabilityList *obj); struct GuestPanicInformationHyperV { uint64_t arg1; uint64_t arg2; uint64_t arg3; uint64_t arg4; uint64_t arg5; }; struct GuestPanicInformation { GuestPanicInformationType type; union { /* union tag is @type */ GuestPanicInformationHyperV hyper_v; } u; }; void qapi_free_GuestPanicInformation(GuestPanicInformation *obj); void qapi_free_GuestPanicInformationHyperV(GuestPanicInformationHyperV *obj); struct GuidInfo { char *guid; }; void qapi_free_GuidInfo(GuidInfo *obj); struct HotpluggableCPU { char *type; int64_t vcpus_count; CpuInstanceProperties *props; # 4140 "./qapi-types.h" 3 4 _Bool # 4140 "./qapi-types.h" has_qom_path; char *qom_path; }; void qapi_free_HotpluggableCPU(HotpluggableCPU *obj); struct HotpluggableCPUList { HotpluggableCPUList *next; HotpluggableCPU *value; }; void qapi_free_HotpluggableCPUList(HotpluggableCPUList *obj); struct IOThreadInfo { char *id; int64_t thread_id; int64_t poll_max_ns; int64_t poll_grow; int64_t poll_shrink; }; void qapi_free_IOThreadInfo(IOThreadInfo *obj); struct IOThreadInfoList { IOThreadInfoList *next; IOThreadInfo *value; }; void qapi_free_IOThreadInfoList(IOThreadInfoList *obj); struct ImageCheck { char *filename; char *format; int64_t check_errors; # 4174 "./qapi-types.h" 3 4 _Bool # 4174 "./qapi-types.h" has_image_end_offset; int64_t image_end_offset; # 4176 "./qapi-types.h" 3 4 _Bool # 4176 "./qapi-types.h" has_corruptions; int64_t corruptions; # 4178 "./qapi-types.h" 3 4 _Bool # 4178 "./qapi-types.h" has_leaks; int64_t leaks; # 4180 "./qapi-types.h" 3 4 _Bool # 4180 "./qapi-types.h" has_corruptions_fixed; int64_t corruptions_fixed; # 4182 "./qapi-types.h" 3 4 _Bool # 4182 "./qapi-types.h" has_leaks_fixed; int64_t leaks_fixed; # 4184 "./qapi-types.h" 3 4 _Bool # 4184 "./qapi-types.h" has_total_clusters; int64_t total_clusters; # 4186 "./qapi-types.h" 3 4 _Bool # 4186 "./qapi-types.h" has_allocated_clusters; int64_t allocated_clusters; # 4188 "./qapi-types.h" 3 4 _Bool # 4188 "./qapi-types.h" has_fragmented_clusters; int64_t fragmented_clusters; # 4190 "./qapi-types.h" 3 4 _Bool # 4190 "./qapi-types.h" has_compressed_clusters; int64_t compressed_clusters; }; void qapi_free_ImageCheck(ImageCheck *obj); struct ImageInfo { char *filename; char *format; # 4199 "./qapi-types.h" 3 4 _Bool # 4199 "./qapi-types.h" has_dirty_flag; # 4200 "./qapi-types.h" 3 4 _Bool # 4200 "./qapi-types.h" dirty_flag; # 4201 "./qapi-types.h" 3 4 _Bool # 4201 "./qapi-types.h" has_actual_size; int64_t actual_size; int64_t virtual_size; # 4204 "./qapi-types.h" 3 4 _Bool # 4204 "./qapi-types.h" has_cluster_size; int64_t cluster_size; # 4206 "./qapi-types.h" 3 4 _Bool # 4206 "./qapi-types.h" has_encrypted; # 4207 "./qapi-types.h" 3 4 _Bool # 4207 "./qapi-types.h" encrypted; # 4208 "./qapi-types.h" 3 4 _Bool # 4208 "./qapi-types.h" has_compressed; # 4209 "./qapi-types.h" 3 4 _Bool # 4209 "./qapi-types.h" compressed; # 4210 "./qapi-types.h" 3 4 _Bool # 4210 "./qapi-types.h" has_backing_filename; char *backing_filename; # 4212 "./qapi-types.h" 3 4 _Bool # 4212 "./qapi-types.h" has_full_backing_filename; char *full_backing_filename; # 4214 "./qapi-types.h" 3 4 _Bool # 4214 "./qapi-types.h" has_backing_filename_format; char *backing_filename_format; # 4216 "./qapi-types.h" 3 4 _Bool # 4216 "./qapi-types.h" has_snapshots; SnapshotInfoList *snapshots; # 4218 "./qapi-types.h" 3 4 _Bool # 4218 "./qapi-types.h" has_backing_image; ImageInfo *backing_image; # 4220 "./qapi-types.h" 3 4 _Bool # 4220 "./qapi-types.h" has_format_specific; ImageInfoSpecific *format_specific; }; void qapi_free_ImageInfo(ImageInfo *obj); struct ImageInfoList { ImageInfoList *next; ImageInfo *value; }; void qapi_free_ImageInfoList(ImageInfoList *obj); struct q_obj_ImageInfoSpecificQCow2_wrapper { ImageInfoSpecificQCow2 *data; }; struct q_obj_ImageInfoSpecificVmdk_wrapper { ImageInfoSpecificVmdk *data; }; struct q_obj_QCryptoBlockInfoLUKS_wrapper { QCryptoBlockInfoLUKS *data; }; struct ImageInfoSpecific { ImageInfoSpecificKind type; union { /* union tag is @type */ q_obj_ImageInfoSpecificQCow2_wrapper qcow2; q_obj_ImageInfoSpecificVmdk_wrapper vmdk; q_obj_QCryptoBlockInfoLUKS_wrapper luks; } u; }; void qapi_free_ImageInfoSpecific(ImageInfoSpecific *obj); struct ImageInfoSpecificQCow2 { char *compat; # 4258 "./qapi-types.h" 3 4 _Bool # 4258 "./qapi-types.h" has_lazy_refcounts; # 4259 "./qapi-types.h" 3 4 _Bool # 4259 "./qapi-types.h" lazy_refcounts; # 4260 "./qapi-types.h" 3 4 _Bool # 4260 "./qapi-types.h" has_corrupt; # 4261 "./qapi-types.h" 3 4 _Bool # 4261 "./qapi-types.h" corrupt; int64_t refcount_bits; # 4263 "./qapi-types.h" 3 4 _Bool # 4263 "./qapi-types.h" has_encrypt; ImageInfoSpecificQCow2Encryption *encrypt; }; void qapi_free_ImageInfoSpecificQCow2(ImageInfoSpecificQCow2 *obj); struct QCryptoBlockInfoQCow { char qapi_dummy_for_empty_struct; }; struct QCryptoBlockInfoLUKS { QCryptoCipherAlgorithm cipher_alg; QCryptoCipherMode cipher_mode; QCryptoIVGenAlgorithm ivgen_alg; # 4277 "./qapi-types.h" 3 4 _Bool # 4277 "./qapi-types.h" has_ivgen_hash_alg; QCryptoHashAlgorithm ivgen_hash_alg; QCryptoHashAlgorithm hash_alg; int64_t payload_offset; int64_t master_key_iters; char *uuid; QCryptoBlockInfoLUKSSlotList *slots; }; struct ImageInfoSpecificQCow2Encryption { /* Members inherited from ImageInfoSpecificQCow2EncryptionBase: */ BlockdevQcow2EncryptionFormat format; /* Own members: */ union { /* union tag is @format */ QCryptoBlockInfoQCow aes; QCryptoBlockInfoLUKS luks; } u; }; static inline ImageInfoSpecificQCow2EncryptionBase *qapi_ImageInfoSpecificQCow2Encryption_base(const ImageInfoSpecificQCow2Encryption *obj) { return (ImageInfoSpecificQCow2EncryptionBase *)obj; } void qapi_free_ImageInfoSpecificQCow2Encryption(ImageInfoSpecificQCow2Encryption *obj); struct ImageInfoSpecificQCow2EncryptionBase { BlockdevQcow2EncryptionFormat format; }; void qapi_free_ImageInfoSpecificQCow2EncryptionBase(ImageInfoSpecificQCow2EncryptionBase *obj); struct ImageInfoSpecificVmdk { char *create_type; int64_t cid; int64_t parent_cid; ImageInfoList *extents; }; void qapi_free_ImageInfoSpecificVmdk(ImageInfoSpecificVmdk *obj); struct InetSocketAddress { /* Members inherited from InetSocketAddressBase: */ char *host; char *port; /* Own members: */ # 4323 "./qapi-types.h" 3 4 _Bool # 4323 "./qapi-types.h" has_numeric; # 4324 "./qapi-types.h" 3 4 _Bool # 4324 "./qapi-types.h" numeric; # 4325 "./qapi-types.h" 3 4 _Bool # 4325 "./qapi-types.h" has_to; uint16_t to; # 4327 "./qapi-types.h" 3 4 _Bool # 4327 "./qapi-types.h" has_ipv4; # 4328 "./qapi-types.h" 3 4 _Bool # 4328 "./qapi-types.h" ipv4; # 4329 "./qapi-types.h" 3 4 _Bool # 4329 "./qapi-types.h" has_ipv6; # 4330 "./qapi-types.h" 3 4 _Bool # 4330 "./qapi-types.h" ipv6; }; static inline InetSocketAddressBase *qapi_InetSocketAddress_base(const InetSocketAddress *obj) { return (InetSocketAddressBase *)obj; } void qapi_free_InetSocketAddress(InetSocketAddress *obj); struct InetSocketAddressBase { char *host; char *port; }; void qapi_free_InetSocketAddressBase(InetSocketAddressBase *obj); struct InetSocketAddressBaseList { InetSocketAddressBaseList *next; InetSocketAddressBase *value; }; void qapi_free_InetSocketAddressBaseList(InetSocketAddressBaseList *obj); struct InputBtnEvent { InputButton button; # 4356 "./qapi-types.h" 3 4 _Bool # 4356 "./qapi-types.h" down; }; void qapi_free_InputBtnEvent(InputBtnEvent *obj); struct q_obj_InputKeyEvent_wrapper { InputKeyEvent *data; }; struct q_obj_InputBtnEvent_wrapper { InputBtnEvent *data; }; struct q_obj_InputMoveEvent_wrapper { InputMoveEvent *data; }; struct InputEvent { InputEventKind type; union { /* union tag is @type */ q_obj_InputKeyEvent_wrapper key; q_obj_InputBtnEvent_wrapper btn; q_obj_InputMoveEvent_wrapper rel; q_obj_InputMoveEvent_wrapper abs; } u; }; void qapi_free_InputEvent(InputEvent *obj); struct InputEventList { InputEventList *next; InputEvent *value; }; void qapi_free_InputEventList(InputEventList *obj); struct InputKeyEvent { KeyValue *key; # 4394 "./qapi-types.h" 3 4 _Bool # 4394 "./qapi-types.h" down; }; void qapi_free_InputKeyEvent(InputKeyEvent *obj); struct InputMoveEvent { InputAxis axis; int64_t value; }; void qapi_free_InputMoveEvent(InputMoveEvent *obj); struct q_obj_int_wrapper { int64_t data; }; struct q_obj_QKeyCode_wrapper { QKeyCode data; }; struct KeyValue { KeyValueKind type; union { /* union tag is @type */ q_obj_int_wrapper number; q_obj_QKeyCode_wrapper qcode; } u; }; void qapi_free_KeyValue(KeyValue *obj); struct KeyValueList { KeyValueList *next; KeyValue *value; }; void qapi_free_KeyValueList(KeyValueList *obj); struct KvmInfo { # 4432 "./qapi-types.h" 3 4 _Bool # 4432 "./qapi-types.h" enabled; # 4433 "./qapi-types.h" 3 4 _Bool # 4433 "./qapi-types.h" present; }; void qapi_free_KvmInfo(KvmInfo *obj); struct MachineInfo { char *name; # 4440 "./qapi-types.h" 3 4 _Bool # 4440 "./qapi-types.h" has_alias; char *alias; # 4442 "./qapi-types.h" 3 4 _Bool # 4442 "./qapi-types.h" has_is_default; # 4443 "./qapi-types.h" 3 4 _Bool # 4443 "./qapi-types.h" is_default; int64_t cpu_max; # 4445 "./qapi-types.h" 3 4 _Bool # 4445 "./qapi-types.h" hotpluggable_cpus; }; void qapi_free_MachineInfo(MachineInfo *obj); struct MachineInfoList { MachineInfoList *next; MachineInfo *value; }; void qapi_free_MachineInfoList(MachineInfoList *obj); struct MapEntry { int64_t start; int64_t length; # 4460 "./qapi-types.h" 3 4 _Bool # 4460 "./qapi-types.h" data; # 4461 "./qapi-types.h" 3 4 _Bool # 4461 "./qapi-types.h" zero; int64_t depth; # 4463 "./qapi-types.h" 3 4 _Bool # 4463 "./qapi-types.h" has_offset; int64_t offset; # 4465 "./qapi-types.h" 3 4 _Bool # 4465 "./qapi-types.h" has_filename; char *filename; }; void qapi_free_MapEntry(MapEntry *obj); struct Memdev { # 4472 "./qapi-types.h" 3 4 _Bool # 4472 "./qapi-types.h" has_id; char *id; uint64_t size; # 4475 "./qapi-types.h" 3 4 _Bool # 4475 "./qapi-types.h" merge; # 4476 "./qapi-types.h" 3 4 _Bool # 4476 "./qapi-types.h" dump; # 4477 "./qapi-types.h" 3 4 _Bool # 4477 "./qapi-types.h" prealloc; uint16List *host_nodes; HostMemPolicy policy; }; void qapi_free_Memdev(Memdev *obj); struct MemdevList { MemdevList *next; Memdev *value; }; void qapi_free_MemdevList(MemdevList *obj); struct q_obj_PCDIMMDeviceInfo_wrapper { PCDIMMDeviceInfo *data; }; struct MemoryDeviceInfo { MemoryDeviceInfoKind type; union { /* union tag is @type */ q_obj_PCDIMMDeviceInfo_wrapper dimm; } u; }; void qapi_free_MemoryDeviceInfo(MemoryDeviceInfo *obj); struct MemoryDeviceInfoList { MemoryDeviceInfoList *next; MemoryDeviceInfo *value; }; void qapi_free_MemoryDeviceInfoList(MemoryDeviceInfoList *obj); struct MemoryInfo { uint64_t base_memory; # 4513 "./qapi-types.h" 3 4 _Bool # 4513 "./qapi-types.h" has_plugged_memory; uint64_t plugged_memory; }; void qapi_free_MemoryInfo(MemoryInfo *obj); struct MigrateSetParameters { # 4520 "./qapi-types.h" 3 4 _Bool # 4520 "./qapi-types.h" has_compress_level; int64_t compress_level; # 4522 "./qapi-types.h" 3 4 _Bool # 4522 "./qapi-types.h" has_compress_threads; int64_t compress_threads; # 4524 "./qapi-types.h" 3 4 _Bool # 4524 "./qapi-types.h" has_decompress_threads; int64_t decompress_threads; # 4526 "./qapi-types.h" 3 4 _Bool # 4526 "./qapi-types.h" has_cpu_throttle_initial; int64_t cpu_throttle_initial; # 4528 "./qapi-types.h" 3 4 _Bool # 4528 "./qapi-types.h" has_cpu_throttle_increment; int64_t cpu_throttle_increment; # 4530 "./qapi-types.h" 3 4 _Bool # 4530 "./qapi-types.h" has_tls_creds; StrOrNull *tls_creds; # 4532 "./qapi-types.h" 3 4 _Bool # 4532 "./qapi-types.h" has_tls_hostname; StrOrNull *tls_hostname; # 4534 "./qapi-types.h" 3 4 _Bool # 4534 "./qapi-types.h" has_max_bandwidth; int64_t max_bandwidth; # 4536 "./qapi-types.h" 3 4 _Bool # 4536 "./qapi-types.h" has_downtime_limit; int64_t downtime_limit; # 4538 "./qapi-types.h" 3 4 _Bool # 4538 "./qapi-types.h" has_x_checkpoint_delay; int64_t x_checkpoint_delay; # 4540 "./qapi-types.h" 3 4 _Bool # 4540 "./qapi-types.h" has_block_incremental; # 4541 "./qapi-types.h" 3 4 _Bool # 4541 "./qapi-types.h" block_incremental; # 4542 "./qapi-types.h" 3 4 _Bool # 4542 "./qapi-types.h" has_x_multifd_channels; int64_t x_multifd_channels; # 4544 "./qapi-types.h" 3 4 _Bool # 4544 "./qapi-types.h" has_x_multifd_page_count; int64_t x_multifd_page_count; # 4546 "./qapi-types.h" 3 4 _Bool # 4546 "./qapi-types.h" has_xbzrle_cache_size; uint64_t xbzrle_cache_size; }; void qapi_free_MigrateSetParameters(MigrateSetParameters *obj); struct MigrationCapabilityStatus { MigrationCapability capability; # 4554 "./qapi-types.h" 3 4 _Bool # 4554 "./qapi-types.h" state; }; void qapi_free_MigrationCapabilityStatus(MigrationCapabilityStatus *obj); struct MigrationCapabilityStatusList { MigrationCapabilityStatusList *next; MigrationCapabilityStatus *value; }; void qapi_free_MigrationCapabilityStatusList(MigrationCapabilityStatusList *obj); struct MigrationInfo { # 4567 "./qapi-types.h" 3 4 _Bool # 4567 "./qapi-types.h" has_status; MigrationStatus status; # 4569 "./qapi-types.h" 3 4 _Bool # 4569 "./qapi-types.h" has_ram; MigrationStats *ram; # 4571 "./qapi-types.h" 3 4 _Bool # 4571 "./qapi-types.h" has_disk; MigrationStats *disk; # 4573 "./qapi-types.h" 3 4 _Bool # 4573 "./qapi-types.h" has_xbzrle_cache; XBZRLECacheStats *xbzrle_cache; # 4575 "./qapi-types.h" 3 4 _Bool # 4575 "./qapi-types.h" has_total_time; int64_t total_time; # 4577 "./qapi-types.h" 3 4 _Bool # 4577 "./qapi-types.h" has_expected_downtime; int64_t expected_downtime; # 4579 "./qapi-types.h" 3 4 _Bool # 4579 "./qapi-types.h" has_downtime; int64_t downtime; # 4581 "./qapi-types.h" 3 4 _Bool # 4581 "./qapi-types.h" has_setup_time; int64_t setup_time; # 4583 "./qapi-types.h" 3 4 _Bool # 4583 "./qapi-types.h" has_cpu_throttle_percentage; int64_t cpu_throttle_percentage; # 4585 "./qapi-types.h" 3 4 _Bool # 4585 "./qapi-types.h" has_error_desc; char *error_desc; }; void qapi_free_MigrationInfo(MigrationInfo *obj); struct MigrationParameters { # 4592 "./qapi-types.h" 3 4 _Bool # 4592 "./qapi-types.h" has_compress_level; int64_t compress_level; # 4594 "./qapi-types.h" 3 4 _Bool # 4594 "./qapi-types.h" has_compress_threads; int64_t compress_threads; # 4596 "./qapi-types.h" 3 4 _Bool # 4596 "./qapi-types.h" has_decompress_threads; int64_t decompress_threads; # 4598 "./qapi-types.h" 3 4 _Bool # 4598 "./qapi-types.h" has_cpu_throttle_initial; int64_t cpu_throttle_initial; # 4600 "./qapi-types.h" 3 4 _Bool # 4600 "./qapi-types.h" has_cpu_throttle_increment; int64_t cpu_throttle_increment; # 4602 "./qapi-types.h" 3 4 _Bool # 4602 "./qapi-types.h" has_tls_creds; char *tls_creds; # 4604 "./qapi-types.h" 3 4 _Bool # 4604 "./qapi-types.h" has_tls_hostname; char *tls_hostname; # 4606 "./qapi-types.h" 3 4 _Bool # 4606 "./qapi-types.h" has_max_bandwidth; int64_t max_bandwidth; # 4608 "./qapi-types.h" 3 4 _Bool # 4608 "./qapi-types.h" has_downtime_limit; int64_t downtime_limit; # 4610 "./qapi-types.h" 3 4 _Bool # 4610 "./qapi-types.h" has_x_checkpoint_delay; int64_t x_checkpoint_delay; # 4612 "./qapi-types.h" 3 4 _Bool # 4612 "./qapi-types.h" has_block_incremental; # 4613 "./qapi-types.h" 3 4 _Bool # 4613 "./qapi-types.h" block_incremental; # 4614 "./qapi-types.h" 3 4 _Bool # 4614 "./qapi-types.h" has_x_multifd_channels; int64_t x_multifd_channels; # 4616 "./qapi-types.h" 3 4 _Bool # 4616 "./qapi-types.h" has_x_multifd_page_count; int64_t x_multifd_page_count; # 4618 "./qapi-types.h" 3 4 _Bool # 4618 "./qapi-types.h" has_xbzrle_cache_size; uint64_t xbzrle_cache_size; }; void qapi_free_MigrationParameters(MigrationParameters *obj); struct MigrationStats { int64_t transferred; int64_t remaining; int64_t total; int64_t duplicate; int64_t skipped; int64_t normal; int64_t normal_bytes; int64_t dirty_pages_rate; double mbps; int64_t dirty_sync_count; int64_t postcopy_requests; int64_t page_size; }; void qapi_free_MigrationStats(MigrationStats *obj); struct MouseInfo { char *name; int64_t index; # 4644 "./qapi-types.h" 3 4 _Bool # 4644 "./qapi-types.h" current; # 4645 "./qapi-types.h" 3 4 _Bool # 4645 "./qapi-types.h" absolute; }; void qapi_free_MouseInfo(MouseInfo *obj); struct MouseInfoList { MouseInfoList *next; MouseInfo *value; }; void qapi_free_MouseInfoList(MouseInfoList *obj); struct NFSServer { NFSTransport type; char *host; }; void qapi_free_NFSServer(NFSServer *obj); struct NameInfo { # 4665 "./qapi-types.h" 3 4 _Bool # 4665 "./qapi-types.h" has_name; char *name; }; void qapi_free_NameInfo(NameInfo *obj); struct NetLegacy { # 4672 "./qapi-types.h" 3 4 _Bool # 4672 "./qapi-types.h" has_vlan; int32_t vlan; # 4674 "./qapi-types.h" 3 4 _Bool # 4674 "./qapi-types.h" has_id; char *id; # 4676 "./qapi-types.h" 3 4 _Bool # 4676 "./qapi-types.h" has_name; char *name; NetLegacyOptions *opts; }; void qapi_free_NetLegacy(NetLegacy *obj); struct NetLegacyNicOptions { # 4684 "./qapi-types.h" 3 4 _Bool # 4684 "./qapi-types.h" has_netdev; char *netdev; # 4686 "./qapi-types.h" 3 4 _Bool # 4686 "./qapi-types.h" has_macaddr; char *macaddr; # 4688 "./qapi-types.h" 3 4 _Bool # 4688 "./qapi-types.h" has_model; char *model; # 4690 "./qapi-types.h" 3 4 _Bool # 4690 "./qapi-types.h" has_addr; char *addr; # 4692 "./qapi-types.h" 3 4 _Bool # 4692 "./qapi-types.h" has_vectors; uint32_t vectors; }; void qapi_free_NetLegacyNicOptions(NetLegacyNicOptions *obj); struct NetdevNoneOptions { char qapi_dummy_for_empty_struct; }; struct NetdevUserOptions { # 4703 "./qapi-types.h" 3 4 _Bool # 4703 "./qapi-types.h" has_hostname; char *hostname; # 4705 "./qapi-types.h" 3 4 _Bool # 4705 "./qapi-types.h" has_q_restrict; # 4706 "./qapi-types.h" 3 4 _Bool # 4706 "./qapi-types.h" q_restrict; # 4707 "./qapi-types.h" 3 4 _Bool # 4707 "./qapi-types.h" has_ipv4; # 4708 "./qapi-types.h" 3 4 _Bool # 4708 "./qapi-types.h" ipv4; # 4709 "./qapi-types.h" 3 4 _Bool # 4709 "./qapi-types.h" has_ipv6; # 4710 "./qapi-types.h" 3 4 _Bool # 4710 "./qapi-types.h" ipv6; # 4711 "./qapi-types.h" 3 4 _Bool # 4711 "./qapi-types.h" has_ip; char *ip; # 4713 "./qapi-types.h" 3 4 _Bool # 4713 "./qapi-types.h" has_net; char *net; # 4715 "./qapi-types.h" 3 4 _Bool # 4715 "./qapi-types.h" has_host; char *host; # 4717 "./qapi-types.h" 3 4 _Bool # 4717 "./qapi-types.h" has_tftp; char *tftp; # 4719 "./qapi-types.h" 3 4 _Bool # 4719 "./qapi-types.h" has_bootfile; char *bootfile; # 4721 "./qapi-types.h" 3 4 _Bool # 4721 "./qapi-types.h" has_dhcpstart; char *dhcpstart; # 4723 "./qapi-types.h" 3 4 _Bool # 4723 "./qapi-types.h" has_dns; char *dns; # 4725 "./qapi-types.h" 3 4 _Bool # 4725 "./qapi-types.h" has_dnssearch; StringList *dnssearch; # 4727 "./qapi-types.h" 3 4 _Bool # 4727 "./qapi-types.h" has_domainname; char *domainname; # 4729 "./qapi-types.h" 3 4 _Bool # 4729 "./qapi-types.h" has_ipv6_prefix; char *ipv6_prefix; # 4731 "./qapi-types.h" 3 4 _Bool # 4731 "./qapi-types.h" has_ipv6_prefixlen; int64_t ipv6_prefixlen; # 4733 "./qapi-types.h" 3 4 _Bool # 4733 "./qapi-types.h" has_ipv6_host; char *ipv6_host; # 4735 "./qapi-types.h" 3 4 _Bool # 4735 "./qapi-types.h" has_ipv6_dns; char *ipv6_dns; # 4737 "./qapi-types.h" 3 4 _Bool # 4737 "./qapi-types.h" has_smb; char *smb; # 4739 "./qapi-types.h" 3 4 _Bool # 4739 "./qapi-types.h" has_smbserver; char *smbserver; # 4741 "./qapi-types.h" 3 4 _Bool # 4741 "./qapi-types.h" has_hostfwd; StringList *hostfwd; # 4743 "./qapi-types.h" 3 4 _Bool # 4743 "./qapi-types.h" has_guestfwd; StringList *guestfwd; }; struct NetdevTapOptions { # 4748 "./qapi-types.h" 3 4 _Bool # 4748 "./qapi-types.h" has_ifname; char *ifname; # 4750 "./qapi-types.h" 3 4 _Bool # 4750 "./qapi-types.h" has_fd; char *fd; # 4752 "./qapi-types.h" 3 4 _Bool # 4752 "./qapi-types.h" has_fds; char *fds; # 4754 "./qapi-types.h" 3 4 _Bool # 4754 "./qapi-types.h" has_script; char *script; # 4756 "./qapi-types.h" 3 4 _Bool # 4756 "./qapi-types.h" has_downscript; char *downscript; # 4758 "./qapi-types.h" 3 4 _Bool # 4758 "./qapi-types.h" has_br; char *br; # 4760 "./qapi-types.h" 3 4 _Bool # 4760 "./qapi-types.h" has_helper; char *helper; # 4762 "./qapi-types.h" 3 4 _Bool # 4762 "./qapi-types.h" has_sndbuf; uint64_t sndbuf; # 4764 "./qapi-types.h" 3 4 _Bool # 4764 "./qapi-types.h" has_vnet_hdr; # 4765 "./qapi-types.h" 3 4 _Bool # 4765 "./qapi-types.h" vnet_hdr; # 4766 "./qapi-types.h" 3 4 _Bool # 4766 "./qapi-types.h" has_vhost; # 4767 "./qapi-types.h" 3 4 _Bool # 4767 "./qapi-types.h" vhost; # 4768 "./qapi-types.h" 3 4 _Bool # 4768 "./qapi-types.h" has_vhostfd; char *vhostfd; # 4770 "./qapi-types.h" 3 4 _Bool # 4770 "./qapi-types.h" has_vhostfds; char *vhostfds; # 4772 "./qapi-types.h" 3 4 _Bool # 4772 "./qapi-types.h" has_vhostforce; # 4773 "./qapi-types.h" 3 4 _Bool # 4773 "./qapi-types.h" vhostforce; # 4774 "./qapi-types.h" 3 4 _Bool # 4774 "./qapi-types.h" has_queues; uint32_t queues; # 4776 "./qapi-types.h" 3 4 _Bool # 4776 "./qapi-types.h" has_poll_us; uint32_t poll_us; }; struct NetdevL2TPv3Options { char *src; char *dst; # 4783 "./qapi-types.h" 3 4 _Bool # 4783 "./qapi-types.h" has_srcport; char *srcport; # 4785 "./qapi-types.h" 3 4 _Bool # 4785 "./qapi-types.h" has_dstport; char *dstport; # 4787 "./qapi-types.h" 3 4 _Bool # 4787 "./qapi-types.h" has_ipv6; # 4788 "./qapi-types.h" 3 4 _Bool # 4788 "./qapi-types.h" ipv6; # 4789 "./qapi-types.h" 3 4 _Bool # 4789 "./qapi-types.h" has_udp; # 4790 "./qapi-types.h" 3 4 _Bool # 4790 "./qapi-types.h" udp; # 4791 "./qapi-types.h" 3 4 _Bool # 4791 "./qapi-types.h" has_cookie64; # 4792 "./qapi-types.h" 3 4 _Bool # 4792 "./qapi-types.h" cookie64; # 4793 "./qapi-types.h" 3 4 _Bool # 4793 "./qapi-types.h" has_counter; # 4794 "./qapi-types.h" 3 4 _Bool # 4794 "./qapi-types.h" counter; # 4795 "./qapi-types.h" 3 4 _Bool # 4795 "./qapi-types.h" has_pincounter; # 4796 "./qapi-types.h" 3 4 _Bool # 4796 "./qapi-types.h" pincounter; # 4797 "./qapi-types.h" 3 4 _Bool # 4797 "./qapi-types.h" has_txcookie; uint64_t txcookie; # 4799 "./qapi-types.h" 3 4 _Bool # 4799 "./qapi-types.h" has_rxcookie; uint64_t rxcookie; uint32_t txsession; # 4802 "./qapi-types.h" 3 4 _Bool # 4802 "./qapi-types.h" has_rxsession; uint32_t rxsession; # 4804 "./qapi-types.h" 3 4 _Bool # 4804 "./qapi-types.h" has_offset; uint32_t offset; }; struct NetdevSocketOptions { # 4809 "./qapi-types.h" 3 4 _Bool # 4809 "./qapi-types.h" has_fd; char *fd; # 4811 "./qapi-types.h" 3 4 _Bool # 4811 "./qapi-types.h" has_listen; char *listen; # 4813 "./qapi-types.h" 3 4 _Bool # 4813 "./qapi-types.h" has_connect; char *connect; # 4815 "./qapi-types.h" 3 4 _Bool # 4815 "./qapi-types.h" has_mcast; char *mcast; # 4817 "./qapi-types.h" 3 4 _Bool # 4817 "./qapi-types.h" has_localaddr; char *localaddr; # 4819 "./qapi-types.h" 3 4 _Bool # 4819 "./qapi-types.h" has_udp; char *udp; }; struct NetdevVdeOptions { # 4824 "./qapi-types.h" 3 4 _Bool # 4824 "./qapi-types.h" has_sock; char *sock; # 4826 "./qapi-types.h" 3 4 _Bool # 4826 "./qapi-types.h" has_port; uint16_t port; # 4828 "./qapi-types.h" 3 4 _Bool # 4828 "./qapi-types.h" has_group; char *group; # 4830 "./qapi-types.h" 3 4 _Bool # 4830 "./qapi-types.h" has_mode; uint16_t mode; }; struct NetdevDumpOptions { # 4835 "./qapi-types.h" 3 4 _Bool # 4835 "./qapi-types.h" has_len; uint64_t len; # 4837 "./qapi-types.h" 3 4 _Bool # 4837 "./qapi-types.h" has_file; char *file; }; struct NetdevBridgeOptions { # 4842 "./qapi-types.h" 3 4 _Bool # 4842 "./qapi-types.h" has_br; char *br; # 4844 "./qapi-types.h" 3 4 _Bool # 4844 "./qapi-types.h" has_helper; char *helper; }; struct NetdevNetmapOptions { char *ifname; # 4850 "./qapi-types.h" 3 4 _Bool # 4850 "./qapi-types.h" has_devname; char *devname; }; struct NetdevVhostUserOptions { char *chardev; # 4856 "./qapi-types.h" 3 4 _Bool # 4856 "./qapi-types.h" has_vhostforce; # 4857 "./qapi-types.h" 3 4 _Bool # 4857 "./qapi-types.h" vhostforce; # 4858 "./qapi-types.h" 3 4 _Bool # 4858 "./qapi-types.h" has_queues; int64_t queues; }; struct NetLegacyOptions { NetLegacyOptionsType type; union { /* union tag is @type */ NetdevNoneOptions none; NetLegacyNicOptions nic; NetdevUserOptions user; NetdevTapOptions tap; NetdevL2TPv3Options l2tpv3; NetdevSocketOptions socket; NetdevVdeOptions vde; NetdevDumpOptions dump; NetdevBridgeOptions bridge; NetdevNetmapOptions netmap; NetdevVhostUserOptions vhost_user; } u; }; void qapi_free_NetLegacyOptions(NetLegacyOptions *obj); struct NetdevHubPortOptions { int32_t hubid; }; struct Netdev { char *id; NetClientDriver type; union { /* union tag is @type */ NetdevNoneOptions none; NetLegacyNicOptions nic; NetdevUserOptions user; NetdevTapOptions tap; NetdevL2TPv3Options l2tpv3; NetdevSocketOptions socket; NetdevVdeOptions vde; NetdevDumpOptions dump; NetdevBridgeOptions bridge; NetdevHubPortOptions hubport; NetdevNetmapOptions netmap; NetdevVhostUserOptions vhost_user; } u; }; void qapi_free_Netdev(Netdev *obj); void qapi_free_NetdevBridgeOptions(NetdevBridgeOptions *obj); void qapi_free_NetdevDumpOptions(NetdevDumpOptions *obj); void qapi_free_NetdevHubPortOptions(NetdevHubPortOptions *obj); void qapi_free_NetdevL2TPv3Options(NetdevL2TPv3Options *obj); void qapi_free_NetdevNetmapOptions(NetdevNetmapOptions *obj); void qapi_free_NetdevNoneOptions(NetdevNoneOptions *obj); void qapi_free_NetdevSocketOptions(NetdevSocketOptions *obj); void qapi_free_NetdevTapOptions(NetdevTapOptions *obj); void qapi_free_NetdevUserOptions(NetdevUserOptions *obj); void qapi_free_NetdevVdeOptions(NetdevVdeOptions *obj); void qapi_free_NetdevVhostUserOptions(NetdevVhostUserOptions *obj); struct NumaCpuOptions { /* Members inherited from CpuInstanceProperties: */ # 4930 "./qapi-types.h" 3 4 _Bool # 4930 "./qapi-types.h" has_node_id; int64_t node_id; # 4932 "./qapi-types.h" 3 4 _Bool # 4932 "./qapi-types.h" has_socket_id; int64_t socket_id; # 4934 "./qapi-types.h" 3 4 _Bool # 4934 "./qapi-types.h" has_core_id; int64_t core_id; # 4936 "./qapi-types.h" 3 4 _Bool # 4936 "./qapi-types.h" has_thread_id; int64_t thread_id; /* Own members: */ }; static inline CpuInstanceProperties *qapi_NumaCpuOptions_base(const NumaCpuOptions *obj) { return (CpuInstanceProperties *)obj; } void qapi_free_NumaCpuOptions(NumaCpuOptions *obj); struct NumaDistOptions { uint16_t src; uint16_t dst; uint8_t val; }; void qapi_free_NumaDistOptions(NumaDistOptions *obj); struct NumaNodeOptions { # 4957 "./qapi-types.h" 3 4 _Bool # 4957 "./qapi-types.h" has_nodeid; uint16_t nodeid; # 4959 "./qapi-types.h" 3 4 _Bool # 4959 "./qapi-types.h" has_cpus; uint16List *cpus; # 4961 "./qapi-types.h" 3 4 _Bool # 4961 "./qapi-types.h" has_mem; uint64_t mem; # 4963 "./qapi-types.h" 3 4 _Bool # 4963 "./qapi-types.h" has_memdev; char *memdev; }; void qapi_free_NumaNodeOptions(NumaNodeOptions *obj); struct NumaOptions { NumaOptionsType type; union { /* union tag is @type */ NumaNodeOptions node; NumaDistOptions dist; NumaCpuOptions cpu; } u; }; void qapi_free_NumaOptions(NumaOptions *obj); struct ObjectPropertyInfo { char *name; char *type; }; void qapi_free_ObjectPropertyInfo(ObjectPropertyInfo *obj); struct ObjectPropertyInfoList { ObjectPropertyInfoList *next; ObjectPropertyInfo *value; }; void qapi_free_ObjectPropertyInfoList(ObjectPropertyInfoList *obj); struct ObjectTypeInfo { char *name; # 4996 "./qapi-types.h" 3 4 _Bool # 4996 "./qapi-types.h" has_abstract; # 4997 "./qapi-types.h" 3 4 _Bool # 4997 "./qapi-types.h" abstract; # 4998 "./qapi-types.h" 3 4 _Bool # 4998 "./qapi-types.h" has_parent; char *parent; }; void qapi_free_ObjectTypeInfo(ObjectTypeInfo *obj); struct ObjectTypeInfoList { ObjectTypeInfoList *next; ObjectTypeInfo *value; }; void qapi_free_ObjectTypeInfoList(ObjectTypeInfoList *obj); struct PCDIMMDeviceInfo { # 5012 "./qapi-types.h" 3 4 _Bool # 5012 "./qapi-types.h" has_id; char *id; int64_t addr; int64_t size; int64_t slot; int64_t node; char *memdev; # 5019 "./qapi-types.h" 3 4 _Bool # 5019 "./qapi-types.h" hotplugged; # 5020 "./qapi-types.h" 3 4 _Bool # 5020 "./qapi-types.h" hotpluggable; }; void qapi_free_PCDIMMDeviceInfo(PCDIMMDeviceInfo *obj); struct PciBridgeInfo { PciBusInfo *bus; # 5027 "./qapi-types.h" 3 4 _Bool # 5027 "./qapi-types.h" has_devices; PciDeviceInfoList *devices; }; void qapi_free_PciBridgeInfo(PciBridgeInfo *obj); struct PciBusInfo { int64_t number; int64_t secondary; int64_t subordinate; PciMemoryRange *io_range; PciMemoryRange *memory_range; PciMemoryRange *prefetchable_range; }; void qapi_free_PciBusInfo(PciBusInfo *obj); struct PciDeviceClass { # 5045 "./qapi-types.h" 3 4 _Bool # 5045 "./qapi-types.h" has_desc; char *desc; int64_t q_class; }; void qapi_free_PciDeviceClass(PciDeviceClass *obj); struct PciDeviceId { int64_t device; int64_t vendor; }; void qapi_free_PciDeviceId(PciDeviceId *obj); struct PciDeviceInfo { int64_t bus; int64_t slot; int64_t function; PciDeviceClass *class_info; PciDeviceId *id; # 5065 "./qapi-types.h" 3 4 _Bool # 5065 "./qapi-types.h" has_irq; int64_t irq; char *qdev_id; # 5068 "./qapi-types.h" 3 4 _Bool # 5068 "./qapi-types.h" has_pci_bridge; PciBridgeInfo *pci_bridge; PciMemoryRegionList *regions; }; void qapi_free_PciDeviceInfo(PciDeviceInfo *obj); struct PciDeviceInfoList { PciDeviceInfoList *next; PciDeviceInfo *value; }; void qapi_free_PciDeviceInfoList(PciDeviceInfoList *obj); struct PciInfo { int64_t bus; PciDeviceInfoList *devices; }; void qapi_free_PciInfo(PciInfo *obj); struct PciInfoList { PciInfoList *next; PciInfo *value; }; void qapi_free_PciInfoList(PciInfoList *obj); struct PciMemoryRange { int64_t base; int64_t limit; }; void qapi_free_PciMemoryRange(PciMemoryRange *obj); struct PciMemoryRegion { int64_t bar; char *type; int64_t address; int64_t size; # 5108 "./qapi-types.h" 3 4 _Bool # 5108 "./qapi-types.h" has_prefetch; # 5109 "./qapi-types.h" 3 4 _Bool # 5109 "./qapi-types.h" prefetch; # 5110 "./qapi-types.h" 3 4 _Bool # 5110 "./qapi-types.h" has_mem_type_64; # 5111 "./qapi-types.h" 3 4 _Bool # 5111 "./qapi-types.h" mem_type_64; }; void qapi_free_PciMemoryRegion(PciMemoryRegion *obj); struct PciMemoryRegionList { PciMemoryRegionList *next; PciMemoryRegion *value; }; void qapi_free_PciMemoryRegionList(PciMemoryRegionList *obj); struct QCryptoBlockCreateOptionsLUKS { /* Members inherited from QCryptoBlockOptionsLUKS: */ # 5125 "./qapi-types.h" 3 4 _Bool # 5125 "./qapi-types.h" has_key_secret; char *key_secret; /* Own members: */ # 5128 "./qapi-types.h" 3 4 _Bool # 5128 "./qapi-types.h" has_cipher_alg; QCryptoCipherAlgorithm cipher_alg; # 5130 "./qapi-types.h" 3 4 _Bool # 5130 "./qapi-types.h" has_cipher_mode; QCryptoCipherMode cipher_mode; # 5132 "./qapi-types.h" 3 4 _Bool # 5132 "./qapi-types.h" has_ivgen_alg; QCryptoIVGenAlgorithm ivgen_alg; # 5134 "./qapi-types.h" 3 4 _Bool # 5134 "./qapi-types.h" has_ivgen_hash_alg; QCryptoHashAlgorithm ivgen_hash_alg; # 5136 "./qapi-types.h" 3 4 _Bool # 5136 "./qapi-types.h" has_hash_alg; QCryptoHashAlgorithm hash_alg; # 5138 "./qapi-types.h" 3 4 _Bool # 5138 "./qapi-types.h" has_iter_time; int64_t iter_time; }; struct QCryptoBlockCreateOptions { /* Members inherited from QCryptoBlockOptionsBase: */ QCryptoBlockFormat format; /* Own members: */ union { /* union tag is @format */ QCryptoBlockOptionsQCow qcow; QCryptoBlockCreateOptionsLUKS luks; } u; }; static inline QCryptoBlockOptionsBase *qapi_QCryptoBlockCreateOptions_base(const QCryptoBlockCreateOptions *obj) { return (QCryptoBlockOptionsBase *)obj; } void qapi_free_QCryptoBlockCreateOptions(QCryptoBlockCreateOptions *obj); static inline QCryptoBlockOptionsLUKS *qapi_QCryptoBlockCreateOptionsLUKS_base(const QCryptoBlockCreateOptionsLUKS *obj) { return (QCryptoBlockOptionsLUKS *)obj; } void qapi_free_QCryptoBlockCreateOptionsLUKS(QCryptoBlockCreateOptionsLUKS *obj); struct QCryptoBlockInfo { /* Members inherited from QCryptoBlockInfoBase: */ QCryptoBlockFormat format; /* Own members: */ union { /* union tag is @format */ QCryptoBlockInfoQCow qcow; QCryptoBlockInfoLUKS luks; } u; }; static inline QCryptoBlockInfoBase *qapi_QCryptoBlockInfo_base(const QCryptoBlockInfo *obj) { return (QCryptoBlockInfoBase *)obj; } void qapi_free_QCryptoBlockInfo(QCryptoBlockInfo *obj); struct QCryptoBlockInfoBase { QCryptoBlockFormat format; }; void qapi_free_QCryptoBlockInfoBase(QCryptoBlockInfoBase *obj); void qapi_free_QCryptoBlockInfoLUKS(QCryptoBlockInfoLUKS *obj); struct QCryptoBlockInfoLUKSSlot { # 5192 "./qapi-types.h" 3 4 _Bool # 5192 "./qapi-types.h" active; # 5193 "./qapi-types.h" 3 4 _Bool # 5193 "./qapi-types.h" has_iters; int64_t iters; # 5195 "./qapi-types.h" 3 4 _Bool # 5195 "./qapi-types.h" has_stripes; int64_t stripes; int64_t key_offset; }; void qapi_free_QCryptoBlockInfoLUKSSlot(QCryptoBlockInfoLUKSSlot *obj); struct QCryptoBlockInfoLUKSSlotList { QCryptoBlockInfoLUKSSlotList *next; QCryptoBlockInfoLUKSSlot *value; }; void qapi_free_QCryptoBlockInfoLUKSSlotList(QCryptoBlockInfoLUKSSlotList *obj); void qapi_free_QCryptoBlockInfoQCow(QCryptoBlockInfoQCow *obj); struct QCryptoBlockOpenOptions { /* Members inherited from QCryptoBlockOptionsBase: */ QCryptoBlockFormat format; /* Own members: */ union { /* union tag is @format */ QCryptoBlockOptionsQCow qcow; QCryptoBlockOptionsLUKS luks; } u; }; static inline QCryptoBlockOptionsBase *qapi_QCryptoBlockOpenOptions_base(const QCryptoBlockOpenOptions *obj) { return (QCryptoBlockOptionsBase *)obj; } void qapi_free_QCryptoBlockOpenOptions(QCryptoBlockOpenOptions *obj); struct QCryptoBlockOptionsBase { QCryptoBlockFormat format; }; void qapi_free_QCryptoBlockOptionsBase(QCryptoBlockOptionsBase *obj); void qapi_free_QCryptoBlockOptionsLUKS(QCryptoBlockOptionsLUKS *obj); void qapi_free_QCryptoBlockOptionsQCow(QCryptoBlockOptionsQCow *obj); struct Qcow2OverlapCheckFlags { # 5239 "./qapi-types.h" 3 4 _Bool # 5239 "./qapi-types.h" has_q_template; Qcow2OverlapCheckMode q_template; # 5241 "./qapi-types.h" 3 4 _Bool # 5241 "./qapi-types.h" has_main_header; # 5242 "./qapi-types.h" 3 4 _Bool # 5242 "./qapi-types.h" main_header; # 5243 "./qapi-types.h" 3 4 _Bool # 5243 "./qapi-types.h" has_active_l1; # 5244 "./qapi-types.h" 3 4 _Bool # 5244 "./qapi-types.h" active_l1; # 5245 "./qapi-types.h" 3 4 _Bool # 5245 "./qapi-types.h" has_active_l2; # 5246 "./qapi-types.h" 3 4 _Bool # 5246 "./qapi-types.h" active_l2; # 5247 "./qapi-types.h" 3 4 _Bool # 5247 "./qapi-types.h" has_refcount_table; # 5248 "./qapi-types.h" 3 4 _Bool # 5248 "./qapi-types.h" refcount_table; # 5249 "./qapi-types.h" 3 4 _Bool # 5249 "./qapi-types.h" has_refcount_block; # 5250 "./qapi-types.h" 3 4 _Bool # 5250 "./qapi-types.h" refcount_block; # 5251 "./qapi-types.h" 3 4 _Bool # 5251 "./qapi-types.h" has_snapshot_table; # 5252 "./qapi-types.h" 3 4 _Bool # 5252 "./qapi-types.h" snapshot_table; # 5253 "./qapi-types.h" 3 4 _Bool # 5253 "./qapi-types.h" has_inactive_l1; # 5254 "./qapi-types.h" 3 4 _Bool # 5254 "./qapi-types.h" inactive_l1; # 5255 "./qapi-types.h" 3 4 _Bool # 5255 "./qapi-types.h" has_inactive_l2; # 5256 "./qapi-types.h" 3 4 _Bool # 5256 "./qapi-types.h" inactive_l2; }; void qapi_free_Qcow2OverlapCheckFlags(Qcow2OverlapCheckFlags *obj); struct Qcow2OverlapChecks { QType type; union { /* union tag is @type */ Qcow2OverlapCheckFlags flags; Qcow2OverlapCheckMode mode; } u; }; void qapi_free_Qcow2OverlapChecks(Qcow2OverlapChecks *obj); struct ReplicationStatus { # 5272 "./qapi-types.h" 3 4 _Bool # 5272 "./qapi-types.h" error; # 5273 "./qapi-types.h" 3 4 _Bool # 5273 "./qapi-types.h" has_desc; char *desc; }; void qapi_free_ReplicationStatus(ReplicationStatus *obj); struct RockerOfDpaFlow { uint64_t cookie; uint64_t hits; RockerOfDpaFlowKey *key; RockerOfDpaFlowMask *mask; RockerOfDpaFlowAction *action; }; void qapi_free_RockerOfDpaFlow(RockerOfDpaFlow *obj); struct RockerOfDpaFlowAction { # 5290 "./qapi-types.h" 3 4 _Bool # 5290 "./qapi-types.h" has_goto_tbl; uint32_t goto_tbl; # 5292 "./qapi-types.h" 3 4 _Bool # 5292 "./qapi-types.h" has_group_id; uint32_t group_id; # 5294 "./qapi-types.h" 3 4 _Bool # 5294 "./qapi-types.h" has_tunnel_lport; uint32_t tunnel_lport; # 5296 "./qapi-types.h" 3 4 _Bool # 5296 "./qapi-types.h" has_vlan_id; uint16_t vlan_id; # 5298 "./qapi-types.h" 3 4 _Bool # 5298 "./qapi-types.h" has_new_vlan_id; uint16_t new_vlan_id; # 5300 "./qapi-types.h" 3 4 _Bool # 5300 "./qapi-types.h" has_out_pport; uint32_t out_pport; }; void qapi_free_RockerOfDpaFlowAction(RockerOfDpaFlowAction *obj); struct RockerOfDpaFlowKey { uint32_t priority; uint32_t tbl_id; # 5309 "./qapi-types.h" 3 4 _Bool # 5309 "./qapi-types.h" has_in_pport; uint32_t in_pport; # 5311 "./qapi-types.h" 3 4 _Bool # 5311 "./qapi-types.h" has_tunnel_id; uint32_t tunnel_id; # 5313 "./qapi-types.h" 3 4 _Bool # 5313 "./qapi-types.h" has_vlan_id; uint16_t vlan_id; # 5315 "./qapi-types.h" 3 4 _Bool # 5315 "./qapi-types.h" has_eth_type; uint16_t eth_type; # 5317 "./qapi-types.h" 3 4 _Bool # 5317 "./qapi-types.h" has_eth_src; char *eth_src; # 5319 "./qapi-types.h" 3 4 _Bool # 5319 "./qapi-types.h" has_eth_dst; char *eth_dst; # 5321 "./qapi-types.h" 3 4 _Bool # 5321 "./qapi-types.h" has_ip_proto; uint8_t ip_proto; # 5323 "./qapi-types.h" 3 4 _Bool # 5323 "./qapi-types.h" has_ip_tos; uint8_t ip_tos; # 5325 "./qapi-types.h" 3 4 _Bool # 5325 "./qapi-types.h" has_ip_dst; char *ip_dst; }; void qapi_free_RockerOfDpaFlowKey(RockerOfDpaFlowKey *obj); struct RockerOfDpaFlowList { RockerOfDpaFlowList *next; RockerOfDpaFlow *value; }; void qapi_free_RockerOfDpaFlowList(RockerOfDpaFlowList *obj); struct RockerOfDpaFlowMask { # 5339 "./qapi-types.h" 3 4 _Bool # 5339 "./qapi-types.h" has_in_pport; uint32_t in_pport; # 5341 "./qapi-types.h" 3 4 _Bool # 5341 "./qapi-types.h" has_tunnel_id; uint32_t tunnel_id; # 5343 "./qapi-types.h" 3 4 _Bool # 5343 "./qapi-types.h" has_vlan_id; uint16_t vlan_id; # 5345 "./qapi-types.h" 3 4 _Bool # 5345 "./qapi-types.h" has_eth_src; char *eth_src; # 5347 "./qapi-types.h" 3 4 _Bool # 5347 "./qapi-types.h" has_eth_dst; char *eth_dst; # 5349 "./qapi-types.h" 3 4 _Bool # 5349 "./qapi-types.h" has_ip_proto; uint8_t ip_proto; # 5351 "./qapi-types.h" 3 4 _Bool # 5351 "./qapi-types.h" has_ip_tos; uint8_t ip_tos; }; void qapi_free_RockerOfDpaFlowMask(RockerOfDpaFlowMask *obj); struct RockerOfDpaGroup { uint32_t id; uint8_t type; # 5360 "./qapi-types.h" 3 4 _Bool # 5360 "./qapi-types.h" has_vlan_id; uint16_t vlan_id; # 5362 "./qapi-types.h" 3 4 _Bool # 5362 "./qapi-types.h" has_pport; uint32_t pport; # 5364 "./qapi-types.h" 3 4 _Bool # 5364 "./qapi-types.h" has_index; uint32_t index; # 5366 "./qapi-types.h" 3 4 _Bool # 5366 "./qapi-types.h" has_out_pport; uint32_t out_pport; # 5368 "./qapi-types.h" 3 4 _Bool # 5368 "./qapi-types.h" has_group_id; uint32_t group_id; # 5370 "./qapi-types.h" 3 4 _Bool # 5370 "./qapi-types.h" has_set_vlan_id; uint16_t set_vlan_id; # 5372 "./qapi-types.h" 3 4 _Bool # 5372 "./qapi-types.h" has_pop_vlan; uint8_t pop_vlan; # 5374 "./qapi-types.h" 3 4 _Bool # 5374 "./qapi-types.h" has_group_ids; uint32List *group_ids; # 5376 "./qapi-types.h" 3 4 _Bool # 5376 "./qapi-types.h" has_set_eth_src; char *set_eth_src; # 5378 "./qapi-types.h" 3 4 _Bool # 5378 "./qapi-types.h" has_set_eth_dst; char *set_eth_dst; # 5380 "./qapi-types.h" 3 4 _Bool # 5380 "./qapi-types.h" has_ttl_check; uint8_t ttl_check; }; void qapi_free_RockerOfDpaGroup(RockerOfDpaGroup *obj); struct RockerOfDpaGroupList { RockerOfDpaGroupList *next; RockerOfDpaGroup *value; }; void qapi_free_RockerOfDpaGroupList(RockerOfDpaGroupList *obj); struct RockerPort { char *name; # 5395 "./qapi-types.h" 3 4 _Bool # 5395 "./qapi-types.h" enabled; # 5396 "./qapi-types.h" 3 4 _Bool # 5396 "./qapi-types.h" link_up; uint32_t speed; RockerPortDuplex duplex; RockerPortAutoneg autoneg; }; void qapi_free_RockerPort(RockerPort *obj); struct RockerPortList { RockerPortList *next; RockerPort *value; }; void qapi_free_RockerPortList(RockerPortList *obj); struct RockerSwitch { char *name; uint64_t id; uint32_t ports; }; void qapi_free_RockerSwitch(RockerSwitch *obj); struct RxFilterInfo { char *name; # 5421 "./qapi-types.h" 3 4 _Bool # 5421 "./qapi-types.h" promiscuous; RxState multicast; RxState unicast; RxState vlan; # 5425 "./qapi-types.h" 3 4 _Bool # 5425 "./qapi-types.h" broadcast_allowed; # 5426 "./qapi-types.h" 3 4 _Bool # 5426 "./qapi-types.h" multicast_overflow; # 5427 "./qapi-types.h" 3 4 _Bool # 5427 "./qapi-types.h" unicast_overflow; char *main_mac; intList *vlan_table; strList *unicast_table; strList *multicast_table; }; void qapi_free_RxFilterInfo(RxFilterInfo *obj); struct RxFilterInfoList { RxFilterInfoList *next; RxFilterInfo *value; }; void qapi_free_RxFilterInfoList(RxFilterInfoList *obj); struct SchemaInfoBuiltin { JSONType json_type; }; struct SchemaInfoEnum { strList *values; }; struct SchemaInfoArray { char *element_type; }; struct SchemaInfoObject { SchemaInfoObjectMemberList *members; # 5457 "./qapi-types.h" 3 4 _Bool # 5457 "./qapi-types.h" has_tag; char *tag; # 5459 "./qapi-types.h" 3 4 _Bool # 5459 "./qapi-types.h" has_variants; SchemaInfoObjectVariantList *variants; }; struct SchemaInfoAlternate { SchemaInfoAlternateMemberList *members; }; struct SchemaInfoCommand { char *arg_type; char *ret_type; }; struct SchemaInfoEvent { char *arg_type; }; struct SchemaInfo { char *name; SchemaMetaType meta_type; union { /* union tag is @meta_type */ SchemaInfoBuiltin builtin; SchemaInfoEnum q_enum; SchemaInfoArray array; SchemaInfoObject object; SchemaInfoAlternate alternate; SchemaInfoCommand command; SchemaInfoEvent event; } u; }; void qapi_free_SchemaInfo(SchemaInfo *obj); void qapi_free_SchemaInfoAlternate(SchemaInfoAlternate *obj); struct SchemaInfoAlternateMember { char *type; }; void qapi_free_SchemaInfoAlternateMember(SchemaInfoAlternateMember *obj); struct SchemaInfoAlternateMemberList { SchemaInfoAlternateMemberList *next; SchemaInfoAlternateMember *value; }; void qapi_free_SchemaInfoAlternateMemberList(SchemaInfoAlternateMemberList *obj); void qapi_free_SchemaInfoArray(SchemaInfoArray *obj); void qapi_free_SchemaInfoBuiltin(SchemaInfoBuiltin *obj); void qapi_free_SchemaInfoCommand(SchemaInfoCommand *obj); void qapi_free_SchemaInfoEnum(SchemaInfoEnum *obj); void qapi_free_SchemaInfoEvent(SchemaInfoEvent *obj); struct SchemaInfoList { SchemaInfoList *next; SchemaInfo *value; }; void qapi_free_SchemaInfoList(SchemaInfoList *obj); void qapi_free_SchemaInfoObject(SchemaInfoObject *obj); struct SchemaInfoObjectMember { char *name; char *type; # 5529 "./qapi-types.h" 3 4 _Bool # 5529 "./qapi-types.h" has_q_default; QObject *q_default; }; void qapi_free_SchemaInfoObjectMember(SchemaInfoObjectMember *obj); struct SchemaInfoObjectMemberList { SchemaInfoObjectMemberList *next; SchemaInfoObjectMember *value; }; void qapi_free_SchemaInfoObjectMemberList(SchemaInfoObjectMemberList *obj); struct SchemaInfoObjectVariant { char *q_case; char *type; }; void qapi_free_SchemaInfoObjectVariant(SchemaInfoObjectVariant *obj); struct SchemaInfoObjectVariantList { SchemaInfoObjectVariantList *next; SchemaInfoObjectVariant *value; }; void qapi_free_SchemaInfoObjectVariantList(SchemaInfoObjectVariantList *obj); struct SnapshotInfo { char *id; char *name; int64_t vm_state_size; int64_t date_sec; int64_t date_nsec; int64_t vm_clock_sec; int64_t vm_clock_nsec; }; void qapi_free_SnapshotInfo(SnapshotInfo *obj); struct SnapshotInfoList { SnapshotInfoList *next; SnapshotInfo *value; }; void qapi_free_SnapshotInfoList(SnapshotInfoList *obj); struct UnixSocketAddress { char *path; }; struct VsockSocketAddress { char *cid; char *port; }; struct String { char *str; }; struct SocketAddress { SocketAddressType type; union { /* union tag is @type */ InetSocketAddress inet; UnixSocketAddress q_unix; VsockSocketAddress vsock; String fd; } u; }; void qapi_free_SocketAddress(SocketAddress *obj); struct q_obj_InetSocketAddress_wrapper { InetSocketAddress *data; }; struct q_obj_UnixSocketAddress_wrapper { UnixSocketAddress *data; }; struct q_obj_VsockSocketAddress_wrapper { VsockSocketAddress *data; }; struct q_obj_String_wrapper { String *data; }; struct SocketAddressLegacy { SocketAddressLegacyKind type; union { /* union tag is @type */ q_obj_InetSocketAddress_wrapper inet; q_obj_UnixSocketAddress_wrapper q_unix; q_obj_VsockSocketAddress_wrapper vsock; q_obj_String_wrapper fd; } u; }; void qapi_free_SocketAddressLegacy(SocketAddressLegacy *obj); struct SocketAddressList { SocketAddressList *next; SocketAddress *value; }; void qapi_free_SocketAddressList(SocketAddressList *obj); struct SpiceBasicInfo { char *host; char *port; NetworkAddressFamily family; }; void qapi_free_SpiceBasicInfo(SpiceBasicInfo *obj); struct SpiceChannel { /* Members inherited from SpiceBasicInfo: */ char *host; char *port; NetworkAddressFamily family; /* Own members: */ int64_t connection_id; int64_t channel_type; int64_t channel_id; # 5652 "./qapi-types.h" 3 4 _Bool # 5652 "./qapi-types.h" tls; }; static inline SpiceBasicInfo *qapi_SpiceChannel_base(const SpiceChannel *obj) { return (SpiceBasicInfo *)obj; } void qapi_free_SpiceChannel(SpiceChannel *obj); struct SpiceChannelList { SpiceChannelList *next; SpiceChannel *value; }; void qapi_free_SpiceChannelList(SpiceChannelList *obj); struct SpiceInfo { # 5670 "./qapi-types.h" 3 4 _Bool # 5670 "./qapi-types.h" enabled; # 5671 "./qapi-types.h" 3 4 _Bool # 5671 "./qapi-types.h" migrated; # 5672 "./qapi-types.h" 3 4 _Bool # 5672 "./qapi-types.h" has_host; char *host; # 5674 "./qapi-types.h" 3 4 _Bool # 5674 "./qapi-types.h" has_port; int64_t port; # 5676 "./qapi-types.h" 3 4 _Bool # 5676 "./qapi-types.h" has_tls_port; int64_t tls_port; # 5678 "./qapi-types.h" 3 4 _Bool # 5678 "./qapi-types.h" has_auth; char *auth; # 5680 "./qapi-types.h" 3 4 _Bool # 5680 "./qapi-types.h" has_compiled_version; char *compiled_version; SpiceQueryMouseMode mouse_mode; # 5683 "./qapi-types.h" 3 4 _Bool # 5683 "./qapi-types.h" has_channels; SpiceChannelList *channels; }; void qapi_free_SpiceInfo(SpiceInfo *obj); struct SpiceServerInfo { /* Members inherited from SpiceBasicInfo: */ char *host; char *port; NetworkAddressFamily family; /* Own members: */ # 5695 "./qapi-types.h" 3 4 _Bool # 5695 "./qapi-types.h" has_auth; char *auth; }; static inline SpiceBasicInfo *qapi_SpiceServerInfo_base(const SpiceServerInfo *obj) { return (SpiceBasicInfo *)obj; } void qapi_free_SpiceServerInfo(SpiceServerInfo *obj); struct StatusInfo { # 5707 "./qapi-types.h" 3 4 _Bool # 5707 "./qapi-types.h" running; # 5708 "./qapi-types.h" 3 4 _Bool # 5708 "./qapi-types.h" singlestep; RunState status; }; void qapi_free_StatusInfo(StatusInfo *obj); struct StrOrNull { QType type; union { /* union tag is @type */ char *s; QNull *n; } u; }; void qapi_free_StrOrNull(StrOrNull *obj); void qapi_free_String(String *obj); struct StringList { StringList *next; String *value; }; void qapi_free_StringList(StringList *obj); struct TPMEmulatorOptions { char *chardev; }; void qapi_free_TPMEmulatorOptions(TPMEmulatorOptions *obj); struct TPMInfo { char *id; TpmModel model; TpmTypeOptions *options; }; void qapi_free_TPMInfo(TPMInfo *obj); struct TPMInfoList { TPMInfoList *next; TPMInfo *value; }; void qapi_free_TPMInfoList(TPMInfoList *obj); struct TPMPassthroughOptions { # 5755 "./qapi-types.h" 3 4 _Bool # 5755 "./qapi-types.h" has_path; char *path; # 5757 "./qapi-types.h" 3 4 _Bool # 5757 "./qapi-types.h" has_cancel_path; char *cancel_path; }; void qapi_free_TPMPassthroughOptions(TPMPassthroughOptions *obj); struct TargetInfo { char *arch; }; void qapi_free_TargetInfo(TargetInfo *obj); struct ThrottleLimits { # 5770 "./qapi-types.h" 3 4 _Bool # 5770 "./qapi-types.h" has_iops_total; int64_t iops_total; # 5772 "./qapi-types.h" 3 4 _Bool # 5772 "./qapi-types.h" has_iops_total_max; int64_t iops_total_max; # 5774 "./qapi-types.h" 3 4 _Bool # 5774 "./qapi-types.h" has_iops_total_max_length; int64_t iops_total_max_length; # 5776 "./qapi-types.h" 3 4 _Bool # 5776 "./qapi-types.h" has_iops_read; int64_t iops_read; # 5778 "./qapi-types.h" 3 4 _Bool # 5778 "./qapi-types.h" has_iops_read_max; int64_t iops_read_max; # 5780 "./qapi-types.h" 3 4 _Bool # 5780 "./qapi-types.h" has_iops_read_max_length; int64_t iops_read_max_length; # 5782 "./qapi-types.h" 3 4 _Bool # 5782 "./qapi-types.h" has_iops_write; int64_t iops_write; # 5784 "./qapi-types.h" 3 4 _Bool # 5784 "./qapi-types.h" has_iops_write_max; int64_t iops_write_max; # 5786 "./qapi-types.h" 3 4 _Bool # 5786 "./qapi-types.h" has_iops_write_max_length; int64_t iops_write_max_length; # 5788 "./qapi-types.h" 3 4 _Bool # 5788 "./qapi-types.h" has_bps_total; int64_t bps_total; # 5790 "./qapi-types.h" 3 4 _Bool # 5790 "./qapi-types.h" has_bps_total_max; int64_t bps_total_max; # 5792 "./qapi-types.h" 3 4 _Bool # 5792 "./qapi-types.h" has_bps_total_max_length; int64_t bps_total_max_length; # 5794 "./qapi-types.h" 3 4 _Bool # 5794 "./qapi-types.h" has_bps_read; int64_t bps_read; # 5796 "./qapi-types.h" 3 4 _Bool # 5796 "./qapi-types.h" has_bps_read_max; int64_t bps_read_max; # 5798 "./qapi-types.h" 3 4 _Bool # 5798 "./qapi-types.h" has_bps_read_max_length; int64_t bps_read_max_length; # 5800 "./qapi-types.h" 3 4 _Bool # 5800 "./qapi-types.h" has_bps_write; int64_t bps_write; # 5802 "./qapi-types.h" 3 4 _Bool # 5802 "./qapi-types.h" has_bps_write_max; int64_t bps_write_max; # 5804 "./qapi-types.h" 3 4 _Bool # 5804 "./qapi-types.h" has_bps_write_max_length; int64_t bps_write_max_length; # 5806 "./qapi-types.h" 3 4 _Bool # 5806 "./qapi-types.h" has_iops_size; int64_t iops_size; }; void qapi_free_ThrottleLimits(ThrottleLimits *obj); struct TpmModelList { TpmModelList *next; TpmModel value; }; void qapi_free_TpmModelList(TpmModelList *obj); struct TpmTypeList { TpmTypeList *next; TpmType value; }; void qapi_free_TpmTypeList(TpmTypeList *obj); struct q_obj_TPMPassthroughOptions_wrapper { TPMPassthroughOptions *data; }; struct q_obj_TPMEmulatorOptions_wrapper { TPMEmulatorOptions *data; }; struct TpmTypeOptions { TpmTypeOptionsKind type; union { /* union tag is @type */ q_obj_TPMPassthroughOptions_wrapper passthrough; q_obj_TPMEmulatorOptions_wrapper emulator; } u; }; void qapi_free_TpmTypeOptions(TpmTypeOptions *obj); struct TraceEventInfo { char *name; TraceEventState state; # 5847 "./qapi-types.h" 3 4 _Bool # 5847 "./qapi-types.h" vcpu; }; void qapi_free_TraceEventInfo(TraceEventInfo *obj); struct TraceEventInfoList { TraceEventInfoList *next; TraceEventInfo *value; }; void qapi_free_TraceEventInfoList(TraceEventInfoList *obj); struct q_obj_Abort_wrapper { Abort *data; }; struct q_obj_BlockDirtyBitmapAdd_wrapper { BlockDirtyBitmapAdd *data; }; struct q_obj_BlockDirtyBitmap_wrapper { BlockDirtyBitmap *data; }; struct q_obj_BlockdevBackup_wrapper { BlockdevBackup *data; }; struct q_obj_BlockdevSnapshot_wrapper { BlockdevSnapshot *data; }; struct q_obj_BlockdevSnapshotInternal_wrapper { BlockdevSnapshotInternal *data; }; struct q_obj_BlockdevSnapshotSync_wrapper { BlockdevSnapshotSync *data; }; struct q_obj_DriveBackup_wrapper { DriveBackup *data; }; struct TransactionAction { TransactionActionKind type; union { /* union tag is @type */ q_obj_Abort_wrapper abort; q_obj_BlockDirtyBitmapAdd_wrapper block_dirty_bitmap_add; q_obj_BlockDirtyBitmap_wrapper block_dirty_bitmap_clear; q_obj_BlockdevBackup_wrapper blockdev_backup; q_obj_BlockdevSnapshot_wrapper blockdev_snapshot; q_obj_BlockdevSnapshotInternal_wrapper blockdev_snapshot_internal_sync; q_obj_BlockdevSnapshotSync_wrapper blockdev_snapshot_sync; q_obj_DriveBackup_wrapper drive_backup; } u; }; void qapi_free_TransactionAction(TransactionAction *obj); struct TransactionActionList { TransactionActionList *next; TransactionAction *value; }; void qapi_free_TransactionActionList(TransactionActionList *obj); struct TransactionProperties { # 5915 "./qapi-types.h" 3 4 _Bool # 5915 "./qapi-types.h" has_completion_mode; ActionCompletionMode completion_mode; }; void qapi_free_TransactionProperties(TransactionProperties *obj); void qapi_free_UnixSocketAddress(UnixSocketAddress *obj); struct UuidInfo { char *UUID; }; void qapi_free_UuidInfo(UuidInfo *obj); struct VersionInfo { VersionTriple *qemu; char *package; }; void qapi_free_VersionInfo(VersionInfo *obj); struct VersionTriple { int64_t major; int64_t minor; int64_t micro; }; void qapi_free_VersionTriple(VersionTriple *obj); struct VncBasicInfo { char *host; char *service; NetworkAddressFamily family; # 5948 "./qapi-types.h" 3 4 _Bool # 5948 "./qapi-types.h" websocket; }; void qapi_free_VncBasicInfo(VncBasicInfo *obj); struct VncClientInfo { /* Members inherited from VncBasicInfo: */ char *host; char *service; NetworkAddressFamily family; # 5958 "./qapi-types.h" 3 4 _Bool # 5958 "./qapi-types.h" websocket; /* Own members: */ # 5960 "./qapi-types.h" 3 4 _Bool # 5960 "./qapi-types.h" has_x509_dname; char *x509_dname; # 5962 "./qapi-types.h" 3 4 _Bool # 5962 "./qapi-types.h" has_sasl_username; char *sasl_username; }; static inline VncBasicInfo *qapi_VncClientInfo_base(const VncClientInfo *obj) { return (VncBasicInfo *)obj; } void qapi_free_VncClientInfo(VncClientInfo *obj); struct VncClientInfoList { VncClientInfoList *next; VncClientInfo *value; }; void qapi_free_VncClientInfoList(VncClientInfoList *obj); struct VncInfo { # 5981 "./qapi-types.h" 3 4 _Bool # 5981 "./qapi-types.h" enabled; # 5982 "./qapi-types.h" 3 4 _Bool # 5982 "./qapi-types.h" has_host; char *host; # 5984 "./qapi-types.h" 3 4 _Bool # 5984 "./qapi-types.h" has_family; NetworkAddressFamily family; # 5986 "./qapi-types.h" 3 4 _Bool # 5986 "./qapi-types.h" has_service; char *service; # 5988 "./qapi-types.h" 3 4 _Bool # 5988 "./qapi-types.h" has_auth; char *auth; # 5990 "./qapi-types.h" 3 4 _Bool # 5990 "./qapi-types.h" has_clients; VncClientInfoList *clients; }; void qapi_free_VncInfo(VncInfo *obj); struct VncInfo2 { char *id; VncServerInfo2List *server; VncClientInfoList *clients; VncPrimaryAuth auth; # 6001 "./qapi-types.h" 3 4 _Bool # 6001 "./qapi-types.h" has_vencrypt; VncVencryptSubAuth vencrypt; # 6003 "./qapi-types.h" 3 4 _Bool # 6003 "./qapi-types.h" has_display; char *display; }; void qapi_free_VncInfo2(VncInfo2 *obj); struct VncInfo2List { VncInfo2List *next; VncInfo2 *value; }; void qapi_free_VncInfo2List(VncInfo2List *obj); struct VncServerInfo { /* Members inherited from VncBasicInfo: */ char *host; char *service; NetworkAddressFamily family; # 6021 "./qapi-types.h" 3 4 _Bool # 6021 "./qapi-types.h" websocket; /* Own members: */ # 6023 "./qapi-types.h" 3 4 _Bool # 6023 "./qapi-types.h" has_auth; char *auth; }; static inline VncBasicInfo *qapi_VncServerInfo_base(const VncServerInfo *obj) { return (VncBasicInfo *)obj; } void qapi_free_VncServerInfo(VncServerInfo *obj); struct VncServerInfo2 { /* Members inherited from VncBasicInfo: */ char *host; char *service; NetworkAddressFamily family; # 6039 "./qapi-types.h" 3 4 _Bool # 6039 "./qapi-types.h" websocket; /* Own members: */ VncPrimaryAuth auth; # 6042 "./qapi-types.h" 3 4 _Bool # 6042 "./qapi-types.h" has_vencrypt; VncVencryptSubAuth vencrypt; }; static inline VncBasicInfo *qapi_VncServerInfo2_base(const VncServerInfo2 *obj) { return (VncBasicInfo *)obj; } void qapi_free_VncServerInfo2(VncServerInfo2 *obj); struct VncServerInfo2List { VncServerInfo2List *next; VncServerInfo2 *value; }; void qapi_free_VncServerInfo2List(VncServerInfo2List *obj); void qapi_free_VsockSocketAddress(VsockSocketAddress *obj); struct X86CPUFeatureWordInfo { int64_t cpuid_input_eax; # 6064 "./qapi-types.h" 3 4 _Bool # 6064 "./qapi-types.h" has_cpuid_input_ecx; int64_t cpuid_input_ecx; X86CPURegister32 cpuid_register; int64_t features; }; void qapi_free_X86CPUFeatureWordInfo(X86CPUFeatureWordInfo *obj); struct X86CPUFeatureWordInfoList { X86CPUFeatureWordInfoList *next; X86CPUFeatureWordInfo *value; }; void qapi_free_X86CPUFeatureWordInfoList(X86CPUFeatureWordInfoList *obj); struct XBZRLECacheStats { int64_t cache_size; int64_t bytes; int64_t pages; int64_t cache_miss; double cache_miss_rate; int64_t overflow; }; void qapi_free_XBZRLECacheStats(XBZRLECacheStats *obj); struct q_obj_ACPI_DEVICE_OST_arg { ACPIOSTInfo *info; }; struct q_obj_BALLOON_CHANGE_arg { int64_t actual; }; struct q_obj_BLOCK_IMAGE_CORRUPTED_arg { char *device; # 6100 "./qapi-types.h" 3 4 _Bool # 6100 "./qapi-types.h" has_node_name; char *node_name; char *msg; # 6103 "./qapi-types.h" 3 4 _Bool # 6103 "./qapi-types.h" has_offset; int64_t offset; # 6105 "./qapi-types.h" 3 4 _Bool # 6105 "./qapi-types.h" has_size; int64_t size; # 6107 "./qapi-types.h" 3 4 _Bool # 6107 "./qapi-types.h" fatal; }; struct q_obj_BLOCK_IO_ERROR_arg { char *device; char *node_name; IoOperationType operation; BlockErrorAction action; # 6115 "./qapi-types.h" 3 4 _Bool # 6115 "./qapi-types.h" has_nospace; # 6116 "./qapi-types.h" 3 4 _Bool # 6116 "./qapi-types.h" nospace; char *reason; }; struct q_obj_BLOCK_JOB_CANCELLED_arg { BlockJobType type; char *device; int64_t len; int64_t offset; int64_t speed; }; struct q_obj_BLOCK_JOB_COMPLETED_arg { BlockJobType type; char *device; int64_t len; int64_t offset; int64_t speed; # 6134 "./qapi-types.h" 3 4 _Bool # 6134 "./qapi-types.h" has_error; char *error; }; struct q_obj_BLOCK_JOB_ERROR_arg { char *device; IoOperationType operation; BlockErrorAction action; }; struct q_obj_BLOCK_JOB_READY_arg { BlockJobType type; char *device; int64_t len; int64_t offset; int64_t speed; }; struct q_obj_BLOCK_WRITE_THRESHOLD_arg { char *node_name; uint64_t amount_exceeded; uint64_t write_threshold; }; struct q_obj_BlockdevOptions_base { BlockdevDriver driver; # 6160 "./qapi-types.h" 3 4 _Bool # 6160 "./qapi-types.h" has_node_name; char *node_name; # 6162 "./qapi-types.h" 3 4 _Bool # 6162 "./qapi-types.h" has_discard; BlockdevDiscardOptions discard; # 6164 "./qapi-types.h" 3 4 _Bool # 6164 "./qapi-types.h" has_cache; BlockdevCacheOptions *cache; # 6166 "./qapi-types.h" 3 4 _Bool # 6166 "./qapi-types.h" has_read_only; # 6167 "./qapi-types.h" 3 4 _Bool # 6167 "./qapi-types.h" read_only; # 6168 "./qapi-types.h" 3 4 _Bool # 6168 "./qapi-types.h" has_force_share; # 6169 "./qapi-types.h" 3 4 _Bool # 6169 "./qapi-types.h" force_share; # 6170 "./qapi-types.h" 3 4 _Bool # 6170 "./qapi-types.h" has_detect_zeroes; BlockdevDetectZeroesOptions detect_zeroes; }; struct q_obj_BlockdevQcow2Encryption_base { BlockdevQcow2EncryptionFormat format; }; struct q_obj_BlockdevQcowEncryption_base { BlockdevQcowEncryptionFormat format; }; struct q_obj_CpuInfo_base { int64_t CPU; # 6184 "./qapi-types.h" 3 4 _Bool # 6184 "./qapi-types.h" current; # 6185 "./qapi-types.h" 3 4 _Bool # 6185 "./qapi-types.h" halted; char *qom_path; int64_t thread_id; # 6188 "./qapi-types.h" 3 4 _Bool # 6188 "./qapi-types.h" has_props; CpuInstanceProperties *props; CpuInfoArch arch; }; struct q_obj_DEVICE_DELETED_arg { # 6194 "./qapi-types.h" 3 4 _Bool # 6194 "./qapi-types.h" has_device; char *device; char *path; }; struct q_obj_DEVICE_TRAY_MOVED_arg { char *device; char *id; # 6202 "./qapi-types.h" 3 4 _Bool # 6202 "./qapi-types.h" tray_open; }; struct q_obj_DUMP_COMPLETED_arg { DumpQueryResult *result; # 6207 "./qapi-types.h" 3 4 _Bool # 6207 "./qapi-types.h" has_error; char *error; }; struct q_obj_GUEST_PANICKED_arg { GuestPanicAction action; # 6213 "./qapi-types.h" 3 4 _Bool # 6213 "./qapi-types.h" has_info; GuestPanicInformation *info; }; struct q_obj_GuestPanicInformation_base { GuestPanicInformationType type; }; struct q_obj_MEM_UNPLUG_ERROR_arg { char *device; char *msg; }; struct q_obj_MIGRATION_arg { MigrationStatus status; }; struct q_obj_MIGRATION_PASS_arg { int64_t pass; }; struct q_obj_NIC_RX_FILTER_CHANGED_arg { # 6235 "./qapi-types.h" 3 4 _Bool # 6235 "./qapi-types.h" has_name; char *name; char *path; }; struct q_obj_NetLegacyOptions_base { NetLegacyOptionsType type; }; struct q_obj_Netdev_base { char *id; NetClientDriver type; }; struct q_obj_NumaOptions_base { NumaOptionsType type; }; struct q_obj_QUORUM_FAILURE_arg { char *reference; int64_t sector_num; int64_t sectors_count; }; struct q_obj_QUORUM_REPORT_BAD_arg { QuorumOpType type; # 6261 "./qapi-types.h" 3 4 _Bool # 6261 "./qapi-types.h" has_error; char *error; char *node_name; int64_t sector_num; int64_t sectors_count; }; struct q_obj_RESET_arg { # 6269 "./qapi-types.h" 3 4 _Bool # 6269 "./qapi-types.h" guest; }; struct q_obj_RTC_CHANGE_arg { int64_t offset; }; struct q_obj_SHUTDOWN_arg { # 6277 "./qapi-types.h" 3 4 _Bool # 6277 "./qapi-types.h" guest; }; struct q_obj_SPICE_CONNECTED_arg { SpiceBasicInfo *server; SpiceBasicInfo *client; }; struct q_obj_SPICE_DISCONNECTED_arg { SpiceBasicInfo *server; SpiceBasicInfo *client; }; struct q_obj_SPICE_INITIALIZED_arg { SpiceServerInfo *server; SpiceChannel *client; }; struct q_obj_SchemaInfo_base { char *name; SchemaMetaType meta_type; }; struct q_obj_SocketAddress_base { SocketAddressType type; }; struct q_obj_VNC_CONNECTED_arg { VncServerInfo *server; VncBasicInfo *client; }; struct q_obj_VNC_DISCONNECTED_arg { VncServerInfo *server; VncClientInfo *client; }; struct q_obj_VNC_INITIALIZED_arg { VncServerInfo *server; VncClientInfo *client; }; struct q_obj_VSERPORT_CHANGE_arg { char *id; # 6321 "./qapi-types.h" 3 4 _Bool # 6321 "./qapi-types.h" open; }; struct q_obj_WATCHDOG_arg { WatchdogAction action; }; struct q_obj_add_fd_arg { # 6329 "./qapi-types.h" 3 4 _Bool # 6329 "./qapi-types.h" has_fdset_id; int64_t fdset_id; # 6331 "./qapi-types.h" 3 4 _Bool # 6331 "./qapi-types.h" has_opaque; char *opaque; }; struct q_obj_add_client_arg { char *protocol; char *fdname; # 6338 "./qapi-types.h" 3 4 _Bool # 6338 "./qapi-types.h" has_skipauth; # 6339 "./qapi-types.h" 3 4 _Bool # 6339 "./qapi-types.h" skipauth; # 6340 "./qapi-types.h" 3 4 _Bool # 6340 "./qapi-types.h" has_tls; # 6341 "./qapi-types.h" 3 4 _Bool # 6341 "./qapi-types.h" tls; }; struct q_obj_balloon_arg { int64_t value; }; struct q_obj_block_commit_arg { # 6349 "./qapi-types.h" 3 4 _Bool # 6349 "./qapi-types.h" has_job_id; char *job_id; char *device; # 6352 "./qapi-types.h" 3 4 _Bool # 6352 "./qapi-types.h" has_base; char *base; # 6354 "./qapi-types.h" 3 4 _Bool # 6354 "./qapi-types.h" has_top; char *top; # 6356 "./qapi-types.h" 3 4 _Bool # 6356 "./qapi-types.h" has_backing_file; char *backing_file; # 6358 "./qapi-types.h" 3 4 _Bool # 6358 "./qapi-types.h" has_speed; int64_t speed; # 6360 "./qapi-types.h" 3 4 _Bool # 6360 "./qapi-types.h" has_filter_node_name; char *filter_node_name; }; struct q_obj_block_job_cancel_arg { char *device; # 6366 "./qapi-types.h" 3 4 _Bool # 6366 "./qapi-types.h" has_force; # 6367 "./qapi-types.h" 3 4 _Bool # 6367 "./qapi-types.h" force; }; struct q_obj_block_job_complete_arg { char *device; }; struct q_obj_block_job_pause_arg { char *device; }; struct q_obj_block_job_resume_arg { char *device; }; struct q_obj_block_job_set_speed_arg { char *device; int64_t speed; }; struct q_obj_block_set_write_threshold_arg { char *node_name; uint64_t write_threshold; }; struct q_obj_block_stream_arg { # 6393 "./qapi-types.h" 3 4 _Bool # 6393 "./qapi-types.h" has_job_id; char *job_id; char *device; # 6396 "./qapi-types.h" 3 4 _Bool # 6396 "./qapi-types.h" has_base; char *base; # 6398 "./qapi-types.h" 3 4 _Bool # 6398 "./qapi-types.h" has_base_node; char *base_node; # 6400 "./qapi-types.h" 3 4 _Bool # 6400 "./qapi-types.h" has_backing_file; char *backing_file; # 6402 "./qapi-types.h" 3 4 _Bool # 6402 "./qapi-types.h" has_speed; int64_t speed; # 6404 "./qapi-types.h" 3 4 _Bool # 6404 "./qapi-types.h" has_on_error; BlockdevOnError on_error; }; struct q_obj_block_passwd_arg { # 6409 "./qapi-types.h" 3 4 _Bool # 6409 "./qapi-types.h" has_device; char *device; # 6411 "./qapi-types.h" 3 4 _Bool # 6411 "./qapi-types.h" has_node_name; char *node_name; char *password; }; struct q_obj_block_resize_arg { # 6417 "./qapi-types.h" 3 4 _Bool # 6417 "./qapi-types.h" has_device; char *device; # 6419 "./qapi-types.h" 3 4 _Bool # 6419 "./qapi-types.h" has_node_name; char *node_name; int64_t size; }; struct q_obj_blockdev_change_medium_arg { # 6425 "./qapi-types.h" 3 4 _Bool # 6425 "./qapi-types.h" has_device; char *device; # 6427 "./qapi-types.h" 3 4 _Bool # 6427 "./qapi-types.h" has_id; char *id; char *filename; # 6430 "./qapi-types.h" 3 4 _Bool # 6430 "./qapi-types.h" has_format; char *format; # 6432 "./qapi-types.h" 3 4 _Bool # 6432 "./qapi-types.h" has_read_only_mode; BlockdevChangeReadOnlyMode read_only_mode; }; struct q_obj_blockdev_close_tray_arg { # 6437 "./qapi-types.h" 3 4 _Bool # 6437 "./qapi-types.h" has_device; char *device; # 6439 "./qapi-types.h" 3 4 _Bool # 6439 "./qapi-types.h" has_id; char *id; }; struct q_obj_blockdev_del_arg { char *node_name; }; struct q_obj_blockdev_mirror_arg { # 6448 "./qapi-types.h" 3 4 _Bool # 6448 "./qapi-types.h" has_job_id; char *job_id; char *device; char *target; # 6452 "./qapi-types.h" 3 4 _Bool # 6452 "./qapi-types.h" has_replaces; char *replaces; MirrorSyncMode sync; # 6455 "./qapi-types.h" 3 4 _Bool # 6455 "./qapi-types.h" has_speed; int64_t speed; # 6457 "./qapi-types.h" 3 4 _Bool # 6457 "./qapi-types.h" has_granularity; uint32_t granularity; # 6459 "./qapi-types.h" 3 4 _Bool # 6459 "./qapi-types.h" has_buf_size; int64_t buf_size; # 6461 "./qapi-types.h" 3 4 _Bool # 6461 "./qapi-types.h" has_on_source_error; BlockdevOnError on_source_error; # 6463 "./qapi-types.h" 3 4 _Bool # 6463 "./qapi-types.h" has_on_target_error; BlockdevOnError on_target_error; # 6465 "./qapi-types.h" 3 4 _Bool # 6465 "./qapi-types.h" has_filter_node_name; char *filter_node_name; }; struct q_obj_blockdev_open_tray_arg { # 6470 "./qapi-types.h" 3 4 _Bool # 6470 "./qapi-types.h" has_device; char *device; # 6472 "./qapi-types.h" 3 4 _Bool # 6472 "./qapi-types.h" has_id; char *id; # 6474 "./qapi-types.h" 3 4 _Bool # 6474 "./qapi-types.h" has_force; # 6475 "./qapi-types.h" 3 4 _Bool # 6475 "./qapi-types.h" force; }; struct q_obj_blockdev_snapshot_delete_internal_sync_arg { char *device; # 6480 "./qapi-types.h" 3 4 _Bool # 6480 "./qapi-types.h" has_id; char *id; # 6482 "./qapi-types.h" 3 4 _Bool # 6482 "./qapi-types.h" has_name; char *name; }; struct q_obj_change_arg { char *device; char *target; # 6489 "./qapi-types.h" 3 4 _Bool # 6489 "./qapi-types.h" has_arg; char *arg; }; struct q_obj_change_backing_file_arg { char *device; char *image_node_name; char *backing_file; }; struct q_obj_change_vnc_password_arg { char *password; }; struct q_obj_chardev_add_arg { char *id; ChardevBackend *backend; }; struct q_obj_chardev_change_arg { char *id; ChardevBackend *backend; }; struct q_obj_chardev_remove_arg { char *id; }; struct q_obj_chardev_send_break_arg { char *id; }; struct q_obj_client_migrate_info_arg { char *protocol; char *hostname; # 6524 "./qapi-types.h" 3 4 _Bool # 6524 "./qapi-types.h" has_port; int64_t port; # 6526 "./qapi-types.h" 3 4 _Bool # 6526 "./qapi-types.h" has_tls_port; int64_t tls_port; # 6528 "./qapi-types.h" 3 4 _Bool # 6528 "./qapi-types.h" has_cert_subject; char *cert_subject; }; struct q_obj_closefd_arg { char *fdname; }; struct q_obj_cpu_add_arg { int64_t id; }; struct q_obj_cpu_arg { int64_t index; }; struct q_obj_device_list_properties_arg { char *q_typename; }; struct q_obj_device_add_arg { char *driver; # 6550 "./qapi-types.h" 3 4 _Bool # 6550 "./qapi-types.h" has_bus; char *bus; # 6552 "./qapi-types.h" 3 4 _Bool # 6552 "./qapi-types.h" has_id; char *id; }; struct q_obj_device_del_arg { char *id; }; struct q_obj_dump_guest_memory_arg { # 6561 "./qapi-types.h" 3 4 _Bool # 6561 "./qapi-types.h" paging; char *protocol; # 6563 "./qapi-types.h" 3 4 _Bool # 6563 "./qapi-types.h" has_detach; # 6564 "./qapi-types.h" 3 4 _Bool # 6564 "./qapi-types.h" detach; # 6565 "./qapi-types.h" 3 4 _Bool # 6565 "./qapi-types.h" has_begin; int64_t begin; # 6567 "./qapi-types.h" 3 4 _Bool # 6567 "./qapi-types.h" has_length; int64_t length; # 6569 "./qapi-types.h" 3 4 _Bool # 6569 "./qapi-types.h" has_format; DumpGuestMemoryFormat format; }; struct q_obj_dump_skeys_arg { char *filename; }; struct q_obj_eject_arg { # 6578 "./qapi-types.h" 3 4 _Bool # 6578 "./qapi-types.h" has_device; char *device; # 6580 "./qapi-types.h" 3 4 _Bool # 6580 "./qapi-types.h" has_id; char *id; # 6582 "./qapi-types.h" 3 4 _Bool # 6582 "./qapi-types.h" has_force; # 6583 "./qapi-types.h" 3 4 _Bool # 6583 "./qapi-types.h" force; }; struct q_obj_expire_password_arg { char *protocol; char *time; }; struct q_obj_getfd_arg { char *fdname; }; struct q_obj_human_monitor_command_arg { char *command_line; # 6597 "./qapi-types.h" 3 4 _Bool # 6597 "./qapi-types.h" has_cpu_index; int64_t cpu_index; }; struct q_obj_input_send_event_arg { # 6602 "./qapi-types.h" 3 4 _Bool # 6602 "./qapi-types.h" has_device; char *device; # 6604 "./qapi-types.h" 3 4 _Bool # 6604 "./qapi-types.h" has_head; int64_t head; InputEventList *events; }; struct q_obj_memsave_arg { int64_t val; int64_t size; char *filename; # 6613 "./qapi-types.h" 3 4 _Bool # 6613 "./qapi-types.h" has_cpu_index; int64_t cpu_index; }; struct q_obj_migrate_arg { char *uri; # 6619 "./qapi-types.h" 3 4 _Bool # 6619 "./qapi-types.h" has_blk; # 6620 "./qapi-types.h" 3 4 _Bool # 6620 "./qapi-types.h" blk; # 6621 "./qapi-types.h" 3 4 _Bool # 6621 "./qapi-types.h" has_inc; # 6622 "./qapi-types.h" 3 4 _Bool # 6622 "./qapi-types.h" inc; # 6623 "./qapi-types.h" 3 4 _Bool # 6623 "./qapi-types.h" has_detach; # 6624 "./qapi-types.h" 3 4 _Bool # 6624 "./qapi-types.h" detach; }; struct q_obj_migrate_continue_arg { MigrationStatus state; }; struct q_obj_migrate_incoming_arg { char *uri; }; struct q_obj_migrate_set_cache_size_arg { int64_t value; }; struct q_obj_migrate_set_capabilities_arg { MigrationCapabilityStatusList *capabilities; }; struct q_obj_migrate_set_downtime_arg { double value; }; struct q_obj_migrate_set_speed_arg { int64_t value; }; struct q_obj_nbd_server_add_arg { char *device; # 6653 "./qapi-types.h" 3 4 _Bool # 6653 "./qapi-types.h" has_writable; # 6654 "./qapi-types.h" 3 4 _Bool # 6654 "./qapi-types.h" writable; }; struct q_obj_nbd_server_start_arg { SocketAddressLegacy *addr; # 6659 "./qapi-types.h" 3 4 _Bool # 6659 "./qapi-types.h" has_tls_creds; char *tls_creds; }; struct q_obj_netdev_add_arg { char *type; char *id; }; struct q_obj_netdev_del_arg { char *id; }; struct q_obj_object_add_arg { char *qom_type; char *id; # 6675 "./qapi-types.h" 3 4 _Bool # 6675 "./qapi-types.h" has_props; QObject *props; }; struct q_obj_object_del_arg { char *id; }; struct q_obj_pmemsave_arg { int64_t val; int64_t size; char *filename; }; struct q_obj_qom_get_arg { char *path; char *property; }; struct q_obj_qom_list_arg { char *path; }; struct q_obj_qom_list_types_arg { # 6699 "./qapi-types.h" 3 4 _Bool # 6699 "./qapi-types.h" has_implements; char *implements; # 6701 "./qapi-types.h" 3 4 _Bool # 6701 "./qapi-types.h" has_abstract; # 6702 "./qapi-types.h" 3 4 _Bool # 6702 "./qapi-types.h" abstract; }; struct q_obj_qom_set_arg { char *path; char *property; QObject *value; }; struct q_obj_query_blockstats_arg { # 6712 "./qapi-types.h" 3 4 _Bool # 6712 "./qapi-types.h" has_query_nodes; # 6713 "./qapi-types.h" 3 4 _Bool # 6713 "./qapi-types.h" query_nodes; }; struct q_obj_query_command_line_options_arg { # 6717 "./qapi-types.h" 3 4 _Bool # 6717 "./qapi-types.h" has_option; char *option; }; struct q_obj_query_cpu_model_baseline_arg { CpuModelInfo *modela; CpuModelInfo *modelb; }; struct q_obj_query_cpu_model_comparison_arg { CpuModelInfo *modela; CpuModelInfo *modelb; }; struct q_obj_query_cpu_model_expansion_arg { CpuModelExpansionType type; CpuModelInfo *model; }; struct q_obj_query_rocker_arg { char *name; }; struct q_obj_query_rocker_of_dpa_flows_arg { char *name; # 6742 "./qapi-types.h" 3 4 _Bool # 6742 "./qapi-types.h" has_tbl_id; uint32_t tbl_id; }; struct q_obj_query_rocker_of_dpa_groups_arg { char *name; # 6748 "./qapi-types.h" 3 4 _Bool # 6748 "./qapi-types.h" has_type; uint8_t type; }; struct q_obj_query_rocker_ports_arg { char *name; }; struct q_obj_query_rx_filter_arg { # 6757 "./qapi-types.h" 3 4 _Bool # 6757 "./qapi-types.h" has_name; char *name; }; struct q_obj_remove_fd_arg { int64_t fdset_id; # 6763 "./qapi-types.h" 3 4 _Bool # 6763 "./qapi-types.h" has_fd; int64_t fd; }; struct q_obj_ringbuf_read_arg { char *device; int64_t size; # 6770 "./qapi-types.h" 3 4 _Bool # 6770 "./qapi-types.h" has_format; DataFormat format; }; struct q_obj_ringbuf_write_arg { char *device; char *data; # 6777 "./qapi-types.h" 3 4 _Bool # 6777 "./qapi-types.h" has_format; DataFormat format; }; struct q_obj_screendump_arg { char *filename; }; struct q_obj_send_key_arg { KeyValueList *keys; # 6787 "./qapi-types.h" 3 4 _Bool # 6787 "./qapi-types.h" has_hold_time; int64_t hold_time; }; struct q_obj_set_link_arg { char *name; # 6793 "./qapi-types.h" 3 4 _Bool # 6793 "./qapi-types.h" up; }; struct q_obj_set_password_arg { char *protocol; char *password; # 6799 "./qapi-types.h" 3 4 _Bool # 6799 "./qapi-types.h" has_connected; char *connected; }; struct q_obj_trace_event_get_state_arg { char *name; # 6805 "./qapi-types.h" 3 4 _Bool # 6805 "./qapi-types.h" has_vcpu; int64_t vcpu; }; struct q_obj_trace_event_set_state_arg { char *name; # 6811 "./qapi-types.h" 3 4 _Bool # 6811 "./qapi-types.h" enable; # 6812 "./qapi-types.h" 3 4 _Bool # 6812 "./qapi-types.h" has_ignore_unavailable; # 6813 "./qapi-types.h" 3 4 _Bool # 6813 "./qapi-types.h" ignore_unavailable; # 6814 "./qapi-types.h" 3 4 _Bool # 6814 "./qapi-types.h" has_vcpu; int64_t vcpu; }; struct q_obj_transaction_arg { TransactionActionList *actions; # 6820 "./qapi-types.h" 3 4 _Bool # 6820 "./qapi-types.h" has_properties; TransactionProperties *properties; }; struct q_obj_watchdog_set_action_arg { WatchdogAction action; }; struct q_obj_x_blockdev_change_arg { char *parent; # 6830 "./qapi-types.h" 3 4 _Bool # 6830 "./qapi-types.h" has_child; char *child; # 6832 "./qapi-types.h" 3 4 _Bool # 6832 "./qapi-types.h" has_node; char *node; }; struct q_obj_x_blockdev_insert_medium_arg { # 6837 "./qapi-types.h" 3 4 _Bool # 6837 "./qapi-types.h" has_device; char *device; # 6839 "./qapi-types.h" 3 4 _Bool # 6839 "./qapi-types.h" has_id; char *id; char *node_name; }; struct q_obj_x_blockdev_remove_medium_arg { # 6845 "./qapi-types.h" 3 4 _Bool # 6845 "./qapi-types.h" has_device; char *device; # 6847 "./qapi-types.h" 3 4 _Bool # 6847 "./qapi-types.h" has_id; char *id; }; struct q_obj_xen_load_devices_state_arg { char *filename; }; struct q_obj_xen_save_devices_state_arg { char *filename; # 6857 "./qapi-types.h" 3 4 _Bool # 6857 "./qapi-types.h" has_live; # 6858 "./qapi-types.h" 3 4 _Bool # 6858 "./qapi-types.h" live; }; struct q_obj_xen_set_global_dirty_log_arg { # 6862 "./qapi-types.h" 3 4 _Bool # 6862 "./qapi-types.h" enable; }; struct q_obj_xen_set_replication_arg { # 6866 "./qapi-types.h" 3 4 _Bool # 6866 "./qapi-types.h" enable; # 6867 "./qapi-types.h" 3 4 _Bool # 6867 "./qapi-types.h" primary; # 6868 "./qapi-types.h" 3 4 _Bool # 6868 "./qapi-types.h" has_failover; # 6869 "./qapi-types.h" 3 4 _Bool # 6869 "./qapi-types.h" failover; }; # 119 "//qemu-2.11+dfsg/include/qapi/error.h" 2 /* * Overall category of an error. * Based on the qapi type QapiErrorClass, but reproduced here for nicer * enum names. */ typedef enum ErrorClass { ERROR_CLASS_GENERIC_ERROR = QAPI_ERROR_CLASS_GENERICERROR, ERROR_CLASS_COMMAND_NOT_FOUND = QAPI_ERROR_CLASS_COMMANDNOTFOUND, ERROR_CLASS_DEVICE_NOT_ACTIVE = QAPI_ERROR_CLASS_DEVICENOTACTIVE, ERROR_CLASS_DEVICE_NOT_FOUND = QAPI_ERROR_CLASS_DEVICENOTFOUND, ERROR_CLASS_KVM_MISSING_CAP = QAPI_ERROR_CLASS_KVMMISSINGCAP, } ErrorClass; /* * Get @err's human-readable error message. */ const char *error_get_pretty(const Error *err); /* * Get @err's error class. * Note: use of error classes other than ERROR_CLASS_GENERIC_ERROR is * strongly discouraged. */ ErrorClass error_get_class(const Error *err); /* * Create a new error object and assign it to *@errp. * If @errp is NULL, the error is ignored. Don't bother creating one * then. * If @errp is &error_abort, print a suitable message and abort(). * If @errp is &error_fatal, print a suitable message and exit(1). * If @errp is anything else, *@errp must be NULL. * The new error's class is ERROR_CLASS_GENERIC_ERROR, and its * human-readable error message is made from printf-style @fmt, ... * The resulting message should be a single phrase, with no newline or * trailing punctuation. * Please don't error_setg(&error_fatal, ...), use error_report() and * exit(), because that's more obvious. * Likewise, don't error_setg(&error_abort, ...), use assert(). */ void error_setg_internal(Error **errp, const char *src, int line, const char *func, const char *fmt, ...) __attribute__((format(gnu_printf, 5, 6))); /* * Just like error_setg(), with @os_error info added to the message. * If @os_error is non-zero, ": " + strerror(os_error) is appended to * the human-readable error message. * * The value of errno (which usually can get clobbered by almost any * function call) will be preserved. */ void error_setg_errno_internal(Error **errp, const char *fname, int line, const char *func, int os_error, const char *fmt, ...) __attribute__((format(gnu_printf, 6, 7))); # 199 "//qemu-2.11+dfsg/include/qapi/error.h" /* * Propagate error object (if any) from @local_err to @dst_errp. * If @local_err is NULL, do nothing (because there's nothing to * propagate). * Else, if @dst_errp is NULL, errors are being ignored. Free the * error object. * Else, if @dst_errp is &error_abort, print a suitable message and * abort(). * Else, if @dst_errp is &error_fatal, print a suitable message and * exit(1). * Else, if @dst_errp already contains an error, ignore this one: free * the error object. * Else, move the error object from @local_err to *@dst_errp. * On return, @local_err is invalid. * Please don't error_propagate(&error_fatal, ...), use * error_report_err() and exit(), because that's more obvious. */ void error_propagate(Error **dst_errp, Error *local_err); /* * Prepend some text to @errp's human-readable error message. * The text is made by formatting @fmt, @ap like vprintf(). */ void error_vprepend(Error **errp, const char *fmt, va_list ap); /* * Prepend some text to @errp's human-readable error message. * The text is made by formatting @fmt, ... like printf(). */ void error_prepend(Error **errp, const char *fmt, ...) __attribute__((format(gnu_printf, 2, 3))); /* * Append a printf-style human-readable explanation to an existing error. * @errp may be NULL, but not &error_fatal or &error_abort. * Trivially the case if you call it only after error_setg() or * error_propagate(). * May be called multiple times. The resulting hint should end with a * newline. */ void error_append_hint(Error **errp, const char *fmt, ...) __attribute__((format(gnu_printf, 2, 3))); /* * Convenience function to report open() failure. */ void error_setg_file_open_internal(Error **errp, const char *src, int line, const char *func, int os_errno, const char *filename); /* * Return an exact copy of @err. */ Error *error_copy(const Error *err); /* * Free @err. * @err may be NULL. */ void error_free(Error *err); /* * Convenience function to assert that *@errp is set, then silently free it. */ void error_free_or_abort(Error **errp); /* * Convenience function to warn_report() and free @err. */ void warn_report_err(Error *err); /* * Convenience function to error_report() and free @err. */ void error_report_err(Error *err); /* * Convenience function to error_prepend(), warn_report() and free @err. */ void warn_reportf_err(Error *err, const char *fmt, ...) __attribute__((format(gnu_printf, 2, 3))); /* * Convenience function to error_prepend(), error_report() and free @err. */ void error_reportf_err(Error *err, const char *fmt, ...) __attribute__((format(gnu_printf, 2, 3))); /* * Just like error_setg(), except you get to specify the error class. * Note: use of error classes other than ERROR_CLASS_GENERIC_ERROR is * strongly discouraged. */ void error_set_internal(Error **errp, const char *src, int line, const char *func, ErrorClass err_class, const char *fmt, ...) __attribute__((format(gnu_printf, 6, 7))); /* * Special error destination to abort on error. * See error_setg() and error_propagate() for details. */ extern Error *error_abort; /* * Special error destination to exit(1) on error. * See error_setg() and error_propagate() for details. */ extern Error *error_fatal; # 26 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/qemu/cutils.h" 1 # 1 "//qemu-2.11+dfsg/include/qemu/fprintf-fn.h" 1 /* * Typedef for fprintf-alike function pointers. * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ typedef int (*fprintf_function)(FILE *f, const char *fmt, ...) __attribute__((format(gnu_printf, 2, 3))); # 5 "//qemu-2.11+dfsg/include/qemu/cutils.h" 2 /** * pstrcpy: * @buf: buffer to copy string into * @buf_size: size of @buf in bytes * @str: string to copy * * Copy @str into @buf, including the trailing NUL, but do not * write more than @buf_size bytes. The resulting buffer is * always NUL terminated (even if the source string was too long). * If @buf_size is zero or negative then no bytes are copied. * * This function is similar to strncpy(), but avoids two of that * function's problems: * * if @str fits in the buffer, pstrcpy() does not zero-fill the * remaining space at the end of @buf * * if @str is too long, pstrcpy() will copy the first @buf_size-1 * bytes and then add a NUL */ void pstrcpy(char *buf, int buf_size, const char *str); /** * strpadcpy: * @buf: buffer to copy string into * @buf_size: size of @buf in bytes * @str: string to copy * @pad: character to pad the remainder of @buf with * * Copy @str into @buf (but *not* its trailing NUL!), and then pad the * rest of the buffer with the @pad character. If @str is too large * for the buffer then it is truncated, so that @buf contains the * first @buf_size characters of @str, with no terminator. */ void strpadcpy(char *buf, int buf_size, const char *str, char pad); /** * pstrcat: * @buf: buffer containing existing string * @buf_size: size of @buf in bytes * @s: string to concatenate to @buf * * Append a copy of @s to the string already in @buf, but do not * allow the buffer to overflow. If the existing contents of @buf * plus @str would total more than @buf_size bytes, then write * as much of @str as will fit followed by a NUL terminator. * * @buf must already contain a NUL-terminated string, or the * behaviour is undefined. * * Returns: @buf. */ char *pstrcat(char *buf, int buf_size, const char *s); /** * strstart: * @str: string to test * @val: prefix string to look for * @ptr: NULL, or pointer to be written to indicate start of * the remainder of the string * * Test whether @str starts with the prefix @val. * If it does (including the degenerate case where @str and @val * are equal) then return true. If @ptr is not NULL then a * pointer to the first character following the prefix is written * to it. If @val is not a prefix of @str then return false (and * @ptr is not written to). * * Returns: true if @str starts with prefix @val, false otherwise. */ int strstart(const char *str, const char *val, const char **ptr); /** * stristart: * @str: string to test * @val: prefix string to look for * @ptr: NULL, or pointer to be written to indicate start of * the remainder of the string * * Test whether @str starts with the case-insensitive prefix @val. * This function behaves identically to strstart(), except that the * comparison is made after calling qemu_toupper() on each pair of * characters. * * Returns: true if @str starts with case-insensitive prefix @val, * false otherwise. */ int stristart(const char *str, const char *val, const char **ptr); /** * qemu_strnlen: * @s: string * @max_len: maximum number of bytes in @s to scan * * Return the length of the string @s, like strlen(), but do not * examine more than @max_len bytes of the memory pointed to by @s. * If no NUL terminator is found within @max_len bytes, then return * @max_len instead. * * This function has the same behaviour as the POSIX strnlen() * function. * * Returns: length of @s in bytes, or @max_len, whichever is smaller. */ int qemu_strnlen(const char *s, int max_len); /** * qemu_strsep: * @input: pointer to string to parse * @delim: string containing delimiter characters to search for * * Locate the first occurrence of any character in @delim within * the string referenced by @input, and replace it with a NUL. * The location of the next character after the delimiter character * is stored into @input. * If the end of the string was reached without finding a delimiter * character, then NULL is stored into @input. * If @input points to a NULL pointer on entry, return NULL. * The return value is always the original value of *@input (and * so now points to a NUL-terminated string corresponding to the * part of the input up to the first delimiter). * * This function has the same behaviour as the BSD strsep() function. * * Returns: the pointer originally in @input. */ char *qemu_strsep(char **input, const char *delim); time_t mktimegm(struct tm *tm); int qemu_fdatasync(int fd); int fcntl_setfl(int fd, int flag); int qemu_parse_fd(const char *param); int qemu_strtol(const char *nptr, const char **endptr, int base, long *result); int qemu_strtoul(const char *nptr, const char **endptr, int base, unsigned long *result); int qemu_strtoi64(const char *nptr, const char **endptr, int base, int64_t *result); int qemu_strtou64(const char *nptr, const char **endptr, int base, uint64_t *result); int parse_uint(const char *s, unsigned long long *value, char **endptr, int base); int parse_uint_full(const char *s, unsigned long long *value, int base); int qemu_strtosz(const char *nptr, char **end, uint64_t *result); int qemu_strtosz_MiB(const char *nptr, char **end, uint64_t *result); int qemu_strtosz_metric(const char *nptr, char **end, uint64_t *result); # 153 "//qemu-2.11+dfsg/include/qemu/cutils.h" /* used to print char* safely */ # 156 "//qemu-2.11+dfsg/include/qemu/cutils.h" 3 4 _Bool # 156 "//qemu-2.11+dfsg/include/qemu/cutils.h" buffer_is_zero(const void *buf, size_t len); # 157 "//qemu-2.11+dfsg/include/qemu/cutils.h" 3 4 _Bool # 157 "//qemu-2.11+dfsg/include/qemu/cutils.h" test_buffer_is_zero_next_accel(void); /* * Implementation of ULEB128 (http://en.wikipedia.org/wiki/LEB128) * Input is limited to 14-bit numbers */ int uleb128_encode_small(uint8_t *out, uint32_t n); int uleb128_decode_small(const uint8_t *in, uint32_t *n); # 27 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/qemu/error-report.h" 1 /* * Error reporting * * Copyright (C) 2010 Red Hat Inc. * * Authors: * Markus Armbruster , * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ typedef struct Location { /* all members are private to qemu-error.c */ enum { LOC_NONE, LOC_CMDLINE, LOC_FILE } kind; int num; const void *ptr; struct Location *prev; } Location; Location *loc_push_restore(Location *loc); Location *loc_push_none(Location *loc); Location *loc_pop(Location *loc); Location *loc_save(Location *loc); void loc_restore(Location *loc); void loc_set_none(void); void loc_set_cmdline(char **argv, int idx, int cnt); void loc_set_file(const char *fname, int lno); void error_vprintf(const char *fmt, va_list ap) __attribute__((format(gnu_printf, 1, 0))); void error_printf(const char *fmt, ...) __attribute__((format(gnu_printf, 1, 2))); void error_vprintf_unless_qmp(const char *fmt, va_list ap) __attribute__((format(gnu_printf, 1, 0))); void error_printf_unless_qmp(const char *fmt, ...) __attribute__((format(gnu_printf, 1, 2))); void error_set_progname(const char *argv0); void error_vreport(const char *fmt, va_list ap) __attribute__((format(gnu_printf, 1, 0))); void warn_vreport(const char *fmt, va_list ap) __attribute__((format(gnu_printf, 1, 0))); void info_vreport(const char *fmt, va_list ap) __attribute__((format(gnu_printf, 1, 0))); void error_report(const char *fmt, ...) __attribute__((format(gnu_printf, 1, 2))); void warn_report(const char *fmt, ...) __attribute__((format(gnu_printf, 1, 2))); void info_report(const char *fmt, ...) __attribute__((format(gnu_printf, 1, 2))); const char *error_get_progname(void); extern # 48 "//qemu-2.11+dfsg/include/qemu/error-report.h" 3 4 _Bool # 48 "//qemu-2.11+dfsg/include/qemu/error-report.h" enable_timestamp_msg; # 28 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/block/block_int.h" 1 /* * QEMU System Emulator block driver * * Copyright (c) 2003 Fabrice Bellard * * 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. */ # 1 "//qemu-2.11+dfsg/include/block/accounting.h" 1 /* * QEMU System Emulator block accounting * * Copyright (c) 2011 Christoph Hellwig * Copyright (c) 2015 Igalia, S.L. * * 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. */ # 1 "//qemu-2.11+dfsg/include/qemu/timed-average.h" 1 /* * QEMU timed average computation * * Copyright (C) Nodalink, EURL. 2014 * Copyright (C) Igalia, S.L. 2015 * * Authors: * Benoît Canet * Alberto Garcia * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) version 3 or any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ # 1 "//qemu-2.11+dfsg/include/qemu/timer.h" 1 # 1 "//qemu-2.11+dfsg/include/qemu-common.h" 1 /* Common header file that is included by all of QEMU. * * This file is supposed to be included only by .c files. No header file should * depend on qemu-common.h, as this would easily lead to circular header * dependencies. * * If a header file uses a definition from qemu-common.h, that definition * must be moved to a separate header file, and the header that uses it * must include that header. */ # 1 "//qemu-2.11+dfsg/include/qemu/fprintf-fn.h" 1 /* * Typedef for fprintf-alike function pointers. * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ # 16 "//qemu-2.11+dfsg/include/qemu-common.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/option.h" 1 /* * Commandline option parsing functions * * Copyright (c) 2003-2008 Fabrice Bellard * Copyright (c) 2009 Kevin Wolf * * 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. */ # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ /* * This file defines four types of data structures: singly-linked lists, * lists, simple queues, and tail queues. * * A singly-linked list is headed by a single forward pointer. The * elements are singly linked for minimum space and pointer manipulation * overhead at the expense of O(n) removal for arbitrary elements. New * elements can be added to the list after an existing element or at the * head of the list. Elements being removed from the head of the list * should use the explicit macro for this purpose for optimum * efficiency. A singly-linked list may only be traversed in the forward * direction. Singly-linked lists are ideal for applications with large * datasets and few or no removals or for implementing a LIFO queue. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list * may only be traversed in the forward direction. * * A simple queue is headed by a pair of pointers, one the head of the * list and the other to the tail of the list. The elements are singly * linked to save space, so elements can only be removed from the * head of the list. New elements can be added to the list after * an existing element, at the head of the list, or at the end of the * list. A simple queue may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. * * For details on the use of these macros, see the queue(3) manual page. */ # 1 "//qemu-2.11+dfsg/include/qemu/atomic.h" 1 /* * Simple interface for atomic operations. * * Copyright (C) 2013 Red Hat, Inc. * * Author: Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * * See docs/devel/atomics.txt for discussion about the guarantees each * atomic primitive is meant to provide. */ /* Compiler barrier */ /* The variable that receives the old value of an atomically-accessed * variable must be non-qualified, because atomic builtins return values * through a pointer-type argument as in __atomic_load(&var, &old, MODEL). * * This macro has to handle types smaller than int manually, because of * implicit promotion. int and larger types, as well as pointers, can be * converted to a non-qualified type just by applying a binary operator. */ # 64 "//qemu-2.11+dfsg/include/qemu/atomic.h" /* For C11 atomic ops */ /* Manual memory barriers * *__atomic_thread_fence does not include a compiler barrier; instead, * the barrier is part of __atomic_load/__atomic_store's "volatile-like" * semantics. If smp_wmb() is a no-op, absence of the barrier means that * the compiler is free to reorder stores on each side of the barrier. * Add one here, and similarly in smp_rmb() and smp_read_barrier_depends(). */ /* Most compilers currently treat consume and acquire the same, but really * no processors except Alpha need a barrier here. Leave it in if * using Thread Sanitizer to avoid warnings, otherwise optimize it away. */ # 91 "//qemu-2.11+dfsg/include/qemu/atomic.h" /* Sanity check that the size of an atomic operation isn't "overly large". * Despite the fact that e.g. i686 has 64-bit atomic operations, we do not * want to use them because we ought not need them, and this lets us do a * bit of sanity checking that other 32-bit hosts might build. * * That said, we have a problem on 64-bit ILP32 hosts in that in order to * sync with TCG_OVERSIZED_GUEST, this must match TCG_TARGET_REG_BITS. * We'd prefer not want to pull in everything else TCG related, so handle * those few cases by hand. * * Note that x32 is fully detected with __x64_64__ + _ILP32, and that for * Sparc we always force the use of sparcv9 in configure. */ /* Weak atomic operations prevent the compiler moving other * loads/stores past the atomic operation load/store. However there is * no explicit memory barrier for the processor. * * The C11 memory model says that variables that are accessed from * different threads should at least be done with __ATOMIC_RELAXED * primitives or the result is undefined. Generally this has little to * no effect on the generated code but not using the atomic primitives * will get flagged by sanitizers as a violation. */ # 137 "//qemu-2.11+dfsg/include/qemu/atomic.h" /* See above: most compilers currently treat consume and acquire the * same, but this slows down atomic_rcu_read unnecessarily. */ # 176 "//qemu-2.11+dfsg/include/qemu/atomic.h" /* All the remaining operations are fully sequentially consistent */ # 187 "//qemu-2.11+dfsg/include/qemu/atomic.h" /* Returns the eventual value, failed or not */ # 200 "//qemu-2.11+dfsg/include/qemu/atomic.h" /* Provide shorter names for GCC atomic builtins, return old value */ # 217 "//qemu-2.11+dfsg/include/qemu/atomic.h" /* And even shorter names that return void. */ # 418 "//qemu-2.11+dfsg/include/qemu/atomic.h" /* This is more efficient than a store plus a fence. */ /* atomic_mb_read/set semantics map Java volatile variables. They are * less expensive on some platforms (notably POWER) than fully * sequentially consistent operations. * * As long as they are used as paired operations they are safe to * use. See docs/devel/atomics.txt for more discussion. */ # 82 "//qemu-2.11+dfsg/include/qemu/queue.h" 2 /* * List definitions. */ # 100 "//qemu-2.11+dfsg/include/qemu/queue.h" /* * List functions. */ # 159 "//qemu-2.11+dfsg/include/qemu/queue.h" /* * List access methods. */ /* * Singly-linked List definitions. */ # 183 "//qemu-2.11+dfsg/include/qemu/queue.h" /* * Singly-linked List functions. */ # 229 "//qemu-2.11+dfsg/include/qemu/queue.h" /* * Singly-linked List access methods. */ /* * Simple queue definitions. */ # 254 "//qemu-2.11+dfsg/include/qemu/queue.h" /* * Simple queue functions. */ # 333 "//qemu-2.11+dfsg/include/qemu/queue.h" /* * Simple queue access methods. */ /* * Tail queue definitions. */ # 361 "//qemu-2.11+dfsg/include/qemu/queue.h" /* * Tail queue functions. */ # 428 "//qemu-2.11+dfsg/include/qemu/queue.h" /* * Tail queue access methods. */ # 444 "//qemu-2.11+dfsg/include/qemu/queue.h" typedef struct DUMMY_Q_ENTRY DUMMY_Q_ENTRY; typedef struct DUMMY_Q DUMMY_Q; struct DUMMY_Q_ENTRY { struct { struct DUMMY_Q_ENTRY *tqe_next; /* next element */ struct DUMMY_Q_ENTRY * *tqe_prev; /* address of previous next element */} next; }; struct DUMMY_Q { struct DUMMY_Q_HEAD { struct DUMMY_Q_ENTRY *tqh_first; /* first element */ struct DUMMY_Q_ENTRY * *tqh_last; /* addr of last next element */ } head; }; /* * Offsets of layout of a tail queue head. */ /* * Raw access of elements of a tail queue */ /* * Offsets of layout of a tail queue element. */ /* * Raw access of elements of a tail entry */ /* * Tail queue tranversal using pointer arithmetic. */ /* * Tail queue insertion using pointer arithmetic. */ # 30 "//qemu-2.11+dfsg/include/qemu/option.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 1 /* * QDict Module * * Copyright (C) 2009 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 1 /* * QEMU Object Model. * * Based on ideas by Avi Kivity * * Copyright (C) 2009, 2015 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * * QObject Reference Counts Terminology * ------------------------------------ * * - Returning references: A function that returns an object may * return it as either a weak or a strong reference. If the reference * is strong, you are responsible for calling QDECREF() on the reference * when you are done. * * If the reference is weak, the owner of the reference may free it at * any time in the future. Before storing the reference anywhere, you * should call QINCREF() to make the reference strong. * * - Transferring ownership: when you transfer ownership of a reference * by calling a function, you are no longer responsible for calling * QDECREF() when the reference is no longer needed. In other words, * when the function returns you must behave as if the reference to the * passed object was weak. */ # 1 "./qapi-types.h" 1 /* AUTOMATICALLY GENERATED, DO NOT MODIFY */ /* * schema-defined QAPI types * * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * */ # 36 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 2 struct QObject { QType type; size_t refcnt; }; /* Get the 'base' part of an object */ /* High-level interface for qobject_incref() */ /* High-level interface for qobject_decref() */ /* Initialize an object to default values */ static inline void qobject_init(QObject *obj, QType type) { # 56 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 ((void) sizeof (( # 56 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" QTYPE_NONE < type && type < QTYPE__MAX # 56 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 56 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" QTYPE_NONE < type && type < QTYPE__MAX # 56 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 ) ; /* empty */ else __assert_fail ( # 56 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" "QTYPE_NONE < type && type < QTYPE__MAX" # 56 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 , "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h", 56, __extension__ __PRETTY_FUNCTION__); })) # 56 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" ; obj->refcnt = 1; obj->type = type; } /** * qobject_incref(): Increment QObject's reference count */ static inline void qobject_incref(QObject *obj) { if (obj) obj->refcnt++; } /** * qobject_is_equal(): Return whether the two objects are equal. * * Any of the pointers may be NULL; return true if both are. Always * return false if only one is (therefore a QNull object is not * considered equal to a NULL pointer). */ # 77 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 _Bool # 77 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" qobject_is_equal(const QObject *x, const QObject *y); /** * qobject_destroy(): Free resources used by the object */ void qobject_destroy(QObject *obj); /** * qobject_decref(): Decrement QObject's reference count, deallocate * when it reaches zero */ static inline void qobject_decref(QObject *obj) { # 90 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 ((void) sizeof (( # 90 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" !obj || obj->refcnt # 90 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 90 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" !obj || obj->refcnt # 90 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 ) ; /* empty */ else __assert_fail ( # 90 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" "!obj || obj->refcnt" # 90 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 , "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h", 90, __extension__ __PRETTY_FUNCTION__); })) # 90 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" ; if (obj && --obj->refcnt == 0) { qobject_destroy(obj); } } /** * qobject_type(): Return the QObject's type */ static inline QType qobject_type(const QObject *obj) { # 101 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 ((void) sizeof (( # 101 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" QTYPE_NONE < obj->type && obj->type < QTYPE__MAX # 101 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 101 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" QTYPE_NONE < obj->type && obj->type < QTYPE__MAX # 101 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 ) ; /* empty */ else __assert_fail ( # 101 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" "QTYPE_NONE < obj->type && obj->type < QTYPE__MAX" # 101 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 3 4 , "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h", 101, __extension__ __PRETTY_FUNCTION__); })) # 101 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" ; return obj->type; } # 17 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qlist.h" 1 /* * QList Module * * Copyright (C) 2009 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 1 /* * QEMU Object Model. * * Based on ideas by Avi Kivity * * Copyright (C) 2009, 2015 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * * QObject Reference Counts Terminology * ------------------------------------ * * - Returning references: A function that returns an object may * return it as either a weak or a strong reference. If the reference * is strong, you are responsible for calling QDECREF() on the reference * when you are done. * * If the reference is weak, the owner of the reference may free it at * any time in the future. Before storing the reference anywhere, you * should call QINCREF() to make the reference strong. * * - Transferring ownership: when you transfer ownership of a reference * by calling a function, you are no longer responsible for calling * QDECREF() when the reference is no longer needed. In other words, * when the function returns you must behave as if the reference to the * passed object was weak. */ # 17 "//qemu-2.11+dfsg/include/qapi/qmp/qlist.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qnum.h" 1 /* * QNum Module * * Copyright (C) 2009 Red Hat Inc. * * Authors: * Luiz Capitulino * Anthony Liguori * Marc-André Lureau * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 1 /* * QEMU Object Model. * * Based on ideas by Avi Kivity * * Copyright (C) 2009, 2015 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * * QObject Reference Counts Terminology * ------------------------------------ * * - Returning references: A function that returns an object may * return it as either a weak or a strong reference. If the reference * is strong, you are responsible for calling QDECREF() on the reference * when you are done. * * If the reference is weak, the owner of the reference may free it at * any time in the future. Before storing the reference anywhere, you * should call QINCREF() to make the reference strong. * * - Transferring ownership: when you transfer ownership of a reference * by calling a function, you are no longer responsible for calling * QDECREF() when the reference is no longer needed. In other words, * when the function returns you must behave as if the reference to the * passed object was weak. */ # 19 "//qemu-2.11+dfsg/include/qapi/qmp/qnum.h" 2 typedef enum { QNUM_I64, QNUM_U64, QNUM_DOUBLE } QNumKind; /* * QNum encapsulates how our dialect of JSON fills in the blanks left * by the JSON specification (RFC 7159) regarding numbers. * * Conceptually, we treat number as an abstract type with three * concrete subtypes: floating-point, signed integer, unsigned * integer. QNum implements this as a discriminated union of double, * int64_t, uint64_t. * * The JSON parser picks the subtype as follows. If the number has a * decimal point or an exponent, it is floating-point. Else if it * fits into int64_t, it's signed integer. Else if it fits into * uint64_t, it's unsigned integer. Else it's floating-point. * * Any number can serve as double: qnum_get_double() converts under * the hood. * * An integer can serve as signed / unsigned integer as long as it is * in range: qnum_get_try_int() / qnum_get_try_uint() check range and * convert under the hood. */ typedef struct QNum { QObject base; QNumKind kind; union { int64_t i64; uint64_t u64; double dbl; } u; } QNum; QNum *qnum_from_int(int64_t value); QNum *qnum_from_uint(uint64_t value); QNum *qnum_from_double(double value); # 61 "//qemu-2.11+dfsg/include/qapi/qmp/qnum.h" 3 4 _Bool # 61 "//qemu-2.11+dfsg/include/qapi/qmp/qnum.h" qnum_get_try_int(const QNum *qn, int64_t *val); int64_t qnum_get_int(const QNum *qn); # 64 "//qemu-2.11+dfsg/include/qapi/qmp/qnum.h" 3 4 _Bool # 64 "//qemu-2.11+dfsg/include/qapi/qmp/qnum.h" qnum_get_try_uint(const QNum *qn, uint64_t *val); uint64_t qnum_get_uint(const QNum *qn); double qnum_get_double(QNum *qn); char *qnum_to_string(QNum *qn); QNum *qobject_to_qnum(const QObject *obj); # 72 "//qemu-2.11+dfsg/include/qapi/qmp/qnum.h" 3 4 _Bool # 72 "//qemu-2.11+dfsg/include/qapi/qmp/qnum.h" qnum_is_equal(const QObject *x, const QObject *y); void qnum_destroy_obj(QObject *obj); # 18 "//qemu-2.11+dfsg/include/qapi/qmp/qlist.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qnull.h" 1 /* * QNull * * Copyright (C) 2015 Red Hat, Inc. * * Authors: * Markus Armbruster * * This work is licensed under the terms of the GNU LGPL, version 2.1 * or later. See the COPYING.LIB file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 1 /* * QEMU Object Model. * * Based on ideas by Avi Kivity * * Copyright (C) 2009, 2015 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * * QObject Reference Counts Terminology * ------------------------------------ * * - Returning references: A function that returns an object may * return it as either a weak or a strong reference. If the reference * is strong, you are responsible for calling QDECREF() on the reference * when you are done. * * If the reference is weak, the owner of the reference may free it at * any time in the future. Before storing the reference anywhere, you * should call QINCREF() to make the reference strong. * * - Transferring ownership: when you transfer ownership of a reference * by calling a function, you are no longer responsible for calling * QDECREF() when the reference is no longer needed. In other words, * when the function returns you must behave as if the reference to the * passed object was weak. */ # 17 "//qemu-2.11+dfsg/include/qapi/qmp/qnull.h" 2 struct QNull { QObject base; }; extern QNull qnull_; static inline QNull *qnull(void) { qobject_incref((&(&qnull_)->base)); return &qnull_; } # 30 "//qemu-2.11+dfsg/include/qapi/qmp/qnull.h" 3 4 _Bool # 30 "//qemu-2.11+dfsg/include/qapi/qmp/qnull.h" qnull_is_equal(const QObject *x, const QObject *y); # 19 "//qemu-2.11+dfsg/include/qapi/qmp/qlist.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ # 20 "//qemu-2.11+dfsg/include/qapi/qmp/qlist.h" 2 typedef struct QListEntry { QObject *value; struct { struct QListEntry *tqe_next; /* next element */ struct QListEntry * *tqe_prev; /* address of previous next element */} next; } QListEntry; typedef struct QList { QObject base; struct { struct QListEntry *tqh_first; /* first element */ struct QListEntry * *tqh_last; /* addr of last next element */ } head; } QList; /* Helpers for int, bool, and string */ # 49 "//qemu-2.11+dfsg/include/qapi/qmp/qlist.h" static inline QObject *qlist_entry_obj(const QListEntry *entry) { return entry->value; } QList *qlist_new(void); QList *qlist_copy(QList *src); void qlist_append_obj(QList *qlist, QObject *obj); void qlist_iter(const QList *qlist, void (*iter)(QObject *obj, void *opaque), void *opaque); QObject *qlist_pop(QList *qlist); QObject *qlist_peek(QList *qlist); int qlist_empty(const QList *qlist); size_t qlist_size(const QList *qlist); QList *qobject_to_qlist(const QObject *obj); # 64 "//qemu-2.11+dfsg/include/qapi/qmp/qlist.h" 3 4 _Bool # 64 "//qemu-2.11+dfsg/include/qapi/qmp/qlist.h" qlist_is_equal(const QObject *x, const QObject *y); void qlist_destroy_obj(QObject *obj); static inline const QListEntry *qlist_first(const QList *qlist) { return ((&qlist->head)->tqh_first); } static inline const QListEntry *qlist_next(const QListEntry *entry) { return ((entry)->next.tqe_next); } # 18 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qnull.h" 1 /* * QNull * * Copyright (C) 2015 Red Hat, Inc. * * Authors: * Markus Armbruster * * This work is licensed under the terms of the GNU LGPL, version 2.1 * or later. See the COPYING.LIB file in the top-level directory. */ # 19 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qnum.h" 1 /* * QNum Module * * Copyright (C) 2009 Red Hat Inc. * * Authors: * Luiz Capitulino * Anthony Liguori * Marc-André Lureau * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 20 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ # 21 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 2 typedef struct QDictEntry { char *key; QObject *value; struct { struct QDictEntry *le_next; /* next element */ struct QDictEntry **le_prev; /* address of previous next element */ } next; } QDictEntry; typedef struct QDict { QObject base; size_t size; struct { struct QDictEntry *lh_first; /* first element */ } table[512]; } QDict; /* Object API */ QDict *qdict_new(void); const char *qdict_entry_key(const QDictEntry *entry); QObject *qdict_entry_value(const QDictEntry *entry); size_t qdict_size(const QDict *qdict); void qdict_put_obj(QDict *qdict, const char *key, QObject *value); void qdict_del(QDict *qdict, const char *key); int qdict_haskey(const QDict *qdict, const char *key); QObject *qdict_get(const QDict *qdict, const char *key); QDict *qobject_to_qdict(const QObject *obj); # 46 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 3 4 _Bool # 46 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" qdict_is_equal(const QObject *x, const QObject *y); void qdict_iter(const QDict *qdict, void (*iter)(const char *key, QObject *obj, void *opaque), void *opaque); const QDictEntry *qdict_first(const QDict *qdict); const QDictEntry *qdict_next(const QDict *qdict, const QDictEntry *entry); void qdict_destroy_obj(QObject *obj); /* Helper to qdict_put_obj(), accepts any object */ /* Helpers for int, bool, null, and string */ # 68 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" /* High level helpers */ double qdict_get_double(const QDict *qdict, const char *key); int64_t qdict_get_int(const QDict *qdict, const char *key); # 71 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 3 4 _Bool # 71 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" qdict_get_bool(const QDict *qdict, const char *key); QList *qdict_get_qlist(const QDict *qdict, const char *key); QDict *qdict_get_qdict(const QDict *qdict, const char *key); const char *qdict_get_str(const QDict *qdict, const char *key); int64_t qdict_get_try_int(const QDict *qdict, const char *key, int64_t def_value); # 77 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 3 4 _Bool # 77 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" qdict_get_try_bool(const QDict *qdict, const char *key, # 77 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 3 4 _Bool # 77 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" def_value); const char *qdict_get_try_str(const QDict *qdict, const char *key); void qdict_copy_default(QDict *dst, QDict *src, const char *key); void qdict_set_default_str(QDict *dst, const char *key, const char *val); QDict *qdict_clone_shallow(const QDict *src); void qdict_flatten(QDict *qdict); void qdict_extract_subqdict(QDict *src, QDict **dst, const char *start); void qdict_array_split(QDict *src, QList **dst); int qdict_array_entries(QDict *src, const char *subqdict); QObject *qdict_crumple(const QDict *src, Error **errp); void qdict_join(QDict *dest, QDict *src, # 91 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 3 4 _Bool # 91 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" overwrite); # 31 "//qemu-2.11+dfsg/include/qemu/option.h" 2 const char *get_opt_name(char *buf, int buf_size, const char *p, char delim); const char *get_opt_value(char *buf, int buf_size, const char *p); int get_next_param_value(char *buf, int buf_size, const char *tag, const char **pstr); int get_param_value(char *buf, int buf_size, const char *tag, const char *str); void parse_option_size(const char *name, const char *value, uint64_t *ret, Error **errp); # 42 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 42 "//qemu-2.11+dfsg/include/qemu/option.h" has_help_option(const char *param); # 43 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 43 "//qemu-2.11+dfsg/include/qemu/option.h" is_valid_option_list(const char *param); enum QemuOptType { QEMU_OPT_STRING = 0, /* no parsing (use string as-is) */ QEMU_OPT_BOOL, /* on/off */ QEMU_OPT_NUMBER, /* simple number */ QEMU_OPT_SIZE, /* size, accepts (K)ilo, (M)ega, (G)iga, (T)era postfix */ }; typedef struct QemuOptDesc { const char *name; enum QemuOptType type; const char *help; const char *def_value_str; } QemuOptDesc; struct QemuOptsList { const char *name; const char *implied_opt_name; # 62 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 62 "//qemu-2.11+dfsg/include/qemu/option.h" merge_lists; /* Merge multiple uses of option into a single list? */ struct { struct QemuOpts *tqh_first; /* first element */ struct QemuOpts * *tqh_last; /* addr of last next element */ } head; QemuOptDesc desc[]; }; const char *qemu_opt_get(QemuOpts *opts, const char *name); char *qemu_opt_get_del(QemuOpts *opts, const char *name); /** * qemu_opt_has_help_opt: * @opts: options to search for a help request * * Check whether the options specified by @opts include one of the * standard strings which indicate that the user is asking for a * list of the valid values for a command line option (as defined * by is_help_option()). * * Returns: true if @opts includes 'help' or equivalent. */ # 80 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 80 "//qemu-2.11+dfsg/include/qemu/option.h" qemu_opt_has_help_opt(QemuOpts *opts); QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name); # 82 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 82 "//qemu-2.11+dfsg/include/qemu/option.h" qemu_opt_get_bool(QemuOpts *opts, const char *name, # 82 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 82 "//qemu-2.11+dfsg/include/qemu/option.h" defval); uint64_t qemu_opt_get_number(QemuOpts *opts, const char *name, uint64_t defval); uint64_t qemu_opt_get_size(QemuOpts *opts, const char *name, uint64_t defval); # 85 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 85 "//qemu-2.11+dfsg/include/qemu/option.h" qemu_opt_get_bool_del(QemuOpts *opts, const char *name, # 85 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 85 "//qemu-2.11+dfsg/include/qemu/option.h" defval); uint64_t qemu_opt_get_number_del(QemuOpts *opts, const char *name, uint64_t defval); uint64_t qemu_opt_get_size_del(QemuOpts *opts, const char *name, uint64_t defval); int qemu_opt_unset(QemuOpts *opts, const char *name); void qemu_opt_set(QemuOpts *opts, const char *name, const char *value, Error **errp); void qemu_opt_set_bool(QemuOpts *opts, const char *name, # 93 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 93 "//qemu-2.11+dfsg/include/qemu/option.h" val, Error **errp); void qemu_opt_set_number(QemuOpts *opts, const char *name, int64_t val, Error **errp); typedef int (*qemu_opt_loopfunc)(void *opaque, const char *name, const char *value, Error **errp); int qemu_opt_foreach(QemuOpts *opts, qemu_opt_loopfunc func, void *opaque, Error **errp); typedef struct { QemuOpts *opts; QemuOpt *opt; const char *name; } QemuOptsIter; void qemu_opt_iter_init(QemuOptsIter *iter, QemuOpts *opts, const char *name); const char *qemu_opt_iter_next(QemuOptsIter *iter); QemuOpts *qemu_opts_find(QemuOptsList *list, const char *id); QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int fail_if_exists, Error **errp); void qemu_opts_reset(QemuOptsList *list); void qemu_opts_loc_restore(QemuOpts *opts); void qemu_opts_set(QemuOptsList *list, const char *id, const char *name, const char *value, Error **errp); const char *qemu_opts_id(QemuOpts *opts); void qemu_opts_set_id(QemuOpts *opts, char *id); void qemu_opts_del(QemuOpts *opts); void qemu_opts_validate(QemuOpts *opts, const QemuOptDesc *desc, Error **errp); void qemu_opts_do_parse(QemuOpts *opts, const char *params, const char *firstname, Error **errp); QemuOpts *qemu_opts_parse_noisily(QemuOptsList *list, const char *params, # 126 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 126 "//qemu-2.11+dfsg/include/qemu/option.h" permit_abbrev); QemuOpts *qemu_opts_parse(QemuOptsList *list, const char *params, # 128 "//qemu-2.11+dfsg/include/qemu/option.h" 3 4 _Bool # 128 "//qemu-2.11+dfsg/include/qemu/option.h" permit_abbrev, Error **errp); void qemu_opts_set_defaults(QemuOptsList *list, const char *params, int permit_abbrev); QemuOpts *qemu_opts_from_qdict(QemuOptsList *list, const QDict *qdict, Error **errp); QDict *qemu_opts_to_qdict(QemuOpts *opts, QDict *qdict); void qemu_opts_absorb_qdict(QemuOpts *opts, QDict *qdict, Error **errp); typedef int (*qemu_opts_loopfunc)(void *opaque, QemuOpts *opts, Error **errp); int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func, void *opaque, Error **errp); void qemu_opts_print(QemuOpts *opts, const char *sep); void qemu_opts_print_help(QemuOptsList *list); void qemu_opts_free(QemuOptsList *list); QemuOptsList *qemu_opts_append(QemuOptsList *dst, QemuOptsList *list); QDict *keyval_parse(const char *params, const char *implied_key, Error **errp); # 20 "//qemu-2.11+dfsg/include/qemu-common.h" 2 /* Copyright string for -version arguments, About dialogs, etc */ /* Bug reporting information for --help arguments, About dialogs, etc */ /* main function, renamed */ void qemu_get_timedate(struct tm *tm, int offset); int qemu_timedate_diff(struct tm *tm); # 54 "//qemu-2.11+dfsg/include/qemu-common.h" void *qemu_oom_check(void *ptr); ssize_t qemu_write_full(int fd, const void *buf, size_t count) __attribute__((warn_unused_result)); int qemu_pipe(int pipefd[2]); /* like openpty() but also makes it raw; return master fd */ int qemu_openpty_raw(int *aslave, char *pty_name); # 84 "//qemu-2.11+dfsg/include/qemu-common.h" extern # 84 "//qemu-2.11+dfsg/include/qemu-common.h" 3 4 _Bool # 84 "//qemu-2.11+dfsg/include/qemu-common.h" tcg_allowed; void tcg_exec_init(unsigned long tb_size); void cpu_exec_init_all(void); void cpu_exec_step_atomic(CPUState *cpu); /** * set_preferred_target_page_bits: * @bits: number of bits needed to represent an address within the page * * Set the preferred target page size (the actual target page * size may be smaller than any given CPU's preference). * Returns true on success, false on failure (which can only happen * if this is called after the system has already finalized its * choice of page size and the requested page size is smaller than that). */ # 105 "//qemu-2.11+dfsg/include/qemu-common.h" 3 4 _Bool # 105 "//qemu-2.11+dfsg/include/qemu-common.h" set_preferred_target_page_bits(int bits); /** * Sends a (part of) iovec down a socket, yielding when the socket is full, or * Receives data into a (part of) iovec from a socket, * yielding when there is no data in the socket. * The same interface as qemu_sendv_recvv(), with added yielding. * XXX should mark these as coroutine_fn */ ssize_t qemu_co_sendv_recvv(int sockfd, struct iovec *iov, unsigned iov_cnt, size_t offset, size_t bytes, # 115 "//qemu-2.11+dfsg/include/qemu-common.h" 3 4 _Bool # 115 "//qemu-2.11+dfsg/include/qemu-common.h" do_send); /** * The same as above, but with just a single buffer */ ssize_t qemu_co_send_recv(int sockfd, void *buf, size_t bytes, # 124 "//qemu-2.11+dfsg/include/qemu-common.h" 3 4 _Bool # 124 "//qemu-2.11+dfsg/include/qemu-common.h" do_send); void qemu_progress_init(int enabled, float min_skip); void qemu_progress_end(void); void qemu_progress_print(float delta, int max); const char *qemu_get_vm_name(void); char *qemu_find_file(int type, const char *name); /* OS specific functions */ void os_setup_early_signal_handling(void); char *os_find_datadir(void); void os_parse_cmd_args(int index, const char *optarg); # 1 "//qemu-2.11+dfsg/include/qemu/module.h" 1 /* * QEMU Module Infrastructure * * Copyright IBM, Corp. 2009 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * */ # 34 "//qemu-2.11+dfsg/include/qemu/module.h" /* This should not be used directly. Use block_init etc. instead. */ typedef enum { MODULE_INIT_BLOCK, MODULE_INIT_OPTS, MODULE_INIT_QOM, MODULE_INIT_TRACE, MODULE_INIT_MAX } module_init_type; # 57 "//qemu-2.11+dfsg/include/qemu/module.h" void register_module_init(void (*fn)(void), module_init_type type); void register_dso_module_init(void (*fn)(void), module_init_type type); void module_call_init(module_init_type type); void module_load_one(const char *prefix, const char *lib_name); # 145 "//qemu-2.11+dfsg/include/qemu-common.h" 2 /* * Hexdump a buffer to a file. An optional string prefix is added to every line */ void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size); /* * helper to parse debug environment variables */ int parse_debug_env(const char *name, int max, int initial); const char *qemu_ether_ntoa(const MACAddr *mac); char *size_to_str(uint64_t val); void page_size_init(void); /* returns non-zero if dump is in progress, otherwise zero is * returned. */ # 163 "//qemu-2.11+dfsg/include/qemu-common.h" 3 4 _Bool # 163 "//qemu-2.11+dfsg/include/qemu-common.h" dump_in_progress(void); # 5 "//qemu-2.11+dfsg/include/qemu/timer.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/notify.h" 1 /* * Notifier lists * * Copyright IBM, Corp. 2010 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * */ # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ # 18 "//qemu-2.11+dfsg/include/qemu/notify.h" 2 typedef struct Notifier Notifier; struct Notifier { void (*notify)(Notifier *notifier, void *data); struct { struct Notifier *le_next; /* next element */ struct Notifier **le_prev; /* address of previous next element */ } node; }; typedef struct NotifierList { struct { struct Notifier *lh_first; /* first element */ } notifiers; } NotifierList; void notifier_list_init(NotifierList *list); void notifier_list_add(NotifierList *list, Notifier *notifier); void notifier_remove(Notifier *notifier); void notifier_list_notify(NotifierList *list, void *data); /* Same as Notifier but allows .notify() to return errors */ typedef struct NotifierWithReturn NotifierWithReturn; struct NotifierWithReturn { /** * Return 0 on success (next notifier will be invoked), otherwise * notifier_with_return_list_notify() will stop and return the value. */ int (*notify)(NotifierWithReturn *notifier, void *data); struct { struct NotifierWithReturn *le_next; /* next element */ struct NotifierWithReturn **le_prev; /* address of previous next element */ } node; }; typedef struct NotifierWithReturnList { struct { struct NotifierWithReturn *lh_first; /* first element */ } notifiers; } NotifierWithReturnList; void notifier_with_return_list_init(NotifierWithReturnList *list); void notifier_with_return_list_add(NotifierWithReturnList *list, NotifierWithReturn *notifier); void notifier_with_return_remove(NotifierWithReturn *notifier); int notifier_with_return_list_notify(NotifierWithReturnList *list, void *data); # 6 "//qemu-2.11+dfsg/include/qemu/timer.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/host-utils.h" 1 /* * Utility compute operations used by translated code. * * Copyright (c) 2007 Thiemo Seufer * Copyright (c) 2007 Jocelyn Mayer * * 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. */ # 1 "//qemu-2.11+dfsg/include/qemu/bswap.h" 1 # 1 "//qemu-2.11+dfsg/include/fpu/softfloat.h" 1 /* * QEMU float support * * The code in this source file is derived from release 2a of the SoftFloat * IEC/IEEE Floating-point Arithmetic Package. Those parts of the code (and * some later contributions) are provided under that license, as detailed below. * It has subsequently been modified by contributors to the QEMU Project, * so some portions are provided under: * the SoftFloat-2a license * the BSD license * GPL-v2-or-later * * Any future contributions to this file after December 1st 2014 will be * taken to be licensed under the Softfloat-2a license unless specifically * indicated otherwise. */ /* =============================================================================== This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic Package, Release 2a. Written by John R. Hauser. This work was made possible in part by the International Computer Science Institute, located at Suite 600, 1947 Center Street, Berkeley, California 94704. Funding was partially provided by the National Science Foundation under grant MIP-9311980. The original version of this code was written as part of a project to build a fixed-point vector processor in collaboration with the University of California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek. More information is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ arithmetic/SoftFloat.html'. THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. Derivative works are acceptable, even for commercial purposes, so long as (1) they include prominent notice that the work is derivative, and (2) they include prominent notice akin to these four paragraphs for those parts of this code that are retained. =============================================================================== */ /* BSD licensing: * Copyright (c) 2006, Fabrice Bellard * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors * may be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ /* Portions of this work are licensed under the terms of the GNU GPL, * version 2 or later. See the COPYING file in the top-level directory. */ /* This 'flag' type must be able to hold at least 0 and 1. It should * probably be replaced with 'bool' but the uses would need to be audited * to check that they weren't accidentally relying on it being a larger type. */ typedef uint8_t flag; /*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point ordering relations *----------------------------------------------------------------------------*/ enum { float_relation_less = -1, float_relation_equal = 0, float_relation_greater = 1, float_relation_unordered = 2 }; /*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point types. *----------------------------------------------------------------------------*/ /* Use structures for soft-float types. This prevents accidentally mixing them with native int/float types. A sufficiently clever compiler and sane ABI should be able to see though these structs. However x86/gcc 3.x seems to struggle a bit, so leave them disabled by default. */ //#define USE_SOFTFLOAT_STRUCT_TYPES # 132 "//qemu-2.11+dfsg/include/fpu/softfloat.h" typedef uint16_t float16; typedef uint32_t float32; typedef uint64_t float64; # 145 "//qemu-2.11+dfsg/include/fpu/softfloat.h" typedef struct { uint64_t low; uint16_t high; } floatx80; typedef struct { uint64_t low, high; } float128; /*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point underflow tininess-detection mode. *----------------------------------------------------------------------------*/ enum { float_tininess_after_rounding = 0, float_tininess_before_rounding = 1 }; /*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point rounding mode. *----------------------------------------------------------------------------*/ enum { float_round_nearest_even = 0, float_round_down = 1, float_round_up = 2, float_round_to_zero = 3, float_round_ties_away = 4, /* Not an IEEE rounding mode: round to the closest odd mantissa value */ float_round_to_odd = 5, }; /*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point exception flags. *----------------------------------------------------------------------------*/ enum { float_flag_invalid = 1, float_flag_divbyzero = 4, float_flag_overflow = 8, float_flag_underflow = 16, float_flag_inexact = 32, float_flag_input_denormal = 64, float_flag_output_denormal = 128 }; typedef struct float_status { signed char float_detect_tininess; signed char float_rounding_mode; uint8_t float_exception_flags; signed char floatx80_rounding_precision; /* should denormalised results go to zero and set the inexact flag? */ flag flush_to_zero; /* should denormalised inputs go to zero and set the input_denormal flag? */ flag flush_inputs_to_zero; flag default_nan_mode; flag snan_bit_is_one; } float_status; static inline void set_float_detect_tininess(int val, float_status *status) { status->float_detect_tininess = val; } static inline void set_float_rounding_mode(int val, float_status *status) { status->float_rounding_mode = val; } static inline void set_float_exception_flags(int val, float_status *status) { status->float_exception_flags = val; } static inline void set_floatx80_rounding_precision(int val, float_status *status) { status->floatx80_rounding_precision = val; } static inline void set_flush_to_zero(flag val, float_status *status) { status->flush_to_zero = val; } static inline void set_flush_inputs_to_zero(flag val, float_status *status) { status->flush_inputs_to_zero = val; } static inline void set_default_nan_mode(flag val, float_status *status) { status->default_nan_mode = val; } static inline void set_snan_bit_is_one(flag val, float_status *status) { status->snan_bit_is_one = val; } static inline int get_float_detect_tininess(float_status *status) { return status->float_detect_tininess; } static inline int get_float_rounding_mode(float_status *status) { return status->float_rounding_mode; } static inline int get_float_exception_flags(float_status *status) { return status->float_exception_flags; } static inline int get_floatx80_rounding_precision(float_status *status) { return status->floatx80_rounding_precision; } static inline flag get_flush_to_zero(float_status *status) { return status->flush_to_zero; } static inline flag get_flush_inputs_to_zero(float_status *status) { return status->flush_inputs_to_zero; } static inline flag get_default_nan_mode(float_status *status) { return status->default_nan_mode; } /*---------------------------------------------------------------------------- | Routine to raise any or all of the software IEC/IEEE floating-point | exception flags. *----------------------------------------------------------------------------*/ void float_raise(uint8_t flags, float_status *status); /*---------------------------------------------------------------------------- | If `a' is denormal and we are in flush-to-zero mode then set the | input-denormal exception and return zero. Otherwise just return the value. *----------------------------------------------------------------------------*/ float32 float32_squash_input_denormal(float32 a, float_status *status); float64 float64_squash_input_denormal(float64 a, float_status *status); /*---------------------------------------------------------------------------- | Options to indicate which negations to perform in float*_muladd() | Using these differs from negating an input or output before calling | the muladd function in that this means that a NaN doesn't have its | sign bit inverted before it is propagated. | We also support halving the result before rounding, as a special | case to support the ARM fused-sqrt-step instruction FRSQRTS. *----------------------------------------------------------------------------*/ enum { float_muladd_negate_c = 1, float_muladd_negate_product = 2, float_muladd_negate_result = 4, float_muladd_halve_result = 8, }; /*---------------------------------------------------------------------------- | Software IEC/IEEE integer-to-floating-point conversion routines. *----------------------------------------------------------------------------*/ float32 int32_to_float32(int32_t, float_status *status); float64 int32_to_float64(int32_t, float_status *status); float32 uint32_to_float32(uint32_t, float_status *status); float64 uint32_to_float64(uint32_t, float_status *status); floatx80 int32_to_floatx80(int32_t, float_status *status); float128 int32_to_float128(int32_t, float_status *status); float32 int64_to_float32(int64_t, float_status *status); float64 int64_to_float64(int64_t, float_status *status); floatx80 int64_to_floatx80(int64_t, float_status *status); float128 int64_to_float128(int64_t, float_status *status); float32 uint64_to_float32(uint64_t, float_status *status); float64 uint64_to_float64(uint64_t, float_status *status); float128 uint64_to_float128(uint64_t, float_status *status); /* We provide the int16 versions for symmetry of API with float-to-int */ static inline float32 int16_to_float32(int16_t v, float_status *status) { return int32_to_float32(v, status); } static inline float32 uint16_to_float32(uint16_t v, float_status *status) { return uint32_to_float32(v, status); } static inline float64 int16_to_float64(int16_t v, float_status *status) { return int32_to_float64(v, status); } static inline float64 uint16_to_float64(uint16_t v, float_status *status) { return uint32_to_float64(v, status); } /*---------------------------------------------------------------------------- | Software half-precision conversion routines. *----------------------------------------------------------------------------*/ float16 float32_to_float16(float32, flag, float_status *status); float32 float16_to_float32(float16, flag, float_status *status); float16 float64_to_float16(float64 a, flag ieee, float_status *status); float64 float16_to_float64(float16 a, flag ieee, float_status *status); /*---------------------------------------------------------------------------- | Software half-precision operations. *----------------------------------------------------------------------------*/ int float16_is_quiet_nan(float16, float_status *status); int float16_is_signaling_nan(float16, float_status *status); float16 float16_maybe_silence_nan(float16, float_status *status); static inline int float16_is_any_nan(float16 a) { return (((a) & ~0x8000) > 0x7c00); } static inline int float16_is_neg(float16 a) { return (a) >> 15; } static inline int float16_is_infinity(float16 a) { return ((a) & 0x7fff) == 0x7c00; } static inline int float16_is_zero(float16 a) { return ((a) & 0x7fff) == 0; } static inline int float16_is_zero_or_denormal(float16 a) { return ((a) & 0x7c00) == 0; } /*---------------------------------------------------------------------------- | The pattern for a default generated half-precision NaN. *----------------------------------------------------------------------------*/ float16 float16_default_nan(float_status *status); /*---------------------------------------------------------------------------- | Software IEC/IEEE single-precision conversion routines. *----------------------------------------------------------------------------*/ int16_t float32_to_int16(float32, float_status *status); uint16_t float32_to_uint16(float32, float_status *status); int16_t float32_to_int16_round_to_zero(float32, float_status *status); uint16_t float32_to_uint16_round_to_zero(float32, float_status *status); int32_t float32_to_int32(float32, float_status *status); int32_t float32_to_int32_round_to_zero(float32, float_status *status); uint32_t float32_to_uint32(float32, float_status *status); uint32_t float32_to_uint32_round_to_zero(float32, float_status *status); int64_t float32_to_int64(float32, float_status *status); uint64_t float32_to_uint64(float32, float_status *status); uint64_t float32_to_uint64_round_to_zero(float32, float_status *status); int64_t float32_to_int64_round_to_zero(float32, float_status *status); float64 float32_to_float64(float32, float_status *status); floatx80 float32_to_floatx80(float32, float_status *status); float128 float32_to_float128(float32, float_status *status); /*---------------------------------------------------------------------------- | Software IEC/IEEE single-precision operations. *----------------------------------------------------------------------------*/ float32 float32_round_to_int(float32, float_status *status); float32 float32_add(float32, float32, float_status *status); float32 float32_sub(float32, float32, float_status *status); float32 float32_mul(float32, float32, float_status *status); float32 float32_div(float32, float32, float_status *status); float32 float32_rem(float32, float32, float_status *status); float32 float32_muladd(float32, float32, float32, int, float_status *status); float32 float32_sqrt(float32, float_status *status); float32 float32_exp2(float32, float_status *status); float32 float32_log2(float32, float_status *status); int float32_eq(float32, float32, float_status *status); int float32_le(float32, float32, float_status *status); int float32_lt(float32, float32, float_status *status); int float32_unordered(float32, float32, float_status *status); int float32_eq_quiet(float32, float32, float_status *status); int float32_le_quiet(float32, float32, float_status *status); int float32_lt_quiet(float32, float32, float_status *status); int float32_unordered_quiet(float32, float32, float_status *status); int float32_compare(float32, float32, float_status *status); int float32_compare_quiet(float32, float32, float_status *status); float32 float32_min(float32, float32, float_status *status); float32 float32_max(float32, float32, float_status *status); float32 float32_minnum(float32, float32, float_status *status); float32 float32_maxnum(float32, float32, float_status *status); float32 float32_minnummag(float32, float32, float_status *status); float32 float32_maxnummag(float32, float32, float_status *status); int float32_is_quiet_nan(float32, float_status *status); int float32_is_signaling_nan(float32, float_status *status); float32 float32_maybe_silence_nan(float32, float_status *status); float32 float32_scalbn(float32, int, float_status *status); static inline float32 float32_abs(float32 a) { /* Note that abs does *not* handle NaN specially, nor does * it flush denormal inputs to zero. */ return ((a) & 0x7fffffff); } static inline float32 float32_chs(float32 a) { /* Note that chs does *not* handle NaN specially, nor does * it flush denormal inputs to zero. */ return ((a) ^ 0x80000000); } static inline int float32_is_infinity(float32 a) { return ((a) & 0x7fffffff) == 0x7f800000; } static inline int float32_is_neg(float32 a) { return (a) >> 31; } static inline int float32_is_zero(float32 a) { return ((a) & 0x7fffffff) == 0; } static inline int float32_is_any_nan(float32 a) { return (((a) & ~(1 << 31)) > 0x7f800000UL); } static inline int float32_is_zero_or_denormal(float32 a) { return ((a) & 0x7f800000) == 0; } static inline float32 float32_set_sign(float32 a, int sign) { return (((a) & 0x7fffffff) | (sign << 31)); } # 488 "//qemu-2.11+dfsg/include/fpu/softfloat.h" /*---------------------------------------------------------------------------- | The pattern for a default generated single-precision NaN. *----------------------------------------------------------------------------*/ float32 float32_default_nan(float_status *status); /*---------------------------------------------------------------------------- | Software IEC/IEEE double-precision conversion routines. *----------------------------------------------------------------------------*/ int16_t float64_to_int16(float64, float_status *status); uint16_t float64_to_uint16(float64, float_status *status); int16_t float64_to_int16_round_to_zero(float64, float_status *status); uint16_t float64_to_uint16_round_to_zero(float64, float_status *status); int32_t float64_to_int32(float64, float_status *status); int32_t float64_to_int32_round_to_zero(float64, float_status *status); uint32_t float64_to_uint32(float64, float_status *status); uint32_t float64_to_uint32_round_to_zero(float64, float_status *status); int64_t float64_to_int64(float64, float_status *status); int64_t float64_to_int64_round_to_zero(float64, float_status *status); uint64_t float64_to_uint64(float64 a, float_status *status); uint64_t float64_to_uint64_round_to_zero(float64 a, float_status *status); float32 float64_to_float32(float64, float_status *status); floatx80 float64_to_floatx80(float64, float_status *status); float128 float64_to_float128(float64, float_status *status); /*---------------------------------------------------------------------------- | Software IEC/IEEE double-precision operations. *----------------------------------------------------------------------------*/ float64 float64_round_to_int(float64, float_status *status); float64 float64_trunc_to_int(float64, float_status *status); float64 float64_add(float64, float64, float_status *status); float64 float64_sub(float64, float64, float_status *status); float64 float64_mul(float64, float64, float_status *status); float64 float64_div(float64, float64, float_status *status); float64 float64_rem(float64, float64, float_status *status); float64 float64_muladd(float64, float64, float64, int, float_status *status); float64 float64_sqrt(float64, float_status *status); float64 float64_log2(float64, float_status *status); int float64_eq(float64, float64, float_status *status); int float64_le(float64, float64, float_status *status); int float64_lt(float64, float64, float_status *status); int float64_unordered(float64, float64, float_status *status); int float64_eq_quiet(float64, float64, float_status *status); int float64_le_quiet(float64, float64, float_status *status); int float64_lt_quiet(float64, float64, float_status *status); int float64_unordered_quiet(float64, float64, float_status *status); int float64_compare(float64, float64, float_status *status); int float64_compare_quiet(float64, float64, float_status *status); float64 float64_min(float64, float64, float_status *status); float64 float64_max(float64, float64, float_status *status); float64 float64_minnum(float64, float64, float_status *status); float64 float64_maxnum(float64, float64, float_status *status); float64 float64_minnummag(float64, float64, float_status *status); float64 float64_maxnummag(float64, float64, float_status *status); int float64_is_quiet_nan(float64 a, float_status *status); int float64_is_signaling_nan(float64, float_status *status); float64 float64_maybe_silence_nan(float64, float_status *status); float64 float64_scalbn(float64, int, float_status *status); static inline float64 float64_abs(float64 a) { /* Note that abs does *not* handle NaN specially, nor does * it flush denormal inputs to zero. */ return ((a) & 0x7fffffffffffffffLL); } static inline float64 float64_chs(float64 a) { /* Note that chs does *not* handle NaN specially, nor does * it flush denormal inputs to zero. */ return ((a) ^ 0x8000000000000000LL); } static inline int float64_is_infinity(float64 a) { return ((a) & 0x7fffffffffffffffLL ) == 0x7ff0000000000000LL; } static inline int float64_is_neg(float64 a) { return (a) >> 63; } static inline int float64_is_zero(float64 a) { return ((a) & 0x7fffffffffffffffLL) == 0; } static inline int float64_is_any_nan(float64 a) { return (((a) & ~(1ULL << 63)) > 0x7ff0000000000000ULL); } static inline int float64_is_zero_or_denormal(float64 a) { return ((a) & 0x7ff0000000000000LL) == 0; } static inline float64 float64_set_sign(float64 a, int sign) { return (((a) & 0x7fffffffffffffffULL) | ((int64_t)sign << 63)) ; } # 600 "//qemu-2.11+dfsg/include/fpu/softfloat.h" /*---------------------------------------------------------------------------- | The pattern for a default generated double-precision NaN. *----------------------------------------------------------------------------*/ float64 float64_default_nan(float_status *status); /*---------------------------------------------------------------------------- | Software IEC/IEEE extended double-precision conversion routines. *----------------------------------------------------------------------------*/ int32_t floatx80_to_int32(floatx80, float_status *status); int32_t floatx80_to_int32_round_to_zero(floatx80, float_status *status); int64_t floatx80_to_int64(floatx80, float_status *status); int64_t floatx80_to_int64_round_to_zero(floatx80, float_status *status); float32 floatx80_to_float32(floatx80, float_status *status); float64 floatx80_to_float64(floatx80, float_status *status); float128 floatx80_to_float128(floatx80, float_status *status); /*---------------------------------------------------------------------------- | Software IEC/IEEE extended double-precision operations. *----------------------------------------------------------------------------*/ floatx80 floatx80_round(floatx80 a, float_status *status); floatx80 floatx80_round_to_int(floatx80, float_status *status); floatx80 floatx80_add(floatx80, floatx80, float_status *status); floatx80 floatx80_sub(floatx80, floatx80, float_status *status); floatx80 floatx80_mul(floatx80, floatx80, float_status *status); floatx80 floatx80_div(floatx80, floatx80, float_status *status); floatx80 floatx80_rem(floatx80, floatx80, float_status *status); floatx80 floatx80_sqrt(floatx80, float_status *status); int floatx80_eq(floatx80, floatx80, float_status *status); int floatx80_le(floatx80, floatx80, float_status *status); int floatx80_lt(floatx80, floatx80, float_status *status); int floatx80_unordered(floatx80, floatx80, float_status *status); int floatx80_eq_quiet(floatx80, floatx80, float_status *status); int floatx80_le_quiet(floatx80, floatx80, float_status *status); int floatx80_lt_quiet(floatx80, floatx80, float_status *status); int floatx80_unordered_quiet(floatx80, floatx80, float_status *status); int floatx80_compare(floatx80, floatx80, float_status *status); int floatx80_compare_quiet(floatx80, floatx80, float_status *status); int floatx80_is_quiet_nan(floatx80, float_status *status); int floatx80_is_signaling_nan(floatx80, float_status *status); floatx80 floatx80_maybe_silence_nan(floatx80, float_status *status); floatx80 floatx80_scalbn(floatx80, int, float_status *status); static inline floatx80 floatx80_abs(floatx80 a) { a.high &= 0x7fff; return a; } static inline floatx80 floatx80_chs(floatx80 a) { a.high ^= 0x8000; return a; } static inline int floatx80_is_infinity(floatx80 a) { return (a.high & 0x7fff) == 0x7fff && a.low == 0x8000000000000000LL; } static inline int floatx80_is_neg(floatx80 a) { return a.high >> 15; } static inline int floatx80_is_zero(floatx80 a) { return (a.high & 0x7fff) == 0 && a.low == 0; } static inline int floatx80_is_zero_or_denormal(floatx80 a) { return (a.high & 0x7fff) == 0; } static inline int floatx80_is_any_nan(floatx80 a) { return ((a.high & 0x7fff) == 0x7fff) && (a.low<<1); } /*---------------------------------------------------------------------------- | Return whether the given value is an invalid floatx80 encoding. | Invalid floatx80 encodings arise when the integer bit is not set, but | the exponent is not zero. The only times the integer bit is permitted to | be zero is in subnormal numbers and the value zero. | This includes what the Intel software developer's manual calls pseudo-NaNs, | pseudo-infinities and un-normal numbers. It does not include | pseudo-denormals, which must still be correctly handled as inputs even | if they are never generated as outputs. *----------------------------------------------------------------------------*/ static inline # 689 "//qemu-2.11+dfsg/include/fpu/softfloat.h" 3 4 _Bool # 689 "//qemu-2.11+dfsg/include/fpu/softfloat.h" floatx80_invalid_encoding(floatx80 a) { return (a.low & (1ULL << 63)) == 0 && (a.high & 0x7FFF) != 0; } # 701 "//qemu-2.11+dfsg/include/fpu/softfloat.h" /*---------------------------------------------------------------------------- | The pattern for a default generated extended double-precision NaN. *----------------------------------------------------------------------------*/ floatx80 floatx80_default_nan(float_status *status); /*---------------------------------------------------------------------------- | Software IEC/IEEE quadruple-precision conversion routines. *----------------------------------------------------------------------------*/ int32_t float128_to_int32(float128, float_status *status); int32_t float128_to_int32_round_to_zero(float128, float_status *status); int64_t float128_to_int64(float128, float_status *status); int64_t float128_to_int64_round_to_zero(float128, float_status *status); uint64_t float128_to_uint64(float128, float_status *status); uint64_t float128_to_uint64_round_to_zero(float128, float_status *status); uint32_t float128_to_uint32_round_to_zero(float128, float_status *status); float32 float128_to_float32(float128, float_status *status); float64 float128_to_float64(float128, float_status *status); floatx80 float128_to_floatx80(float128, float_status *status); /*---------------------------------------------------------------------------- | Software IEC/IEEE quadruple-precision operations. *----------------------------------------------------------------------------*/ float128 float128_round_to_int(float128, float_status *status); float128 float128_add(float128, float128, float_status *status); float128 float128_sub(float128, float128, float_status *status); float128 float128_mul(float128, float128, float_status *status); float128 float128_div(float128, float128, float_status *status); float128 float128_rem(float128, float128, float_status *status); float128 float128_sqrt(float128, float_status *status); int float128_eq(float128, float128, float_status *status); int float128_le(float128, float128, float_status *status); int float128_lt(float128, float128, float_status *status); int float128_unordered(float128, float128, float_status *status); int float128_eq_quiet(float128, float128, float_status *status); int float128_le_quiet(float128, float128, float_status *status); int float128_lt_quiet(float128, float128, float_status *status); int float128_unordered_quiet(float128, float128, float_status *status); int float128_compare(float128, float128, float_status *status); int float128_compare_quiet(float128, float128, float_status *status); int float128_is_quiet_nan(float128, float_status *status); int float128_is_signaling_nan(float128, float_status *status); float128 float128_maybe_silence_nan(float128, float_status *status); float128 float128_scalbn(float128, int, float_status *status); static inline float128 float128_abs(float128 a) { a.high &= 0x7fffffffffffffffLL; return a; } static inline float128 float128_chs(float128 a) { a.high ^= 0x8000000000000000LL; return a; } static inline int float128_is_infinity(float128 a) { return (a.high & 0x7fffffffffffffffLL) == 0x7fff000000000000LL && a.low == 0; } static inline int float128_is_neg(float128 a) { return a.high >> 63; } static inline int float128_is_zero(float128 a) { return (a.high & 0x7fffffffffffffffLL) == 0 && a.low == 0; } static inline int float128_is_zero_or_denormal(float128 a) { return (a.high & 0x7fff000000000000LL) == 0; } static inline int float128_is_any_nan(float128 a) { return ((a.high >> 48) & 0x7fff) == 0x7fff && ((a.low != 0) || ((a.high & 0xffffffffffffLL) != 0)); } /*---------------------------------------------------------------------------- | The pattern for a default generated quadruple-precision NaN. *----------------------------------------------------------------------------*/ float128 float128_default_nan(float_status *status); # 5 "//qemu-2.11+dfsg/include/qemu/bswap.h" 2 # 1 "/usr/include/byteswap.h" 1 3 4 # 1 "/usr/include/byteswap.h" 3 4 /* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/byteswap.h" 2 3 4 /* Get the machine specific, optimized definitions. */ # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 /* Macros to swap the order of bytes in integer values. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 25 "/usr/include/byteswap.h" 2 3 4 /* The following definitions must all be macros since otherwise some of the possible optimizations are not possible. */ /* Return a value with all bytes in the 16 bit argument swapped. */ /* Return a value with all bytes in the 32 bit argument swapped. */ /* Return a value with all bytes in the 64 bit argument swapped. */ # 13 "//qemu-2.11+dfsg/include/qemu/bswap.h" 2 # 14 "//qemu-2.11+dfsg/include/qemu/bswap.h" static inline uint16_t bswap16(uint16_t x) { return # 16 "//qemu-2.11+dfsg/include/qemu/bswap.h" 3 4 (__extension__ ({ unsigned short int __v, __x = (unsigned short int) ( # 16 "//qemu-2.11+dfsg/include/qemu/bswap.h" x # 16 "//qemu-2.11+dfsg/include/qemu/bswap.h" 3 4 ); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })) # 16 "//qemu-2.11+dfsg/include/qemu/bswap.h" ; } static inline uint32_t bswap32(uint32_t x) { return # 21 "//qemu-2.11+dfsg/include/qemu/bswap.h" 3 4 __bswap_32 ( # 21 "//qemu-2.11+dfsg/include/qemu/bswap.h" x # 21 "//qemu-2.11+dfsg/include/qemu/bswap.h" 3 4 ) # 21 "//qemu-2.11+dfsg/include/qemu/bswap.h" ; } static inline uint64_t bswap64(uint64_t x) { return # 26 "//qemu-2.11+dfsg/include/qemu/bswap.h" 3 4 __bswap_64 ( # 26 "//qemu-2.11+dfsg/include/qemu/bswap.h" x # 26 "//qemu-2.11+dfsg/include/qemu/bswap.h" 3 4 ) # 26 "//qemu-2.11+dfsg/include/qemu/bswap.h" ; } # 56 "//qemu-2.11+dfsg/include/qemu/bswap.h" static inline void bswap16s(uint16_t *s) { *s = bswap16(*s); } static inline void bswap32s(uint32_t *s) { *s = bswap32(*s); } static inline void bswap64s(uint64_t *s) { *s = bswap64(*s); } # 83 "//qemu-2.11+dfsg/include/qemu/bswap.h" /** * Endianness conversion functions between host cpu and specified endianness. * (We list the complete set of prototypes produced by the macros below * to assist people who search the headers to find their definitions.) * * uint16_t le16_to_cpu(uint16_t v); * uint32_t le32_to_cpu(uint32_t v); * uint64_t le64_to_cpu(uint64_t v); * uint16_t be16_to_cpu(uint16_t v); * uint32_t be32_to_cpu(uint32_t v); * uint64_t be64_to_cpu(uint64_t v); * * Convert the value @v from the specified format to the native * endianness of the host CPU by byteswapping if necessary, and * return the converted value. * * uint16_t cpu_to_le16(uint16_t v); * uint32_t cpu_to_le32(uint32_t v); * uint64_t cpu_to_le64(uint64_t v); * uint16_t cpu_to_be16(uint16_t v); * uint32_t cpu_to_be32(uint32_t v); * uint64_t cpu_to_be64(uint64_t v); * * Convert the value @v from the native endianness of the host CPU to * the specified format by byteswapping if necessary, and return * the converted value. * * void le16_to_cpus(uint16_t *v); * void le32_to_cpus(uint32_t *v); * void le64_to_cpus(uint64_t *v); * void be16_to_cpus(uint16_t *v); * void be32_to_cpus(uint32_t *v); * void be64_to_cpus(uint64_t *v); * * Do an in-place conversion of the value pointed to by @v from the * specified format to the native endianness of the host CPU. * * void cpu_to_le16s(uint16_t *v); * void cpu_to_le32s(uint32_t *v); * void cpu_to_le64s(uint64_t *v); * void cpu_to_be16s(uint16_t *v); * void cpu_to_be32s(uint32_t *v); * void cpu_to_be64s(uint64_t *v); * * Do an in-place conversion of the value pointed to by @v from the * native endianness of the host CPU to the specified format. * * Both X_to_cpu() and cpu_to_X() perform the same operation; you * should use whichever one is better documenting of the function your * code is performing. * * Do not use these functions for conversion of values which are in guest * memory, since the data may not be sufficiently aligned for the host CPU's * load and store instructions. Instead you should use the ld*_p() and * st*_p() functions, which perform loads and stores of data of any * required size and endianness and handle possible misalignment. */ # 162 "//qemu-2.11+dfsg/include/qemu/bswap.h" static inline uint16_t be16_to_cpu(uint16_t v){ return bswap16(v);}static inline uint16_t cpu_to_be16(uint16_t v){ return bswap16(v);}static inline void be16_to_cpus(uint16_t *p){ do { *p = bswap16(*p); } while(0);}static inline void cpu_to_be16s(uint16_t *p){ do { *p = bswap16(*p); } while(0);} static inline uint32_t be32_to_cpu(uint32_t v){ return bswap32(v);}static inline uint32_t cpu_to_be32(uint32_t v){ return bswap32(v);}static inline void be32_to_cpus(uint32_t *p){ do { *p = bswap32(*p); } while(0);}static inline void cpu_to_be32s(uint32_t *p){ do { *p = bswap32(*p); } while(0);} static inline uint64_t be64_to_cpu(uint64_t v){ return bswap64(v);}static inline uint64_t cpu_to_be64(uint64_t v){ return bswap64(v);}static inline void be64_to_cpus(uint64_t *p){ do { *p = bswap64(*p); } while(0);}static inline void cpu_to_be64s(uint64_t *p){ do { *p = bswap64(*p); } while(0);} static inline uint16_t le16_to_cpu(uint16_t v){ return (v);}static inline uint16_t cpu_to_le16(uint16_t v){ return (v);}static inline void le16_to_cpus(uint16_t *p){ ;}static inline void cpu_to_le16s(uint16_t *p){ ;} static inline uint32_t le32_to_cpu(uint32_t v){ return (v);}static inline uint32_t cpu_to_le32(uint32_t v){ return (v);}static inline void le32_to_cpus(uint32_t *p){ ;}static inline void cpu_to_le32s(uint32_t *p){ ;} static inline uint64_t le64_to_cpu(uint64_t v){ return (v);}static inline uint64_t cpu_to_le64(uint64_t v){ return (v);}static inline void le64_to_cpus(uint64_t *p){ ;}static inline void cpu_to_le64s(uint64_t *p){ ;} /* len must be one of 1, 2, 4 */ static inline uint32_t qemu_bswap_len(uint32_t value, int len) { return bswap32(value) >> (32 - 8 * len); } /* * Same as cpu_to_le{16,32}, except that gcc will figure the result is * a compile-time constant if you pass in a constant. So this can be * used to initialize static variables. */ # 195 "//qemu-2.11+dfsg/include/qemu/bswap.h" /* Unions for reinterpreting between floats and integers. */ typedef union { float32 f; uint32_t l; } CPU_FloatU; typedef union { float64 d; struct { uint32_t lower; uint32_t upper; } l; uint64_t ll; } CPU_DoubleU; typedef union { floatx80 d; struct { uint64_t lower; uint16_t upper; } l; } CPU_LDoubleU; typedef union { float128 q; # 240 "//qemu-2.11+dfsg/include/qemu/bswap.h" struct { uint32_t lowest; uint32_t lower; uint32_t upper; uint32_t upmost; } l; struct { uint64_t lower; uint64_t upper; } ll; } CPU_QuadU; /* unaligned/endian-independent pointer access */ /* * the generic syntax is: * * load: ld{type}{sign}{size}{endian}_p(ptr) * * store: st{type}{size}{endian}_p(ptr, val) * * Note there are small differences with the softmmu access API! * * type is: * (empty): integer access * f : float access * * sign is: * (empty): for 32 or 64 bit sizes (including floats and doubles) * u : unsigned * s : signed * * size is: * b: 8 bits * w: 16 bits * l: 32 bits * q: 64 bits * * endian is: * he : host endian * be : big endian * le : little endian * te : target endian * (except for byte accesses, which have no endian infix). * * The target endian accessors are obviously only available to source * files which are built per-target; they are defined in cpu-all.h. * * In all cases these functions take a host pointer. * For accessors that take a guest address rather than a * host address, see the cpu_{ld,st}_* accessors defined in * cpu_ldst.h. */ static inline int ldub_p(const void *ptr) { return *(uint8_t *)ptr; } static inline int ldsb_p(const void *ptr) { return *(int8_t *)ptr; } static inline void stb_p(void *ptr, uint8_t v) { *(uint8_t *)ptr = v; } /* Any compiler worth its salt will turn these memcpy into native unaligned operations. Thus we don't need to play games with packed attributes, or inline byte-by-byte stores. */ static inline int lduw_he_p(const void *ptr) { uint16_t r; memcpy(&r, ptr, sizeof(r)); return r; } static inline int ldsw_he_p(const void *ptr) { int16_t r; memcpy(&r, ptr, sizeof(r)); return r; } static inline void stw_he_p(void *ptr, uint16_t v) { memcpy(ptr, &v, sizeof(v)); } static inline int ldl_he_p(const void *ptr) { int32_t r; memcpy(&r, ptr, sizeof(r)); return r; } static inline void stl_he_p(void *ptr, uint32_t v) { memcpy(ptr, &v, sizeof(v)); } static inline uint64_t ldq_he_p(const void *ptr) { uint64_t r; memcpy(&r, ptr, sizeof(r)); return r; } static inline void stq_he_p(void *ptr, uint64_t v) { memcpy(ptr, &v, sizeof(v)); } static inline int lduw_le_p(const void *ptr) { return (uint16_t)(lduw_he_p(ptr)); } static inline int ldsw_le_p(const void *ptr) { return (int16_t)(lduw_he_p(ptr)); } static inline int ldl_le_p(const void *ptr) { return (ldl_he_p(ptr)); } static inline uint64_t ldq_le_p(const void *ptr) { return (ldq_he_p(ptr)); } static inline void stw_le_p(void *ptr, uint16_t v) { stw_he_p(ptr, (v)); } static inline void stl_le_p(void *ptr, uint32_t v) { stl_he_p(ptr, (v)); } static inline void stq_le_p(void *ptr, uint64_t v) { stq_he_p(ptr, (v)); } /* float access */ static inline float32 ldfl_le_p(const void *ptr) { CPU_FloatU u; u.l = ldl_le_p(ptr); return u.f; } static inline void stfl_le_p(void *ptr, float32 v) { CPU_FloatU u; u.f = v; stl_le_p(ptr, u.l); } static inline float64 ldfq_le_p(const void *ptr) { CPU_DoubleU u; u.ll = ldq_le_p(ptr); return u.d; } static inline void stfq_le_p(void *ptr, float64 v) { CPU_DoubleU u; u.d = v; stq_le_p(ptr, u.ll); } static inline int lduw_be_p(const void *ptr) { return (uint16_t)bswap16(lduw_he_p(ptr)); } static inline int ldsw_be_p(const void *ptr) { return (int16_t)bswap16(lduw_he_p(ptr)); } static inline int ldl_be_p(const void *ptr) { return bswap32(ldl_he_p(ptr)); } static inline uint64_t ldq_be_p(const void *ptr) { return bswap64(ldq_he_p(ptr)); } static inline void stw_be_p(void *ptr, uint16_t v) { stw_he_p(ptr, bswap16(v)); } static inline void stl_be_p(void *ptr, uint32_t v) { stl_he_p(ptr, bswap32(v)); } static inline void stq_be_p(void *ptr, uint64_t v) { stq_he_p(ptr, bswap64(v)); } /* float access */ static inline float32 ldfl_be_p(const void *ptr) { CPU_FloatU u; u.l = ldl_be_p(ptr); return u.f; } static inline void stfl_be_p(void *ptr, float32 v) { CPU_FloatU u; u.f = v; stl_be_p(ptr, u.l); } static inline float64 ldfq_be_p(const void *ptr) { CPU_DoubleU u; u.ll = ldq_be_p(ptr); return u.d; } static inline void stfq_be_p(void *ptr, float64 v) { CPU_DoubleU u; u.d = v; stq_be_p(ptr, u.ll); } static inline unsigned long leul_to_cpu(unsigned long v) { return (v); } # 30 "//qemu-2.11+dfsg/include/qemu/host-utils.h" 2 static inline void mulu64(uint64_t *plow, uint64_t *phigh, uint64_t a, uint64_t b) { __uint128_t r = (__uint128_t)a * b; *plow = r; *phigh = r >> 64; } static inline void muls64(uint64_t *plow, uint64_t *phigh, int64_t a, int64_t b) { __int128_t r = (__int128_t)a * b; *plow = r; *phigh = r >> 64; } /* compute with 96 bit intermediate result: (a*b)/c */ static inline uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c) { return (__int128_t)a * b / c; } static inline int divu128(uint64_t *plow, uint64_t *phigh, uint64_t divisor) { if (divisor == 0) { return 1; } else { __uint128_t dividend = ((__uint128_t)*phigh << 64) | *plow; __uint128_t result = dividend / divisor; *plow = result; *phigh = dividend % divisor; return result > # 63 "//qemu-2.11+dfsg/include/qemu/host-utils.h" 3 4 (18446744073709551615UL) # 63 "//qemu-2.11+dfsg/include/qemu/host-utils.h" ; } } static inline int divs128(int64_t *plow, int64_t *phigh, int64_t divisor) { if (divisor == 0) { return 1; } else { __int128_t dividend = ((__int128_t)*phigh << 64) | *plow; __int128_t result = dividend / divisor; *plow = result; *phigh = dividend % divisor; return result != *plow; } } # 109 "//qemu-2.11+dfsg/include/qemu/host-utils.h" /** * clz32 - count leading zeros in a 32-bit value. * @val: The value to search * * Returns 32 if the value is zero. Note that the GCC builtin is * undefined if the value is zero. */ static inline int clz32(uint32_t val) { return val ? __builtin_clz(val) : 32; } /** * clo32 - count leading ones in a 32-bit value. * @val: The value to search * * Returns 32 if the value is -1. */ static inline int clo32(uint32_t val) { return clz32(~val); } /** * clz64 - count leading zeros in a 64-bit value. * @val: The value to search * * Returns 64 if the value is zero. Note that the GCC builtin is * undefined if the value is zero. */ static inline int clz64(uint64_t val) { return val ? __builtin_clzll(val) : 64; } /** * clo64 - count leading ones in a 64-bit value. * @val: The value to search * * Returns 64 if the value is -1. */ static inline int clo64(uint64_t val) { return clz64(~val); } /** * ctz32 - count trailing zeros in a 32-bit value. * @val: The value to search * * Returns 32 if the value is zero. Note that the GCC builtin is * undefined if the value is zero. */ static inline int ctz32(uint32_t val) { return val ? __builtin_ctz(val) : 32; } /** * cto32 - count trailing ones in a 32-bit value. * @val: The value to search * * Returns 32 if the value is -1. */ static inline int cto32(uint32_t val) { return ctz32(~val); } /** * ctz64 - count trailing zeros in a 64-bit value. * @val: The value to search * * Returns 64 if the value is zero. Note that the GCC builtin is * undefined if the value is zero. */ static inline int ctz64(uint64_t val) { return val ? __builtin_ctzll(val) : 64; } /** * cto64 - count trailing ones in a 64-bit value. * @val: The value to search * * Returns 64 if the value is -1. */ static inline int cto64(uint64_t val) { return ctz64(~val); } /** * clrsb32 - count leading redundant sign bits in a 32-bit value. * @val: The value to search * * Returns the number of bits following the sign bit that are equal to it. * No special cases; output range is [0-31]. */ static inline int clrsb32(uint32_t val) { return __builtin_clrsb(val); } /** * clrsb64 - count leading redundant sign bits in a 64-bit value. * @val: The value to search * * Returns the number of bits following the sign bit that are equal to it. * No special cases; output range is [0-63]. */ static inline int clrsb64(uint64_t val) { return __builtin_clrsbll(val); } /** * ctpop8 - count the population of one bits in an 8-bit value. * @val: The value to search */ static inline int ctpop8(uint8_t val) { return __builtin_popcount(val); } /** * ctpop16 - count the population of one bits in a 16-bit value. * @val: The value to search */ static inline int ctpop16(uint16_t val) { return __builtin_popcount(val); } /** * ctpop32 - count the population of one bits in a 32-bit value. * @val: The value to search */ static inline int ctpop32(uint32_t val) { return __builtin_popcount(val); } /** * ctpop64 - count the population of one bits in a 64-bit value. * @val: The value to search */ static inline int ctpop64(uint64_t val) { return __builtin_popcountll(val); } /** * revbit8 - reverse the bits in an 8-bit value. * @x: The value to modify. */ static inline uint8_t revbit8(uint8_t x) { /* Assign the correct nibble position. */ x = ((x & 0xf0) >> 4) | ((x & 0x0f) << 4); /* Assign the correct bit position. */ x = ((x & 0x88) >> 3) | ((x & 0x44) >> 1) | ((x & 0x22) << 1) | ((x & 0x11) << 3); return x; } /** * revbit16 - reverse the bits in a 16-bit value. * @x: The value to modify. */ static inline uint16_t revbit16(uint16_t x) { /* Assign the correct byte position. */ x = bswap16(x); /* Assign the correct nibble position. */ x = ((x & 0xf0f0) >> 4) | ((x & 0x0f0f) << 4); /* Assign the correct bit position. */ x = ((x & 0x8888) >> 3) | ((x & 0x4444) >> 1) | ((x & 0x2222) << 1) | ((x & 0x1111) << 3); return x; } /** * revbit32 - reverse the bits in a 32-bit value. * @x: The value to modify. */ static inline uint32_t revbit32(uint32_t x) { /* Assign the correct byte position. */ x = bswap32(x); /* Assign the correct nibble position. */ x = ((x & 0xf0f0f0f0u) >> 4) | ((x & 0x0f0f0f0fu) << 4); /* Assign the correct bit position. */ x = ((x & 0x88888888u) >> 3) | ((x & 0x44444444u) >> 1) | ((x & 0x22222222u) << 1) | ((x & 0x11111111u) << 3); return x; } /** * revbit64 - reverse the bits in a 64-bit value. * @x: The value to modify. */ static inline uint64_t revbit64(uint64_t x) { /* Assign the correct byte position. */ x = bswap64(x); /* Assign the correct nibble position. */ x = ((x & 0xf0f0f0f0f0f0f0f0ull) >> 4) | ((x & 0x0f0f0f0f0f0f0f0full) << 4); /* Assign the correct bit position. */ x = ((x & 0x8888888888888888ull) >> 3) | ((x & 0x4444444444444444ull) >> 1) | ((x & 0x2222222222222222ull) << 1) | ((x & 0x1111111111111111ull) << 3); return x; } /* Host type specific sizes of these routines. */ # 363 "//qemu-2.11+dfsg/include/qemu/host-utils.h" static inline # 363 "//qemu-2.11+dfsg/include/qemu/host-utils.h" 3 4 _Bool # 363 "//qemu-2.11+dfsg/include/qemu/host-utils.h" is_power_of_2(uint64_t value) { if (!value) { return # 366 "//qemu-2.11+dfsg/include/qemu/host-utils.h" 3 4 0 # 366 "//qemu-2.11+dfsg/include/qemu/host-utils.h" ; } return !(value & (value - 1)); } /** * Return @value rounded down to the nearest power of two or zero. */ static inline uint64_t pow2floor(uint64_t value) { if (!value) { /* Avoid undefined shift by 64 */ return 0; } return 0x8000000000000000ull >> clz64(value); } /* * Return @value rounded up to the nearest power of two modulo 2^64. * This is *zero* for @value > 2^63, so be careful. */ static inline uint64_t pow2ceil(uint64_t value) { int n = clz64(value - 1); if (!n) { /* * @value - 1 has no leading zeroes, thus @value - 1 >= 2^63 * Therefore, either @value == 0 or @value > 2^63. * If it's 0, return 1, else return 0. */ return !value; } return 0x8000000000000000ull >> (n - 1); } /** * urshift - 128-bit Unsigned Right Shift. * @plow: in/out - lower 64-bit integer. * @phigh: in/out - higher 64-bit integer. * @shift: in - bytes to shift, between 0 and 127. * * Result is zero-extended and stored in plow/phigh, which are * input/output variables. Shift values outside the range will * be mod to 128. In other words, the caller is responsible to * verify/assert both the shift range and plow/phigh pointers. */ void urshift(uint64_t *plow, uint64_t *phigh, int32_t shift); /** * ulshift - 128-bit Unsigned Left Shift. * @plow: in/out - lower 64-bit integer. * @phigh: in/out - higher 64-bit integer. * @shift: in - bytes to shift, between 0 and 127. * @overflow: out - true if any 1-bit is shifted out. * * Result is zero-extended and stored in plow/phigh, which are * input/output variables. Shift values outside the range will * be mod to 128. In other words, the caller is responsible to * verify/assert both the shift range and plow/phigh pointers. */ void ulshift(uint64_t *plow, uint64_t *phigh, int32_t shift, # 428 "//qemu-2.11+dfsg/include/qemu/host-utils.h" 3 4 _Bool # 428 "//qemu-2.11+dfsg/include/qemu/host-utils.h" *overflow); # 7 "//qemu-2.11+dfsg/include/qemu/timer.h" 2 /* timers */ /** * QEMUClockType: * * The following clock types are available: * * @QEMU_CLOCK_REALTIME: Real time clock * * The real time clock should be used only for stuff which does not * change the virtual machine state, as it runs even if the virtual * machine is stopped. * * @QEMU_CLOCK_VIRTUAL: virtual clock * * The virtual clock only runs during the emulation. It stops * when the virtual machine is stopped. * * @QEMU_CLOCK_HOST: host clock * * The host clock should be used for device models that emulate accurate * real time sources. It will continue to run when the virtual machine * is suspended, and it will reflect system time changes the host may * undergo (e.g. due to NTP). * * @QEMU_CLOCK_VIRTUAL_RT: realtime clock used for icount warp * * Outside icount mode, this clock is the same as @QEMU_CLOCK_VIRTUAL. * In icount mode, this clock counts nanoseconds while the virtual * machine is running. It is used to increase @QEMU_CLOCK_VIRTUAL * while the CPUs are sleeping and thus not executing instructions. */ typedef enum { QEMU_CLOCK_REALTIME = 0, QEMU_CLOCK_VIRTUAL = 1, QEMU_CLOCK_HOST = 2, QEMU_CLOCK_VIRTUAL_RT = 3, QEMU_CLOCK_MAX } QEMUClockType; typedef struct QEMUTimerList QEMUTimerList; struct QEMUTimerListGroup { QEMUTimerList *tl[QEMU_CLOCK_MAX]; }; typedef void QEMUTimerCB(void *opaque); typedef void QEMUTimerListNotifyCB(void *opaque, QEMUClockType type); struct QEMUTimer { int64_t expire_time; /* in nanoseconds */ QEMUTimerList *timer_list; QEMUTimerCB *cb; void *opaque; QEMUTimer *next; int scale; }; extern QEMUTimerListGroup main_loop_tlg; /* * qemu_clock_get_ns; * @type: the clock type * * Get the nanosecond value of a clock with * type @type * * Returns: the clock value in nanoseconds */ int64_t qemu_clock_get_ns(QEMUClockType type); /** * qemu_clock_get_ms; * @type: the clock type * * Get the millisecond value of a clock with * type @type * * Returns: the clock value in milliseconds */ static inline int64_t qemu_clock_get_ms(QEMUClockType type) { return qemu_clock_get_ns(type) / 1000000; } /** * qemu_clock_get_us; * @type: the clock type * * Get the microsecond value of a clock with * type @type * * Returns: the clock value in microseconds */ static inline int64_t qemu_clock_get_us(QEMUClockType type) { return qemu_clock_get_ns(type) / 1000; } /** * qemu_clock_has_timers: * @type: the clock type * * Determines whether a clock's default timer list * has timers attached * * Note that this function should not be used when other threads also access * the timer list. The return value may be outdated by the time it is acted * upon. * * Returns: true if the clock's default timer list * has timers attached */ # 128 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 128 "//qemu-2.11+dfsg/include/qemu/timer.h" qemu_clock_has_timers(QEMUClockType type); /** * qemu_clock_expired: * @type: the clock type * * Determines whether a clock's default timer list * has an expired timer. * * Returns: true if the clock's default timer list has * an expired timer */ # 140 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 140 "//qemu-2.11+dfsg/include/qemu/timer.h" qemu_clock_expired(QEMUClockType type); /** * qemu_clock_use_for_deadline: * @type: the clock type * * Determine whether a clock should be used for deadline * calculations. Some clocks, for instance vm_clock with * use_icount set, do not count in nanoseconds. Such clocks * are not used for deadline calculations, and are presumed * to interrupt any poll using qemu_notify/aio_notify * etc. * * Returns: true if the clock runs in nanoseconds and * should be used for a deadline. */ # 156 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 156 "//qemu-2.11+dfsg/include/qemu/timer.h" qemu_clock_use_for_deadline(QEMUClockType type); /** * qemu_clock_deadline_ns_all: * @type: the clock type * * Calculate the deadline across all timer lists associated * with a clock (as opposed to just the default one) * in nanoseconds, or -1 if no timer is set to expire. * * Returns: time until expiry in nanoseconds or -1 */ int64_t qemu_clock_deadline_ns_all(QEMUClockType type); /** * qemu_clock_get_main_loop_timerlist: * @type: the clock type * * Return the default timer list associated with a clock. * * Returns: the default timer list */ QEMUTimerList *qemu_clock_get_main_loop_timerlist(QEMUClockType type); /** * qemu_clock_nofify: * @type: the clock type * * Call the notifier callback connected with the default timer * list linked to the clock, or qemu_notify() if none. */ void qemu_clock_notify(QEMUClockType type); /** * qemu_clock_enable: * @type: the clock type * @enabled: true to enable, false to disable * * Enable or disable a clock * Disabling the clock will wait for related timerlists to stop * executing qemu_run_timers. Thus, this functions should not * be used from the callback of a timer that is based on @clock. * Doing so would cause a deadlock. * * Caller should hold BQL. */ void qemu_clock_enable(QEMUClockType type, # 202 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 202 "//qemu-2.11+dfsg/include/qemu/timer.h" enabled); /** * qemu_start_warp_timer: * * Starts a timer for virtual clock update */ void qemu_start_warp_timer(void); /** * qemu_clock_register_reset_notifier: * @type: the clock type * @notifier: the notifier function * * Register a notifier function to call when the clock * concerned is reset. */ void qemu_clock_register_reset_notifier(QEMUClockType type, Notifier *notifier); /** * qemu_clock_unregister_reset_notifier: * @type: the clock type * @notifier: the notifier function * * Unregister a notifier function to call when the clock * concerned is reset. */ void qemu_clock_unregister_reset_notifier(QEMUClockType type, Notifier *notifier); /** * qemu_clock_run_timers: * @type: clock on which to operate * * Run all the timers associated with the default timer list * of a clock. * * Returns: true if any timer ran. */ # 242 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 242 "//qemu-2.11+dfsg/include/qemu/timer.h" qemu_clock_run_timers(QEMUClockType type); /** * qemu_clock_run_all_timers: * * Run all the timers associated with the default timer list * of every clock. * * Returns: true if any timer ran. */ # 252 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 252 "//qemu-2.11+dfsg/include/qemu/timer.h" qemu_clock_run_all_timers(void); /* * QEMUTimerList */ /** * timerlist_new: * @type: the clock type to associate with the timerlist * @cb: the callback to call on notification * @opaque: the opaque pointer to pass to the callback * * Create a new timerlist associated with the clock of * type @type. * * Returns: a pointer to the QEMUTimerList created */ QEMUTimerList *timerlist_new(QEMUClockType type, QEMUTimerListNotifyCB *cb, void *opaque); /** * timerlist_free: * @timer_list: the timer list to free * * Frees a timer_list. It must have no active timers. */ void timerlist_free(QEMUTimerList *timer_list); /** * timerlist_has_timers: * @timer_list: the timer list to operate on * * Determine whether a timer list has active timers * * Note that this function should not be used when other threads also access * the timer list. The return value may be outdated by the time it is acted * upon. * * Returns: true if the timer list has timers. */ # 292 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 292 "//qemu-2.11+dfsg/include/qemu/timer.h" timerlist_has_timers(QEMUTimerList *timer_list); /** * timerlist_expired: * @timer_list: the timer list to operate on * * Determine whether a timer list has any timers which * are expired. * * Returns: true if the timer list has timers which * have expired. */ # 304 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 304 "//qemu-2.11+dfsg/include/qemu/timer.h" timerlist_expired(QEMUTimerList *timer_list); /** * timerlist_deadline_ns: * @timer_list: the timer list to operate on * * Determine the deadline for a timer_list, i.e. * the number of nanoseconds until the first timer * expires. Return -1 if there are no timers. * * Returns: the number of nanoseconds until the earliest * timer expires -1 if none */ int64_t timerlist_deadline_ns(QEMUTimerList *timer_list); /** * timerlist_get_clock: * @timer_list: the timer list to operate on * * Determine the clock type associated with a timer list. * * Returns: the clock type associated with the * timer list. */ QEMUClockType timerlist_get_clock(QEMUTimerList *timer_list); /** * timerlist_run_timers: * @timer_list: the timer list to use * * Call all expired timers associated with the timer list. * * Returns: true if any timer expired */ # 338 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 338 "//qemu-2.11+dfsg/include/qemu/timer.h" timerlist_run_timers(QEMUTimerList *timer_list); /** * timerlist_notify: * @timer_list: the timer list to use * * call the notifier callback associated with the timer list. */ void timerlist_notify(QEMUTimerList *timer_list); /* * QEMUTimerListGroup */ /** * timerlistgroup_init: * @tlg: the timer list group * @cb: the callback to call when a notify is required * @opaque: the opaque pointer to be passed to the callback. * * Initialise a timer list group. This must already be * allocated in memory and zeroed. The notifier callback is * called whenever a clock in the timer list group is * reenabled or whenever a timer associated with any timer * list is modified. If @cb is specified as null, qemu_notify() * is used instead. */ void timerlistgroup_init(QEMUTimerListGroup *tlg, QEMUTimerListNotifyCB *cb, void *opaque); /** * timerlistgroup_deinit: * @tlg: the timer list group * * Deinitialise a timer list group. This must already be * initialised. Note the memory is not freed. */ void timerlistgroup_deinit(QEMUTimerListGroup *tlg); /** * timerlistgroup_run_timers: * @tlg: the timer list group * * Run the timers associated with a timer list group. * This will run timers on multiple clocks. * * Returns: true if any timer callback ran */ # 386 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 386 "//qemu-2.11+dfsg/include/qemu/timer.h" timerlistgroup_run_timers(QEMUTimerListGroup *tlg); /** * timerlistgroup_deadline_ns: * @tlg: the timer list group * * Determine the deadline of the soonest timer to * expire associated with any timer list linked to * the timer list group. Only clocks suitable for * deadline calculation are included. * * Returns: the deadline in nanoseconds or -1 if no * timers are to expire. */ int64_t timerlistgroup_deadline_ns(QEMUTimerListGroup *tlg); /* * QEMUTimer */ /** * timer_init_tl: * @ts: the timer to be initialised * @timer_list: the timer list to attach the timer to * @scale: the scale value for the timer * @cb: the callback to be called when the timer expires * @opaque: the opaque pointer to be passed to the callback * * Initialise a new timer and associate it with @timer_list. * The caller is responsible for allocating the memory. * * You need not call an explicit deinit call. Simply make * sure it is not on a list with timer_del. */ void timer_init_tl(QEMUTimer *ts, QEMUTimerList *timer_list, int scale, QEMUTimerCB *cb, void *opaque); /** * timer_init: * @ts: the timer to be initialised * @type: the clock to associate with the timer * @scale: the scale value for the timer * @cb: the callback to call when the timer expires * @opaque: the opaque pointer to pass to the callback * * Initialize a timer with the given scale on the default timer list * associated with the clock. * * You need not call an explicit deinit call. Simply make * sure it is not on a list with timer_del. */ static inline void timer_init(QEMUTimer *ts, QEMUClockType type, int scale, QEMUTimerCB *cb, void *opaque) { timer_init_tl(ts, main_loop_tlg.tl[type], scale, cb, opaque); } /** * timer_init_ns: * @ts: the timer to be initialised * @type: the clock to associate with the timer * @cb: the callback to call when the timer expires * @opaque: the opaque pointer to pass to the callback * * Initialize a timer with nanosecond scale on the default timer list * associated with the clock. * * You need not call an explicit deinit call. Simply make * sure it is not on a list with timer_del. */ static inline void timer_init_ns(QEMUTimer *ts, QEMUClockType type, QEMUTimerCB *cb, void *opaque) { timer_init(ts, type, 1, cb, opaque); } /** * timer_init_us: * @ts: the timer to be initialised * @type: the clock to associate with the timer * @cb: the callback to call when the timer expires * @opaque: the opaque pointer to pass to the callback * * Initialize a timer with microsecond scale on the default timer list * associated with the clock. * * You need not call an explicit deinit call. Simply make * sure it is not on a list with timer_del. */ static inline void timer_init_us(QEMUTimer *ts, QEMUClockType type, QEMUTimerCB *cb, void *opaque) { timer_init(ts, type, 1000, cb, opaque); } /** * timer_init_ms: * @ts: the timer to be initialised * @type: the clock to associate with the timer * @cb: the callback to call when the timer expires * @opaque: the opaque pointer to pass to the callback * * Initialize a timer with millisecond scale on the default timer list * associated with the clock. * * You need not call an explicit deinit call. Simply make * sure it is not on a list with timer_del. */ static inline void timer_init_ms(QEMUTimer *ts, QEMUClockType type, QEMUTimerCB *cb, void *opaque) { timer_init(ts, type, 1000000, cb, opaque); } /** * timer_new_tl: * @timer_list: the timer list to attach the timer to * @scale: the scale value for the timer * @cb: the callback to be called when the timer expires * @opaque: the opaque pointer to be passed to the callback * * Create a new timer and associate it with @timer_list. * The memory is allocated by the function. * * This is not the preferred interface unless you know you * are going to call timer_free. Use timer_init instead. * * Returns: a pointer to the timer */ static inline QEMUTimer *timer_new_tl(QEMUTimerList *timer_list, int scale, QEMUTimerCB *cb, void *opaque) { QEMUTimer *ts = g_malloc0(sizeof(QEMUTimer)); timer_init_tl(ts, timer_list, scale, cb, opaque); return ts; } /** * timer_new: * @type: the clock type to use * @scale: the scale value for the timer * @cb: the callback to be called when the timer expires * @opaque: the opaque pointer to be passed to the callback * * Create a new timer and associate it with the default * timer list for the clock type @type. * * The default timer list has one special feature: in icount mode, * %QEMU_CLOCK_VIRTUAL timers are run in the vCPU thread. This is * not true of other timer lists, which are typically associated * with an AioContext---each of them runs its timer callbacks in its own * AioContext thread. * * Returns: a pointer to the timer */ static inline QEMUTimer *timer_new(QEMUClockType type, int scale, QEMUTimerCB *cb, void *opaque) { return timer_new_tl(main_loop_tlg.tl[type], scale, cb, opaque); } /** * timer_new_ns: * @type: the clock type to associate with the timer * @cb: the callback to call when the timer expires * @opaque: the opaque pointer to pass to the callback * * Create a new timer with nanosecond scale on the default timer list * associated with the clock. * * The default timer list has one special feature: in icount mode, * %QEMU_CLOCK_VIRTUAL timers are run in the vCPU thread. This is * not true of other timer lists, which are typically associated * with an AioContext---each of them runs its timer callbacks in its own * AioContext thread. * * Returns: a pointer to the newly created timer */ static inline QEMUTimer *timer_new_ns(QEMUClockType type, QEMUTimerCB *cb, void *opaque) { return timer_new(type, 1, cb, opaque); } /** * timer_new_us: * @type: the clock type to associate with the timer * @cb: the callback to call when the timer expires * @opaque: the opaque pointer to pass to the callback * * The default timer list has one special feature: in icount mode, * %QEMU_CLOCK_VIRTUAL timers are run in the vCPU thread. This is * not true of other timer lists, which are typically associated * with an AioContext---each of them runs its timer callbacks in its own * AioContext thread. * * Create a new timer with microsecond scale on the default timer list * associated with the clock. * * Returns: a pointer to the newly created timer */ static inline QEMUTimer *timer_new_us(QEMUClockType type, QEMUTimerCB *cb, void *opaque) { return timer_new(type, 1000, cb, opaque); } /** * timer_new_ms: * @type: the clock type to associate with the timer * @cb: the callback to call when the timer expires * @opaque: the opaque pointer to pass to the callback * * The default timer list has one special feature: in icount mode, * %QEMU_CLOCK_VIRTUAL timers are run in the vCPU thread. This is * not true of other timer lists, which are typically associated * with an AioContext---each of them runs its timer callbacks in its own * AioContext thread. * * Create a new timer with millisecond scale on the default timer list * associated with the clock. * * Returns: a pointer to the newly created timer */ static inline QEMUTimer *timer_new_ms(QEMUClockType type, QEMUTimerCB *cb, void *opaque) { return timer_new(type, 1000000, cb, opaque); } /** * timer_deinit: * @ts: the timer to be de-initialised * * Deassociate the timer from any timerlist. You should * call timer_del before. After this call, any further * timer_del call cannot cause dangling pointer accesses * even if the previously used timerlist is freed. */ void timer_deinit(QEMUTimer *ts); /** * timer_free: * @ts: the timer * * Free a timer (it must not be on the active list) */ static inline void timer_free(QEMUTimer *ts) { g_free(ts); } /** * timer_del: * @ts: the timer * * Delete a timer from the active list. * * This function is thread-safe but the timer and its timer list must not be * freed while this function is running. */ void timer_del(QEMUTimer *ts); /** * timer_mod_ns: * @ts: the timer * @expire_time: the expiry time in nanoseconds * * Modify a timer to expire at @expire_time * * This function is thread-safe but the timer and its timer list must not be * freed while this function is running. */ void timer_mod_ns(QEMUTimer *ts, int64_t expire_time); /** * timer_mod_anticipate_ns: * @ts: the timer * @expire_time: the expiry time in nanoseconds * * Modify a timer to expire at @expire_time or the current time, * whichever comes earlier. * * This function is thread-safe but the timer and its timer list must not be * freed while this function is running. */ void timer_mod_anticipate_ns(QEMUTimer *ts, int64_t expire_time); /** * timer_mod: * @ts: the timer * @expire_time: the expire time in the units associated with the timer * * Modify a timer to expiry at @expire_time, taking into * account the scale associated with the timer. * * This function is thread-safe but the timer and its timer list must not be * freed while this function is running. */ void timer_mod(QEMUTimer *ts, int64_t expire_timer); /** * timer_mod_anticipate: * @ts: the timer * @expire_time: the expiry time in nanoseconds * * Modify a timer to expire at @expire_time or the current time, whichever * comes earlier, taking into account the scale associated with the timer. * * This function is thread-safe but the timer and its timer list must not be * freed while this function is running. */ void timer_mod_anticipate(QEMUTimer *ts, int64_t expire_time); /** * timer_pending: * @ts: the timer * * Determines whether a timer is pending (i.e. is on the * active list of timers, whether or not it has not yet expired). * * Returns: true if the timer is pending */ # 712 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 712 "//qemu-2.11+dfsg/include/qemu/timer.h" timer_pending(QEMUTimer *ts); /** * timer_expired: * @ts: the timer * @current_time: the current time * * Determines whether a timer has expired. * * Returns: true if the timer has expired */ # 723 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 _Bool # 723 "//qemu-2.11+dfsg/include/qemu/timer.h" timer_expired(QEMUTimer *timer_head, int64_t current_time); /** * timer_expire_time_ns: * @ts: the timer * * Determine the expiry time of a timer * * Returns: the expiry time in nanoseconds */ uint64_t timer_expire_time_ns(QEMUTimer *ts); /** * timer_get: * @f: the file * @ts: the timer * * Read a timer @ts from a file @f */ void timer_get(QEMUFile *f, QEMUTimer *ts); /** * timer_put: * @f: the file * @ts: the timer */ void timer_put(QEMUFile *f, QEMUTimer *ts); /* * General utility functions */ /** * qemu_timeout_ns_to_ms: * @ns: nanosecond timeout value * * Convert a nanosecond timeout value (or -1) to * a millisecond value (or -1), always rounding up. * * Returns: millisecond timeout value */ int qemu_timeout_ns_to_ms(int64_t ns); /** * qemu_poll_ns: * @fds: Array of file descriptors * @nfds: number of file descriptors * @timeout: timeout in nanoseconds * * Perform a poll like g_poll but with a timeout in nanoseconds. * See g_poll documentation for further details. * * Returns: number of fds ready */ int qemu_poll_ns(GPollFD *fds, guint nfds, int64_t timeout); /** * qemu_soonest_timeout: * @timeout1: first timeout in nanoseconds (or -1 for infinite) * @timeout2: second timeout in nanoseconds (or -1 for infinite) * * Calculates the soonest of two timeout values. -1 means infinite, which * is later than any other value. * * Returns: soonest timeout value in nanoseconds (or -1 for infinite) */ static inline int64_t qemu_soonest_timeout(int64_t timeout1, int64_t timeout2) { /* we can abuse the fact that -1 (which means infinite) is a maximal * value when cast to unsigned. As this is disgusting, it's kept in * one inline function. */ return ((uint64_t) timeout1 < (uint64_t) timeout2) ? timeout1 : timeout2; } /** * initclocks: * * Initialise the clock & timer infrastructure */ void init_clocks(QEMUTimerListNotifyCB *notify_cb); int64_t cpu_get_ticks(void); /* Caller must hold BQL */ void cpu_enable_ticks(void); /* Caller must hold BQL */ void cpu_disable_ticks(void); static inline int64_t get_max_clock_jump(void) { /* This should be small enough to prevent excessive interrupts from being * generated by the RTC on clock jumps, but large enough to avoid frequent * unnecessary resets in idle VMs. */ return 60 * 1000000000LL; } /* * Low level clock functions */ /* get host real time in nanosecond */ static inline int64_t get_clock_realtime(void) { struct timeval tv; gettimeofday(&tv, # 829 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 ((void *)0) # 829 "//qemu-2.11+dfsg/include/qemu/timer.h" ); return tv.tv_sec * 1000000000LL + (tv.tv_usec * 1000); } /* Warning: don't insert tracepoints into these functions, they are also used by simpletrace backend and tracepoints would cause an infinite recursion! */ # 848 "//qemu-2.11+dfsg/include/qemu/timer.h" extern int use_rt_clock; static inline int64_t get_clock(void) { if (use_rt_clock) { struct timespec ts; clock_gettime( # 855 "//qemu-2.11+dfsg/include/qemu/timer.h" 3 4 1 # 855 "//qemu-2.11+dfsg/include/qemu/timer.h" , &ts); return ts.tv_sec * 1000000000LL + ts.tv_nsec; } else { /* XXX: using gettimeofday leads to problems if the date changes, so it should be avoided. */ return get_clock_realtime(); } } /* icount */ int64_t cpu_get_icount_raw(void); int64_t cpu_get_icount(void); int64_t cpu_get_clock(void); int64_t cpu_icount_to_ns(int64_t icount); void cpu_update_icount(CPUState *cpu); /*******************************************/ /* host CPU ticks (if available) */ # 914 "//qemu-2.11+dfsg/include/qemu/timer.h" static inline int64_t cpu_get_host_ticks(void) { uint32_t low,high; int64_t val; asm volatile("rdtsc" : "=a" (low), "=d" (high)); val = high; val <<= 32; val |= low; return val; } # 30 "//qemu-2.11+dfsg/include/qemu/timed-average.h" 2 typedef struct TimedAverageWindow TimedAverageWindow; typedef struct TimedAverage TimedAverage; /* All fields of both structures are private */ struct TimedAverageWindow { uint64_t min; /* minimum value accounted in the window */ uint64_t max; /* maximum value accounted in the window */ uint64_t sum; /* sum of all values */ uint64_t count; /* number of values */ int64_t expiration; /* the end of the current window in ns */ }; struct TimedAverage { uint64_t period; /* period in nanoseconds */ TimedAverageWindow windows[2]; /* two overlapping windows of with * an offset of period / 2 between them */ unsigned current; /* the current window index: it's also the * oldest window index */ QEMUClockType clock_type; /* the clock used */ }; void timed_average_init(TimedAverage *ta, QEMUClockType clock_type, uint64_t period); void timed_average_account(TimedAverage *ta, uint64_t value); uint64_t timed_average_min(TimedAverage *ta); uint64_t timed_average_avg(TimedAverage *ta); uint64_t timed_average_max(TimedAverage *ta); uint64_t timed_average_sum(TimedAverage *ta, uint64_t *elapsed); # 29 "//qemu-2.11+dfsg/include/block/accounting.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/thread.h" 1 # 1 "//qemu-2.11+dfsg/include/qemu/processor.h" 1 /* * Copyright (C) 2016, Emilio G. Cota * * License: GNU GPL, version 2. * See the COPYING file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qemu/atomic.h" 1 /* * Simple interface for atomic operations. * * Copyright (C) 2013 Red Hat, Inc. * * Author: Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * * See docs/devel/atomics.txt for discussion about the guarantees each * atomic primitive is meant to provide. */ # 11 "//qemu-2.11+dfsg/include/qemu/processor.h" 2 # 5 "//qemu-2.11+dfsg/include/qemu/thread.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/atomic.h" 1 /* * Simple interface for atomic operations. * * Copyright (C) 2013 Red Hat, Inc. * * Author: Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * * See docs/devel/atomics.txt for discussion about the guarantees each * atomic primitive is meant to provide. */ # 6 "//qemu-2.11+dfsg/include/qemu/thread.h" 2 typedef struct QemuMutex QemuMutex; typedef struct QemuCond QemuCond; typedef struct QemuSemaphore QemuSemaphore; typedef struct QemuEvent QemuEvent; typedef struct QemuLockCnt QemuLockCnt; typedef struct QemuThread QemuThread; # 1 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" 1 # 1 "/usr/include/pthread.h" 1 3 4 # 1 "/usr/include/pthread.h" 3 4 /* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 5 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" 2 # 1 "/usr/include/semaphore.h" 1 3 4 /* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/semaphore.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ # 23 "/usr/include/semaphore.h" 2 3 4 /* Get the definition for sem_t. */ # 1 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 1 3 4 /* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ # 13 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ # 24 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 2 3 4 # 32 "/usr/include/x86_64-linux-gnu/bits/semaphore.h" 3 4 /* Value returned if `sem_open' failed. */ typedef union { char __size[32]; long int __align; } sem_t; # 29 "/usr/include/semaphore.h" 2 3 4 /* Initialize semaphore object SEM to VALUE. If PSHARED then share it with other processes. */ extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) __attribute__ ((__nothrow__ , __leaf__)); /* Free resources associated with semaphore object SEM. */ extern int sem_destroy (sem_t *__sem) __attribute__ ((__nothrow__ , __leaf__)); /* Open a named semaphore NAME with open flags OFLAG. */ extern sem_t *sem_open (const char *__name, int __oflag, ...) __attribute__ ((__nothrow__ , __leaf__)); /* Close descriptor for named semaphore SEM. */ extern int sem_close (sem_t *__sem) __attribute__ ((__nothrow__ , __leaf__)); /* Remove named semaphore NAME. */ extern int sem_unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)); /* Wait for SEM being posted. This function is a cancellation point and therefore not marked with __THROW. */ extern int sem_wait (sem_t *__sem); /* Similar to `sem_wait' but wait only until ABSTIME. This function is a cancellation point and therefore not marked with __THROW. */ extern int sem_timedwait (sem_t *__restrict __sem, const struct timespec *__restrict __abstime); /* Test whether SEM is posted. */ extern int sem_trywait (sem_t *__sem) __attribute__ ((__nothrow__)); /* Post SEM. */ extern int sem_post (sem_t *__sem) __attribute__ ((__nothrow__)); /* Get current value of SEM and store it in *SVAL. */ extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval) __attribute__ ((__nothrow__ , __leaf__)); # 6 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" 2 # 7 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" typedef QemuMutex QemuRecMutex; struct QemuMutex { pthread_mutex_t lock; # 15 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" 3 4 _Bool # 15 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" initialized; }; struct QemuCond { pthread_cond_t cond; # 20 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" 3 4 _Bool # 20 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" initialized; }; struct QemuSemaphore { sem_t sem; # 31 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" 3 4 _Bool # 31 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" initialized; }; struct QemuEvent { unsigned value; # 40 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" 3 4 _Bool # 40 "//qemu-2.11+dfsg/include/qemu/thread-posix.h" initialized; }; struct QemuThread { pthread_t thread; }; # 18 "//qemu-2.11+dfsg/include/qemu/thread.h" 2 void qemu_mutex_init(QemuMutex *mutex); void qemu_mutex_destroy(QemuMutex *mutex); void qemu_mutex_lock(QemuMutex *mutex); int qemu_mutex_trylock(QemuMutex *mutex); void qemu_mutex_unlock(QemuMutex *mutex); /* Prototypes for other functions are in thread-posix.h/thread-win32.h. */ void qemu_rec_mutex_init(QemuRecMutex *mutex); void qemu_cond_init(QemuCond *cond); void qemu_cond_destroy(QemuCond *cond); /* * IMPORTANT: The implementation does not guarantee that pthread_cond_signal * and pthread_cond_broadcast can be called except while the same mutex is * held as in the corresponding pthread_cond_wait calls! */ void qemu_cond_signal(QemuCond *cond); void qemu_cond_broadcast(QemuCond *cond); void qemu_cond_wait(QemuCond *cond, QemuMutex *mutex); void qemu_sem_init(QemuSemaphore *sem, int init); void qemu_sem_post(QemuSemaphore *sem); void qemu_sem_wait(QemuSemaphore *sem); int qemu_sem_timedwait(QemuSemaphore *sem, int ms); void qemu_sem_destroy(QemuSemaphore *sem); void qemu_event_init(QemuEvent *ev, # 50 "//qemu-2.11+dfsg/include/qemu/thread.h" 3 4 _Bool # 50 "//qemu-2.11+dfsg/include/qemu/thread.h" init); void qemu_event_set(QemuEvent *ev); void qemu_event_reset(QemuEvent *ev); void qemu_event_wait(QemuEvent *ev); void qemu_event_destroy(QemuEvent *ev); void qemu_thread_create(QemuThread *thread, const char *name, void *(*start_routine)(void *), void *arg, int mode); void *qemu_thread_join(QemuThread *thread); void qemu_thread_get_self(QemuThread *thread); # 61 "//qemu-2.11+dfsg/include/qemu/thread.h" 3 4 _Bool # 61 "//qemu-2.11+dfsg/include/qemu/thread.h" qemu_thread_is_self(QemuThread *thread); void qemu_thread_exit(void *retval); void qemu_thread_naming( # 63 "//qemu-2.11+dfsg/include/qemu/thread.h" 3 4 _Bool # 63 "//qemu-2.11+dfsg/include/qemu/thread.h" enable); struct Notifier; void qemu_thread_atexit_add(struct Notifier *notifier); void qemu_thread_atexit_remove(struct Notifier *notifier); typedef struct QemuSpin { int value; } QemuSpin; static inline void qemu_spin_init(QemuSpin *spin) { __sync_lock_release(&spin->value); } static inline void qemu_spin_lock(QemuSpin *spin) { while (__builtin_expect(!!(__sync_lock_test_and_set(&spin->value, # 80 "//qemu-2.11+dfsg/include/qemu/thread.h" 3 4 1 # 80 "//qemu-2.11+dfsg/include/qemu/thread.h" )), 0)) { while (({ _Static_assert(!(sizeof(*&spin->value) > 8), "not expecting: " "sizeof(*&spin->value) > ATOMIC_REG_SIZE"); __atomic_load_n(&spin->value, 0); })) { asm volatile("rep; nop" ::: "memory"); } } } static inline # 87 "//qemu-2.11+dfsg/include/qemu/thread.h" 3 4 _Bool # 87 "//qemu-2.11+dfsg/include/qemu/thread.h" qemu_spin_trylock(QemuSpin *spin) { return __sync_lock_test_and_set(&spin->value, # 89 "//qemu-2.11+dfsg/include/qemu/thread.h" 3 4 1 # 89 "//qemu-2.11+dfsg/include/qemu/thread.h" ); } static inline # 92 "//qemu-2.11+dfsg/include/qemu/thread.h" 3 4 _Bool # 92 "//qemu-2.11+dfsg/include/qemu/thread.h" qemu_spin_locked(QemuSpin *spin) { return ({ _Static_assert(!(sizeof(*&spin->value) > 8), "not expecting: " "sizeof(*&spin->value) > ATOMIC_REG_SIZE"); __atomic_load_n(&spin->value, 0); }); } static inline void qemu_spin_unlock(QemuSpin *spin) { __sync_lock_release(&spin->value); } struct QemuLockCnt { unsigned count; }; /** * qemu_lockcnt_init: initialize a QemuLockcnt * @lockcnt: the lockcnt to initialize * * Initialize lockcnt's counter to zero and prepare its mutex * for usage. */ void qemu_lockcnt_init(QemuLockCnt *lockcnt); /** * qemu_lockcnt_destroy: destroy a QemuLockcnt * @lockcnt: the lockcnt to destruct * * Destroy lockcnt's mutex. */ void qemu_lockcnt_destroy(QemuLockCnt *lockcnt); /** * qemu_lockcnt_inc: increment a QemuLockCnt's counter * @lockcnt: the lockcnt to operate on * * If the lockcnt's count is zero, wait for critical sections * to finish and increment lockcnt's count to 1. If the count * is not zero, just increment it. * * Because this function can wait on the mutex, it must not be * called while the lockcnt's mutex is held by the current thread. * For the same reason, qemu_lockcnt_inc can also contribute to * AB-BA deadlocks. This is a sample deadlock scenario: * * thread 1 thread 2 * ------------------------------------------------------- * qemu_lockcnt_lock(&lc1); * qemu_lockcnt_lock(&lc2); * qemu_lockcnt_inc(&lc2); * qemu_lockcnt_inc(&lc1); */ void qemu_lockcnt_inc(QemuLockCnt *lockcnt); /** * qemu_lockcnt_dec: decrement a QemuLockCnt's counter * @lockcnt: the lockcnt to operate on */ void qemu_lockcnt_dec(QemuLockCnt *lockcnt); /** * qemu_lockcnt_dec_and_lock: decrement a QemuLockCnt's counter and * possibly lock it. * @lockcnt: the lockcnt to operate on * * Decrement lockcnt's count. If the new count is zero, lock * the mutex and return true. Otherwise, return false. */ # 162 "//qemu-2.11+dfsg/include/qemu/thread.h" 3 4 _Bool # 162 "//qemu-2.11+dfsg/include/qemu/thread.h" qemu_lockcnt_dec_and_lock(QemuLockCnt *lockcnt); /** * qemu_lockcnt_dec_if_lock: possibly decrement a QemuLockCnt's counter and * lock it. * @lockcnt: the lockcnt to operate on * * If the count is 1, decrement the count to zero, lock * the mutex and return true. Otherwise, return false. */ # 172 "//qemu-2.11+dfsg/include/qemu/thread.h" 3 4 _Bool # 172 "//qemu-2.11+dfsg/include/qemu/thread.h" qemu_lockcnt_dec_if_lock(QemuLockCnt *lockcnt); /** * qemu_lockcnt_lock: lock a QemuLockCnt's mutex. * @lockcnt: the lockcnt to operate on * * Remember that concurrent visits are not blocked unless the count is * also zero. You can use qemu_lockcnt_count to check for this inside a * critical section. */ void qemu_lockcnt_lock(QemuLockCnt *lockcnt); /** * qemu_lockcnt_unlock: release a QemuLockCnt's mutex. * @lockcnt: the lockcnt to operate on. */ void qemu_lockcnt_unlock(QemuLockCnt *lockcnt); /** * qemu_lockcnt_inc_and_unlock: combined unlock/increment on a QemuLockCnt. * @lockcnt: the lockcnt to operate on. * * This is the same as * * qemu_lockcnt_unlock(lockcnt); * qemu_lockcnt_inc(lockcnt); * * but more efficient. */ void qemu_lockcnt_inc_and_unlock(QemuLockCnt *lockcnt); /** * qemu_lockcnt_count: query a LockCnt's count. * @lockcnt: the lockcnt to query. * * Note that the count can change at any time. Still, while the * lockcnt is locked, one can usefully check whether the count * is non-zero. */ unsigned qemu_lockcnt_count(QemuLockCnt *lockcnt); # 30 "//qemu-2.11+dfsg/include/block/accounting.h" 2 typedef struct BlockAcctTimedStats BlockAcctTimedStats; typedef struct BlockAcctStats BlockAcctStats; enum BlockAcctType { BLOCK_ACCT_READ, BLOCK_ACCT_WRITE, BLOCK_ACCT_FLUSH, BLOCK_MAX_IOTYPE, }; struct BlockAcctTimedStats { BlockAcctStats *stats; TimedAverage latency[BLOCK_MAX_IOTYPE]; unsigned interval_length; /* in seconds */ struct { struct BlockAcctTimedStats *sle_next; /* next element */ } entries; }; struct BlockAcctStats { QemuMutex lock; uint64_t nr_bytes[BLOCK_MAX_IOTYPE]; uint64_t nr_ops[BLOCK_MAX_IOTYPE]; uint64_t invalid_ops[BLOCK_MAX_IOTYPE]; uint64_t failed_ops[BLOCK_MAX_IOTYPE]; uint64_t total_time_ns[BLOCK_MAX_IOTYPE]; uint64_t merged[BLOCK_MAX_IOTYPE]; int64_t last_access_time_ns; struct { struct BlockAcctTimedStats *slh_first; /* first element */ } intervals; # 58 "//qemu-2.11+dfsg/include/block/accounting.h" 3 4 _Bool # 58 "//qemu-2.11+dfsg/include/block/accounting.h" account_invalid; # 59 "//qemu-2.11+dfsg/include/block/accounting.h" 3 4 _Bool # 59 "//qemu-2.11+dfsg/include/block/accounting.h" account_failed; }; typedef struct BlockAcctCookie { int64_t bytes; int64_t start_time_ns; enum BlockAcctType type; } BlockAcctCookie; void block_acct_init(BlockAcctStats *stats); void block_acct_setup(BlockAcctStats *stats, # 69 "//qemu-2.11+dfsg/include/block/accounting.h" 3 4 _Bool # 69 "//qemu-2.11+dfsg/include/block/accounting.h" account_invalid, # 70 "//qemu-2.11+dfsg/include/block/accounting.h" 3 4 _Bool # 70 "//qemu-2.11+dfsg/include/block/accounting.h" account_failed); void block_acct_cleanup(BlockAcctStats *stats); void block_acct_add_interval(BlockAcctStats *stats, unsigned interval_length); BlockAcctTimedStats *block_acct_interval_next(BlockAcctStats *stats, BlockAcctTimedStats *s); void block_acct_start(BlockAcctStats *stats, BlockAcctCookie *cookie, int64_t bytes, enum BlockAcctType type); void block_acct_done(BlockAcctStats *stats, BlockAcctCookie *cookie); void block_acct_failed(BlockAcctStats *stats, BlockAcctCookie *cookie); void block_acct_invalid(BlockAcctStats *stats, enum BlockAcctType type); void block_acct_merge_done(BlockAcctStats *stats, enum BlockAcctType type, int num_requests); int64_t block_acct_idle_time_ns(BlockAcctStats *stats); double block_acct_queue_depth(BlockAcctTimedStats *stats, enum BlockAcctType type); # 28 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "//qemu-2.11+dfsg/include/block/block.h" 1 # 1 "//qemu-2.11+dfsg/include/block/aio.h" 1 /* * QEMU aio implementation * * Copyright IBM, Corp. 2008 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * */ # 1 "//qemu-2.11+dfsg/include/qemu-common.h" 1 /* Common header file that is included by all of QEMU. * * This file is supposed to be included only by .c files. No header file should * depend on qemu-common.h, as this would easily lead to circular header * dependencies. * * If a header file uses a definition from qemu-common.h, that definition * must be moved to a separate header file, and the header that uses it * must include that header. */ # 18 "//qemu-2.11+dfsg/include/block/aio.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ # 19 "//qemu-2.11+dfsg/include/block/aio.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/event_notifier.h" 1 /* * event notifier support * * Copyright Red Hat, Inc. 2010 * * Authors: * Michael S. Tsirkin * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qemu-common.h" 1 /* Common header file that is included by all of QEMU. * * This file is supposed to be included only by .c files. No header file should * depend on qemu-common.h, as this would easily lead to circular header * dependencies. * * If a header file uses a definition from qemu-common.h, that definition * must be moved to a separate header file, and the header that uses it * must include that header. */ # 17 "//qemu-2.11+dfsg/include/qemu/event_notifier.h" 2 struct EventNotifier { int rfd; int wfd; }; typedef void EventNotifierHandler(EventNotifier *); int event_notifier_init(EventNotifier *, int active); void event_notifier_cleanup(EventNotifier *); int event_notifier_set(EventNotifier *); int event_notifier_test_and_clear(EventNotifier *); void event_notifier_init_fd(EventNotifier *, int fd); int event_notifier_get_fd(const EventNotifier *); # 20 "//qemu-2.11+dfsg/include/block/aio.h" 2 typedef struct BlockAIOCB BlockAIOCB; typedef void BlockCompletionFunc(void *opaque, int ret); typedef struct AIOCBInfo { void (*cancel_async)(BlockAIOCB *acb); AioContext *(*get_aio_context)(BlockAIOCB *acb); size_t aiocb_size; } AIOCBInfo; struct BlockAIOCB { const AIOCBInfo *aiocb_info; BlockDriverState *bs; BlockCompletionFunc *cb; void *opaque; int refcnt; }; void *qemu_aio_get(const AIOCBInfo *aiocb_info, BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque); void qemu_aio_unref(void *p); void qemu_aio_ref(void *p); typedef struct AioHandler AioHandler; typedef void QEMUBHFunc(void *opaque); typedef # 47 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 47 "//qemu-2.11+dfsg/include/block/aio.h" AioPollFn(void *opaque); typedef void IOHandler(void *opaque); struct Coroutine; struct ThreadPool; struct LinuxAioState; struct AioContext { GSource source; /* Used by AioContext users to protect from multi-threaded access. */ QemuRecMutex lock; /* The list of registered AIO handlers. Protected by ctx->list_lock. */ struct { struct AioHandler *lh_first; /* first element */ } aio_handlers; /* Used to avoid unnecessary event_notifier_set calls in aio_notify; * accessed with atomic primitives. If this field is 0, everything * (file descriptors, bottom halves, timers) will be re-evaluated * before the next blocking poll(), thus the event_notifier_set call * can be skipped. If it is non-zero, you may need to wake up a * concurrent aio_poll or the glib main event loop, making * event_notifier_set necessary. * * Bit 0 is reserved for GSource usage of the AioContext, and is 1 * between a call to aio_ctx_prepare and the next call to aio_ctx_check. * Bits 1-31 simply count the number of active calls to aio_poll * that are in the prepare or poll phase. * * The GSource and aio_poll must use a different mechanism because * there is no certainty that a call to GSource's prepare callback * (via g_main_context_prepare) is indeed followed by check and * dispatch. It's not clear whether this would be a bug, but let's * play safe and allow it---it will just cause extra calls to * event_notifier_set until the next call to dispatch. * * Instead, the aio_poll calls include both the prepare and the * dispatch phase, hence a simple counter is enough for them. */ uint32_t notify_me; /* A lock to protect between QEMUBH and AioHandler adders and deleter, * and to ensure that no callbacks are removed while we're walking and * dispatching them. */ QemuLockCnt list_lock; /* Anchor of the list of Bottom Halves belonging to the context */ struct QEMUBH *first_bh; /* Used by aio_notify. * * "notified" is used to avoid expensive event_notifier_test_and_clear * calls. When it is clear, the EventNotifier is clear, or one thread * is going to clear "notified" before processing more events. False * positives are possible, i.e. "notified" could be set even though the * EventNotifier is clear. * * Note that event_notifier_set *cannot* be optimized the same way. For * more information on the problem that would result, see "#ifdef BUG2" * in the docs/aio_notify_accept.promela formal model. */ # 109 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 109 "//qemu-2.11+dfsg/include/block/aio.h" notified; EventNotifier notifier; struct { struct Coroutine *slh_first; /* first element */ } scheduled_coroutines; QEMUBH *co_schedule_bh; /* Thread pool for performing work and receiving completion callbacks. * Has its own locking. */ struct ThreadPool *thread_pool; /* State for native Linux AIO. Uses aio_context_acquire/release for * locking. */ struct LinuxAioState *linux_aio; /* TimerLists for calling timers - one per clock type. Has its own * locking. */ QEMUTimerListGroup tlg; int external_disable_cnt; /* Number of AioHandlers without .io_poll() */ int poll_disable_cnt; /* Polling mode parameters */ int64_t poll_ns; /* current polling time in nanoseconds */ int64_t poll_max_ns; /* maximum polling time in nanoseconds */ int64_t poll_grow; /* polling time growth factor */ int64_t poll_shrink; /* polling time shrink factor */ /* Are we in polling mode or monitoring file descriptors? */ # 144 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 144 "//qemu-2.11+dfsg/include/block/aio.h" poll_started; /* epoll(7) state used when built with CONFIG_EPOLL */ int epollfd; # 148 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 148 "//qemu-2.11+dfsg/include/block/aio.h" epoll_enabled; # 149 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 149 "//qemu-2.11+dfsg/include/block/aio.h" epoll_available; }; /** * aio_context_new: Allocate a new AioContext. * * AioContext provide a mini event-loop that can be waited on synchronously. * They also provide bottom halves, a service to execute a piece of code * as soon as possible. */ AioContext *aio_context_new(Error **errp); /** * aio_context_ref: * @ctx: The AioContext to operate on. * * Add a reference to an AioContext. */ void aio_context_ref(AioContext *ctx); /** * aio_context_unref: * @ctx: The AioContext to operate on. * * Drop a reference to an AioContext. */ void aio_context_unref(AioContext *ctx); /* Take ownership of the AioContext. If the AioContext will be shared between * threads, and a thread does not want to be interrupted, it will have to * take ownership around calls to aio_poll(). Otherwise, aio_poll() * automatically takes care of calling aio_context_acquire and * aio_context_release. * * Note that this is separate from bdrv_drained_begin/bdrv_drained_end. A * thread still has to call those to avoid being interrupted by the guest. * * Bottom halves, timers and callbacks can be created or removed without * acquiring the AioContext. */ void aio_context_acquire(AioContext *ctx); /* Relinquish ownership of the AioContext. */ void aio_context_release(AioContext *ctx); /** * aio_bh_schedule_oneshot: Allocate a new bottom half structure that will run * only once and as soon as possible. */ void aio_bh_schedule_oneshot(AioContext *ctx, QEMUBHFunc *cb, void *opaque); /** * aio_bh_new: Allocate a new bottom half structure. * * Bottom halves are lightweight callbacks whose invocation is guaranteed * to be wait-free, thread-safe and signal-safe. The #QEMUBH structure * is opaque and must be allocated prior to its use. */ QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void *opaque); /** * aio_notify: Force processing of pending events. * * Similar to signaling a condition variable, aio_notify forces * aio_poll to exit, so that the next call will re-examine pending events. * The caller of aio_notify will usually call aio_poll again very soon, * or go through another iteration of the GLib main loop. Hence, aio_notify * also has the side effect of recalculating the sets of file descriptors * that the main loop waits for. * * Calling aio_notify is rarely necessary, because for example scheduling * a bottom half calls it already. */ void aio_notify(AioContext *ctx); /** * aio_notify_accept: Acknowledge receiving an aio_notify. * * aio_notify() uses an EventNotifier in order to wake up a sleeping * aio_poll() or g_main_context_iteration(). Calls to aio_notify() are * usually rare, but the AioContext has to clear the EventNotifier on * every aio_poll() or g_main_context_iteration() in order to avoid * busy waiting. This event_notifier_test_and_clear() cannot be done * using the usual aio_context_set_event_notifier(), because it must * be done before processing all events (file descriptors, bottom halves, * timers). * * aio_notify_accept() is an optimized event_notifier_test_and_clear() * that is specific to an AioContext's notifier; it is used internally * to clear the EventNotifier only if aio_notify() had been called. */ void aio_notify_accept(AioContext *ctx); /** * aio_bh_call: Executes callback function of the specified BH. */ void aio_bh_call(QEMUBH *bh); /** * aio_bh_poll: Poll bottom halves for an AioContext. * * These are internal functions used by the QEMU main loop. * And notice that multiple occurrences of aio_bh_poll cannot * be called concurrently */ int aio_bh_poll(AioContext *ctx); /** * qemu_bh_schedule: Schedule a bottom half. * * Scheduling a bottom half interrupts the main loop and causes the * execution of the callback that was passed to qemu_bh_new. * * Bottom halves that are scheduled from a bottom half handler are instantly * invoked. This can create an infinite loop if a bottom half handler * schedules itself. * * @bh: The bottom half to be scheduled. */ void qemu_bh_schedule(QEMUBH *bh); /** * qemu_bh_cancel: Cancel execution of a bottom half. * * Canceling execution of a bottom half undoes the effect of calls to * qemu_bh_schedule without freeing its resources yet. While cancellation * itself is also wait-free and thread-safe, it can of course race with the * loop that executes bottom halves unless you are holding the iothread * mutex. This makes it mostly useless if you are not holding the mutex. * * @bh: The bottom half to be canceled. */ void qemu_bh_cancel(QEMUBH *bh); /** *qemu_bh_delete: Cancel execution of a bottom half and free its resources. * * Deleting a bottom half frees the memory that was allocated for it by * qemu_bh_new. It also implies canceling the bottom half if it was * scheduled. * This func is async. The bottom half will do the delete action at the finial * end. * * @bh: The bottom half to be deleted. */ void qemu_bh_delete(QEMUBH *bh); /* Return whether there are any pending callbacks from the GSource * attached to the AioContext, before g_poll is invoked. * * This is used internally in the implementation of the GSource. */ # 301 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 301 "//qemu-2.11+dfsg/include/block/aio.h" aio_prepare(AioContext *ctx); /* Return whether there are any pending callbacks from the GSource * attached to the AioContext, after g_poll is invoked. * * This is used internally in the implementation of the GSource. */ # 308 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 308 "//qemu-2.11+dfsg/include/block/aio.h" aio_pending(AioContext *ctx); /* Dispatch any pending callbacks from the GSource attached to the AioContext. * * This is used internally in the implementation of the GSource. */ void aio_dispatch(AioContext *ctx); /* Progress in completing AIO work to occur. This can issue new pending * aio as a result of executing I/O completion or bh callbacks. * * Return whether any progress was made by executing AIO or bottom half * handlers. If @blocking == true, this should always be true except * if someone called aio_notify. * * If there are no pending bottom halves, but there are pending AIO * operations, it may not be possible to make any progress without * blocking. If @blocking is true, this function will wait until one * or more AIO events have completed, to ensure something has moved * before returning. */ # 329 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 329 "//qemu-2.11+dfsg/include/block/aio.h" aio_poll(AioContext *ctx, # 329 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 329 "//qemu-2.11+dfsg/include/block/aio.h" blocking); /* Register a file descriptor and associated callbacks. Behaves very similarly * to qemu_set_fd_handler. Unlike qemu_set_fd_handler, these callbacks will * be invoked when using aio_poll(). * * Code that invokes AIO completion functions should rely on this function * instead of qemu_set_fd_handler[2]. */ void aio_set_fd_handler(AioContext *ctx, int fd, # 340 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 340 "//qemu-2.11+dfsg/include/block/aio.h" is_external, IOHandler *io_read, IOHandler *io_write, AioPollFn *io_poll, void *opaque); /* Set polling begin/end callbacks for a file descriptor that has already been * registered with aio_set_fd_handler. Do nothing if the file descriptor is * not registered. */ void aio_set_fd_poll(AioContext *ctx, int fd, IOHandler *io_poll_begin, IOHandler *io_poll_end); /* Register an event notifier and associated callbacks. Behaves very similarly * to event_notifier_set_handler. Unlike event_notifier_set_handler, these callbacks * will be invoked when using aio_poll(). * * Code that invokes AIO completion functions should rely on this function * instead of event_notifier_set_handler. */ void aio_set_event_notifier(AioContext *ctx, EventNotifier *notifier, # 363 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 363 "//qemu-2.11+dfsg/include/block/aio.h" is_external, EventNotifierHandler *io_read, AioPollFn *io_poll); /* Set polling begin/end callbacks for an event notifier that has already been * registered with aio_set_event_notifier. Do nothing if the event notifier is * not registered. */ void aio_set_event_notifier_poll(AioContext *ctx, EventNotifier *notifier, EventNotifierHandler *io_poll_begin, EventNotifierHandler *io_poll_end); /* Return a GSource that lets the main loop poll the file descriptors attached * to this AioContext. */ GSource *aio_get_g_source(AioContext *ctx); /* Return the ThreadPool bound to this AioContext */ struct ThreadPool *aio_get_thread_pool(AioContext *ctx); /* Return the LinuxAioState bound to this AioContext */ struct LinuxAioState *aio_get_linux_aio(AioContext *ctx); /** * aio_timer_new: * @ctx: the aio context * @type: the clock type * @scale: the scale * @cb: the callback to call on timer expiry * @opaque: the opaque pointer to pass to the callback * * Allocate a new timer attached to the context @ctx. * The function is responsible for memory allocation. * * The preferred interface is aio_timer_init. Use that * unless you really need dynamic memory allocation. * * Returns: a pointer to the new timer */ static inline QEMUTimer *aio_timer_new(AioContext *ctx, QEMUClockType type, int scale, QEMUTimerCB *cb, void *opaque) { return timer_new_tl(ctx->tlg.tl[type], scale, cb, opaque); } /** * aio_timer_init: * @ctx: the aio context * @ts: the timer * @type: the clock type * @scale: the scale * @cb: the callback to call on timer expiry * @opaque: the opaque pointer to pass to the callback * * Initialise a new timer attached to the context @ctx. * The caller is responsible for memory allocation. */ static inline void aio_timer_init(AioContext *ctx, QEMUTimer *ts, QEMUClockType type, int scale, QEMUTimerCB *cb, void *opaque) { timer_init_tl(ts, ctx->tlg.tl[type], scale, cb, opaque); } /** * aio_compute_timeout: * @ctx: the aio context * * Compute the timeout that a blocking aio_poll should use. */ int64_t aio_compute_timeout(AioContext *ctx); /** * aio_disable_external: * @ctx: the aio context * * Disable the further processing of external clients. */ static inline void aio_disable_external(AioContext *ctx) { ((void) __atomic_fetch_add(&ctx->external_disable_cnt, 1, 5)); } /** * aio_enable_external: * @ctx: the aio context * * Enable the processing of external clients. */ static inline void aio_enable_external(AioContext *ctx) { int old; old = __atomic_fetch_sub(&ctx->external_disable_cnt, 1, 5); # 460 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 ((void) sizeof (( # 460 "//qemu-2.11+dfsg/include/block/aio.h" old > 0 # 460 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 460 "//qemu-2.11+dfsg/include/block/aio.h" old > 0 # 460 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 ) ; /* empty */ else __assert_fail ( # 460 "//qemu-2.11+dfsg/include/block/aio.h" "old > 0" # 460 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 , "//qemu-2.11+dfsg/include/block/aio.h", 460, __extension__ __PRETTY_FUNCTION__); })) # 460 "//qemu-2.11+dfsg/include/block/aio.h" ; if (old == 1) { /* Kick event loop so it re-arms file descriptors */ aio_notify(ctx); } } /** * aio_external_disabled: * @ctx: the aio context * * Return true if the external clients are disabled. */ static inline # 473 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 473 "//qemu-2.11+dfsg/include/block/aio.h" aio_external_disabled(AioContext *ctx) { return ({ _Static_assert(!(sizeof(*&ctx->external_disable_cnt) > 8), "not expecting: " "sizeof(*&ctx->external_disable_cnt) > ATOMIC_REG_SIZE"); __atomic_load_n(&ctx->external_disable_cnt, 0); }); } /** * aio_node_check: * @ctx: the aio context * @is_external: Whether or not the checked node is an external event source. * * Check if the node's is_external flag is okay to be polled by the ctx at this * moment. True means green light. */ static inline # 486 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 486 "//qemu-2.11+dfsg/include/block/aio.h" aio_node_check(AioContext *ctx, # 486 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 486 "//qemu-2.11+dfsg/include/block/aio.h" is_external) { return !is_external || !({ _Static_assert(!(sizeof(*&ctx->external_disable_cnt) > 8), "not expecting: " "sizeof(*&ctx->external_disable_cnt) > ATOMIC_REG_SIZE"); __atomic_load_n(&ctx->external_disable_cnt, 0); }); } /** * aio_co_schedule: * @ctx: the aio context * @co: the coroutine * * Start a coroutine on a remote AioContext. * * The coroutine must not be entered by anyone else while aio_co_schedule() * is active. In addition the coroutine must have yielded unless ctx * is the context in which the coroutine is running (i.e. the value of * qemu_get_current_aio_context() from the coroutine itself). */ void aio_co_schedule(AioContext *ctx, struct Coroutine *co); /** * aio_co_wake: * @co: the coroutine * * Restart a coroutine on the AioContext where it was running last, thus * preventing coroutines from jumping from one context to another when they * go to sleep. * * aio_co_wake may be executed either in coroutine or non-coroutine * context. The coroutine must not be entered by anyone else while * aio_co_wake() is active. */ void aio_co_wake(struct Coroutine *co); /** * aio_co_enter: * @ctx: the context to run the coroutine * @co: the coroutine to run * * Enter a coroutine in the specified AioContext. */ void aio_co_enter(AioContext *ctx, struct Coroutine *co); /** * Return the AioContext whose event loop runs in the current thread. * * If called from an IOThread this will be the IOThread's AioContext. If * called from another thread it will be the main loop AioContext. */ AioContext *qemu_get_current_aio_context(void); /** * @ctx: the aio context * * Return whether we are running in the I/O thread that manages @ctx. */ static inline # 541 "//qemu-2.11+dfsg/include/block/aio.h" 3 4 _Bool # 541 "//qemu-2.11+dfsg/include/block/aio.h" aio_context_in_iothread(AioContext *ctx) { return ctx == qemu_get_current_aio_context(); } /** * aio_context_setup: * @ctx: the aio context * * Initialize the aio context. */ void aio_context_setup(AioContext *ctx); /** * aio_context_set_poll_params: * @ctx: the aio context * @max_ns: how long to busy poll for, in nanoseconds * @grow: polling time growth factor * @shrink: polling time shrink factor * * Poll mode can be disabled by setting poll_max_ns to 0. */ void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, int64_t grow, int64_t shrink, Error **errp); # 5 "//qemu-2.11+dfsg/include/block/block.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/iov.h" 1 /* * Helpers for using (partial) iovecs. * * Copyright (C) 2010 Red Hat, Inc. * * Author(s): * Amit Shah * Michael Tokarev * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. */ /** * count and return data size, in bytes, of an iovec * starting at `iov' of `iov_cnt' number of elements. */ size_t iov_size(const struct iovec *iov, const unsigned int iov_cnt); /** * Copy from single continuous buffer to scatter-gather vector of buffers * (iovec) and back like memcpy() between two continuous memory regions. * Data in single continuous buffer starting at address `buf' and * `bytes' bytes long will be copied to/from an iovec `iov' with * `iov_cnt' number of elements, starting at byte position `offset' * within the iovec. If the iovec does not contain enough space, * only part of data will be copied, up to the end of the iovec. * Number of bytes actually copied will be returned, which is * min(bytes, iov_size(iov)-offset) * `Offset' must point to the inside of iovec. */ size_t iov_from_buf_full(const struct iovec *iov, unsigned int iov_cnt, size_t offset, const void *buf, size_t bytes); size_t iov_to_buf_full(const struct iovec *iov, const unsigned int iov_cnt, size_t offset, void *buf, size_t bytes); static inline size_t iov_from_buf(const struct iovec *iov, unsigned int iov_cnt, size_t offset, const void *buf, size_t bytes) { if (__builtin_constant_p(bytes) && iov_cnt && offset <= iov[0].iov_len && bytes <= iov[0].iov_len - offset) { memcpy(iov[0].iov_base + offset, buf, bytes); return bytes; } else { return iov_from_buf_full(iov, iov_cnt, offset, buf, bytes); } } static inline size_t iov_to_buf(const struct iovec *iov, const unsigned int iov_cnt, size_t offset, void *buf, size_t bytes) { if (__builtin_constant_p(bytes) && iov_cnt && offset <= iov[0].iov_len && bytes <= iov[0].iov_len - offset) { memcpy(buf, iov[0].iov_base + offset, bytes); return bytes; } else { return iov_to_buf_full(iov, iov_cnt, offset, buf, bytes); } } /** * Set data bytes pointed out by iovec `iov' of size `iov_cnt' elements, * starting at byte offset `start', to value `fillc', repeating it * `bytes' number of times. `Offset' must point to the inside of iovec. * If `bytes' is large enough, only last bytes portion of iovec, * up to the end of it, will be filled with the specified value. * Function return actual number of bytes processed, which is * min(size, iov_size(iov) - offset). */ size_t iov_memset(const struct iovec *iov, const unsigned int iov_cnt, size_t offset, int fillc, size_t bytes); /* * Send/recv data from/to iovec buffers directly * * `offset' bytes in the beginning of iovec buffer are skipped and * next `bytes' bytes are used, which must be within data of iovec. * * r = iov_send_recv(sockfd, iov, iovcnt, offset, bytes, true); * * is logically equivalent to * * char *buf = malloc(bytes); * iov_to_buf(iov, iovcnt, offset, buf, bytes); * r = send(sockfd, buf, bytes, 0); * free(buf); * * For iov_send_recv() _whole_ area being sent or received * should be within the iovec, not only beginning of it. */ ssize_t iov_send_recv(int sockfd, const struct iovec *iov, unsigned iov_cnt, size_t offset, size_t bytes, # 97 "//qemu-2.11+dfsg/include/qemu/iov.h" 3 4 _Bool # 97 "//qemu-2.11+dfsg/include/qemu/iov.h" do_send); /** * Produce a text hexdump of iovec `iov' with `iov_cnt' number of elements * in file `fp', prefixing each line with `prefix' and processing not more * than `limit' data bytes. */ void iov_hexdump(const struct iovec *iov, const unsigned int iov_cnt, FILE *fp, const char *prefix, size_t limit); /* * Partial copy of vector from iov to dst_iov (data is not copied). * dst_iov overlaps iov at a specified offset. * size of dst_iov is at most bytes. dst vector count is returned. */ unsigned iov_copy(struct iovec *dst_iov, unsigned int dst_iov_cnt, const struct iovec *iov, unsigned int iov_cnt, size_t offset, size_t bytes); /* * Remove a given number of bytes from the front or back of a vector. * This may update iov and/or iov_cnt to exclude iovec elements that are * no longer required. * * The number of bytes actually discarded is returned. This number may be * smaller than requested if the vector is too small. */ size_t iov_discard_front(struct iovec **iov, unsigned int *iov_cnt, size_t bytes); size_t iov_discard_back(struct iovec *iov, unsigned int *iov_cnt, size_t bytes); typedef struct QEMUIOVector { struct iovec *iov; int niov; int nalloc; size_t size; } QEMUIOVector; void qemu_iovec_init(QEMUIOVector *qiov, int alloc_hint); void qemu_iovec_init_external(QEMUIOVector *qiov, struct iovec *iov, int niov); void qemu_iovec_add(QEMUIOVector *qiov, void *base, size_t len); void qemu_iovec_concat(QEMUIOVector *dst, QEMUIOVector *src, size_t soffset, size_t sbytes); size_t qemu_iovec_concat_iov(QEMUIOVector *dst, struct iovec *src_iov, unsigned int src_cnt, size_t soffset, size_t sbytes); # 148 "//qemu-2.11+dfsg/include/qemu/iov.h" 3 4 _Bool # 148 "//qemu-2.11+dfsg/include/qemu/iov.h" qemu_iovec_is_zero(QEMUIOVector *qiov); void qemu_iovec_destroy(QEMUIOVector *qiov); void qemu_iovec_reset(QEMUIOVector *qiov); size_t qemu_iovec_to_buf(QEMUIOVector *qiov, size_t offset, void *buf, size_t bytes); size_t qemu_iovec_from_buf(QEMUIOVector *qiov, size_t offset, const void *buf, size_t bytes); size_t qemu_iovec_memset(QEMUIOVector *qiov, size_t offset, int fillc, size_t bytes); ssize_t qemu_iovec_compare(QEMUIOVector *a, QEMUIOVector *b); void qemu_iovec_clone(QEMUIOVector *dest, const QEMUIOVector *src, void *buf); void qemu_iovec_discard_back(QEMUIOVector *qiov, size_t bytes); # 6 "//qemu-2.11+dfsg/include/block/block.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/option.h" 1 /* * Commandline option parsing functions * * Copyright (c) 2003-2008 Fabrice Bellard * Copyright (c) 2009 Kevin Wolf * * 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. */ # 7 "//qemu-2.11+dfsg/include/block/block.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/coroutine.h" 1 /* * QEMU coroutine implementation * * Copyright IBM, Corp. 2011 * * Authors: * Stefan Hajnoczi * Kevin Wolf * * This work is licensed under the terms of the GNU LGPL, version 2 or later. * See the COPYING.LIB file in the top-level directory. * */ # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ # 19 "//qemu-2.11+dfsg/include/qemu/coroutine.h" 2 /** * Coroutines are a mechanism for stack switching and can be used for * cooperative userspace threading. These functions provide a simple but * useful flavor of coroutines that is suitable for writing sequential code, * rather than callbacks, for operations that need to give up control while * waiting for events to complete. * * These functions are re-entrant and may be used outside the global mutex. */ /** * Mark a function that executes in coroutine context * * Functions that execute in coroutine context cannot be called directly from * normal functions. In the future it would be nice to enable compiler or * static checker support for catching such errors. This annotation might make * it possible and in the meantime it serves as documentation. * * For example: * * static void coroutine_fn foo(void) { * .... * } */ typedef struct Coroutine Coroutine; /** * Coroutine entry point * * When the coroutine is entered for the first time, opaque is passed in as an * argument. * * When this function returns, the coroutine is destroyed automatically and * execution continues in the caller who last entered the coroutine. */ typedef void CoroutineEntry(void *opaque); /** * Create a new coroutine * * Use qemu_coroutine_enter() to actually transfer control to the coroutine. * The opaque argument is passed as the argument to the entry point. */ Coroutine *qemu_coroutine_create(CoroutineEntry *entry, void *opaque); /** * Transfer control to a coroutine */ void qemu_coroutine_enter(Coroutine *coroutine); /** * Transfer control to a coroutine if it's not active (i.e. part of the call * stack of the running coroutine). Otherwise, do nothing. */ void qemu_coroutine_enter_if_inactive(Coroutine *co); /** * Transfer control to a coroutine and associate it with ctx */ void qemu_aio_coroutine_enter(AioContext *ctx, Coroutine *co); /** * Transfer control back to a coroutine's caller * * This function does not return until the coroutine is re-entered using * qemu_coroutine_enter(). */ void qemu_coroutine_yield(void); /** * Get the currently executing coroutine */ Coroutine * qemu_coroutine_self(void); /** * Return whether or not currently inside a coroutine * * This can be used to write functions that work both when in coroutine context * and when not in coroutine context. Note that such functions cannot use the * coroutine_fn annotation since they work outside coroutine context. */ # 104 "//qemu-2.11+dfsg/include/qemu/coroutine.h" 3 4 _Bool # 104 "//qemu-2.11+dfsg/include/qemu/coroutine.h" qemu_in_coroutine(void); /** * Return true if the coroutine is currently entered * * A coroutine is "entered" if it has not yielded from the current * qemu_coroutine_enter() call used to run it. This does not mean that the * coroutine is currently executing code since it may have transferred control * to another coroutine using qemu_coroutine_enter(). * * When several coroutines enter each other there may be no way to know which * ones have already been entered. In such situations this function can be * used to avoid recursively entering coroutines. */ # 118 "//qemu-2.11+dfsg/include/qemu/coroutine.h" 3 4 _Bool # 118 "//qemu-2.11+dfsg/include/qemu/coroutine.h" qemu_coroutine_entered(Coroutine *co); /** * Provides a mutex that can be used to synchronise coroutines */ struct CoWaitRecord; typedef struct CoMutex { /* Count of pending lockers; 0 for a free mutex, 1 for an * uncontended mutex. */ unsigned locked; /* Context that is holding the lock. Useful to avoid spinning * when two coroutines on the same AioContext try to get the lock. :) */ AioContext *ctx; /* A queue of waiters. Elements are added atomically in front of * from_push. to_pop is only populated, and popped from, by whoever * is in charge of the next wakeup. This can be an unlocker or, * through the handoff protocol, a locker that is about to go to sleep. */ struct { struct CoWaitRecord *slh_first; /* first element */ } from_push, to_pop; unsigned handoff, sequence; Coroutine *holder; } CoMutex; /** * Initialises a CoMutex. This must be called before any other operation is used * on the CoMutex. */ void qemu_co_mutex_init(CoMutex *mutex); /** * Locks the mutex. If the lock cannot be taken immediately, control is * transferred to the caller of the current coroutine. */ void qemu_co_mutex_lock(CoMutex *mutex); /** * Unlocks the mutex and schedules the next coroutine that was waiting for this * lock to be run. */ void qemu_co_mutex_unlock(CoMutex *mutex); /** * CoQueues are a mechanism to queue coroutines in order to continue executing * them later. They are similar to condition variables, but they need help * from an external mutex in order to maintain thread-safety. */ typedef struct CoQueue { struct { struct Coroutine *sqh_first; /* first element */ struct Coroutine **sqh_last; /* addr of last next element */ } entries; } CoQueue; /** * Initialise a CoQueue. This must be called before any other operation is used * on the CoQueue. */ void qemu_co_queue_init(CoQueue *queue); /** * Adds the current coroutine to the CoQueue and transfers control to the * caller of the coroutine. The mutex is unlocked during the wait and * locked again afterwards. */ void qemu_co_queue_wait(CoQueue *queue, CoMutex *mutex); /** * Restarts the next coroutine in the CoQueue and removes it from the queue. * * Returns true if a coroutine was restarted, false if the queue is empty. */ # 193 "//qemu-2.11+dfsg/include/qemu/coroutine.h" 3 4 _Bool # 193 "//qemu-2.11+dfsg/include/qemu/coroutine.h" qemu_co_queue_next(CoQueue *queue); /** * Restarts all coroutines in the CoQueue and leaves the queue empty. */ void qemu_co_queue_restart_all(CoQueue *queue); /** * Enter the next coroutine in the queue */ # 203 "//qemu-2.11+dfsg/include/qemu/coroutine.h" 3 4 _Bool # 203 "//qemu-2.11+dfsg/include/qemu/coroutine.h" qemu_co_enter_next(CoQueue *queue); /** * Checks if the CoQueue is empty. */ # 208 "//qemu-2.11+dfsg/include/qemu/coroutine.h" 3 4 _Bool # 208 "//qemu-2.11+dfsg/include/qemu/coroutine.h" qemu_co_queue_empty(CoQueue *queue); typedef struct CoRwlock { int pending_writer; int reader; CoMutex mutex; CoQueue queue; } CoRwlock; /** * Initialises a CoRwlock. This must be called before any other operation * is used on the CoRwlock */ void qemu_co_rwlock_init(CoRwlock *lock); /** * Read locks the CoRwlock. If the lock cannot be taken immediately because * of a parallel writer, control is transferred to the caller of the current * coroutine. */ void qemu_co_rwlock_rdlock(CoRwlock *lock); /** * Write Locks the CoRwlock from a reader. This is a bit more efficient than * @qemu_co_rwlock_unlock followed by a separate @qemu_co_rwlock_wrlock. * However, if the lock cannot be upgraded immediately, control is transferred * to the caller of the current coroutine. Also, @qemu_co_rwlock_upgrade * only overrides CoRwlock fairness if there are no concurrent readers, so * another writer might run while @qemu_co_rwlock_upgrade blocks. */ void qemu_co_rwlock_upgrade(CoRwlock *lock); /** * Downgrades a write-side critical section to a reader. Downgrading with * @qemu_co_rwlock_downgrade never blocks, unlike @qemu_co_rwlock_unlock * followed by @qemu_co_rwlock_rdlock. This makes it more efficient, but * may also sometimes be necessary for correctness. */ void qemu_co_rwlock_downgrade(CoRwlock *lock); /** * Write Locks the mutex. If the lock cannot be taken immediately because * of a parallel reader, control is transferred to the caller of the current * coroutine. */ void qemu_co_rwlock_wrlock(CoRwlock *lock); /** * Unlocks the read/write lock and schedules the next coroutine that was * waiting for this lock to be run. */ void qemu_co_rwlock_unlock(CoRwlock *lock); /** * Yield the coroutine for a given duration * * Behaves similarly to co_sleep_ns(), but the sleeping coroutine will be * resumed when using aio_poll(). */ void co_aio_sleep_ns(AioContext *ctx, QEMUClockType type, int64_t ns); /** * Yield until a file descriptor becomes readable * * Note that this function clobbers the handlers for the file descriptor. */ void yield_until_fd_readable(int fd); # 8 "//qemu-2.11+dfsg/include/block/block.h" 2 # 1 "//qemu-2.11+dfsg/include/block/accounting.h" 1 /* * QEMU System Emulator block accounting * * Copyright (c) 2011 Christoph Hellwig * Copyright (c) 2015 Igalia, S.L. * * 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. */ # 9 "//qemu-2.11+dfsg/include/block/block.h" 2 # 1 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 1 # 1 "//qemu-2.11+dfsg/include/qemu-common.h" 1 /* Common header file that is included by all of QEMU. * * This file is supposed to be included only by .c files. No header file should * depend on qemu-common.h, as this would easily lead to circular header * dependencies. * * If a header file uses a definition from qemu-common.h, that definition * must be moved to a separate header file, and the header that uses it * must include that header. */ # 5 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 1 /* * Hierarchical Bitmap Data Type * * Copyright Red Hat, Inc., 2012 * * Author: Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or * later. See the COPYING file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qemu/bitops.h" 1 /* * Bitops Module * * Copyright (C) 2010 Corentin Chary * * Mostly inspired by (stolen from) linux/bitmap.h and linux/bitops.h * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qemu/host-utils.h" 1 /* * Utility compute operations used by translated code. * * Copyright (c) 2007 Thiemo Seufer * Copyright (c) 2007 Jocelyn Mayer * * 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. */ # 17 "//qemu-2.11+dfsg/include/qemu/bitops.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/atomic.h" 1 /* * Simple interface for atomic operations. * * Copyright (C) 2013 Red Hat, Inc. * * Author: Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * * See docs/devel/atomics.txt for discussion about the guarantees each * atomic primitive is meant to provide. */ # 18 "//qemu-2.11+dfsg/include/qemu/bitops.h" 2 # 30 "//qemu-2.11+dfsg/include/qemu/bitops.h" /** * set_bit - Set a bit in memory * @nr: the bit to set * @addr: the address to start counting from */ static inline void set_bit(long nr, unsigned long *addr) { unsigned long mask = (1UL << ((nr) % (sizeof (unsigned long) * 8))); unsigned long *p = addr + ((nr) / (sizeof (unsigned long) * 8)); *p |= mask; } /** * set_bit_atomic - Set a bit in memory atomically * @nr: the bit to set * @addr: the address to start counting from */ static inline void set_bit_atomic(long nr, unsigned long *addr) { unsigned long mask = (1UL << ((nr) % (sizeof (unsigned long) * 8))); unsigned long *p = addr + ((nr) / (sizeof (unsigned long) * 8)); ((void) __atomic_fetch_or(p, mask, 5)); } /** * clear_bit - Clears a bit in memory * @nr: Bit to clear * @addr: Address to start counting from */ static inline void clear_bit(long nr, unsigned long *addr) { unsigned long mask = (1UL << ((nr) % (sizeof (unsigned long) * 8))); unsigned long *p = addr + ((nr) / (sizeof (unsigned long) * 8)); *p &= ~mask; } /** * change_bit - Toggle a bit in memory * @nr: Bit to change * @addr: Address to start counting from */ static inline void change_bit(long nr, unsigned long *addr) { unsigned long mask = (1UL << ((nr) % (sizeof (unsigned long) * 8))); unsigned long *p = addr + ((nr) / (sizeof (unsigned long) * 8)); *p ^= mask; } /** * test_and_set_bit - Set a bit and return its old value * @nr: Bit to set * @addr: Address to count from */ static inline int test_and_set_bit(long nr, unsigned long *addr) { unsigned long mask = (1UL << ((nr) % (sizeof (unsigned long) * 8))); unsigned long *p = addr + ((nr) / (sizeof (unsigned long) * 8)); unsigned long old = *p; *p = old | mask; return (old & mask) != 0; } /** * test_and_clear_bit - Clear a bit and return its old value * @nr: Bit to clear * @addr: Address to count from */ static inline int test_and_clear_bit(long nr, unsigned long *addr) { unsigned long mask = (1UL << ((nr) % (sizeof (unsigned long) * 8))); unsigned long *p = addr + ((nr) / (sizeof (unsigned long) * 8)); unsigned long old = *p; *p = old & ~mask; return (old & mask) != 0; } /** * test_and_change_bit - Change a bit and return its old value * @nr: Bit to change * @addr: Address to count from */ static inline int test_and_change_bit(long nr, unsigned long *addr) { unsigned long mask = (1UL << ((nr) % (sizeof (unsigned long) * 8))); unsigned long *p = addr + ((nr) / (sizeof (unsigned long) * 8)); unsigned long old = *p; *p = old ^ mask; return (old & mask) != 0; } /** * test_bit - Determine whether a bit is set * @nr: bit number to test * @addr: Address to start counting from */ static inline int test_bit(long nr, const unsigned long *addr) { return 1UL & (addr[((nr) / (sizeof (unsigned long) * 8))] >> (nr & ((sizeof (unsigned long) * 8)-1))); } /** * find_last_bit - find the last set bit in a memory region * @addr: The address to start the search at * @size: The maximum size to search * * Returns the bit number of the first set bit, or size. */ unsigned long find_last_bit(const unsigned long *addr, unsigned long size); /** * find_next_bit - find the next set bit in a memory region * @addr: The address to base the search on * @offset: The bitnumber to start searching at * @size: The bitmap size in bits */ unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset); /** * find_next_zero_bit - find the next cleared bit in a memory region * @addr: The address to base the search on * @offset: The bitnumber to start searching at * @size: The bitmap size in bits */ unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, unsigned long offset); /** * find_first_bit - find the first set bit in a memory region * @addr: The address to start the search at * @size: The maximum size to search * * Returns the bit number of the first set bit. */ static inline unsigned long find_first_bit(const unsigned long *addr, unsigned long size) { unsigned long result, tmp; for (result = 0; result < size; result += (sizeof (unsigned long) * 8)) { tmp = *addr++; if (tmp) { result += ctz64(tmp); return result < size ? result : size; } } /* Not found */ return size; } /** * find_first_zero_bit - find the first cleared bit in a memory region * @addr: The address to start the search at * @size: The maximum size to search * * Returns the bit number of the first cleared bit. */ static inline unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size) { return find_next_zero_bit(addr, size, 0); } /** * rol8 - rotate an 8-bit value left * @word: value to rotate * @shift: bits to roll */ static inline uint8_t rol8(uint8_t word, unsigned int shift) { return (word << shift) | (word >> ((8 - shift) & 7)); } /** * ror8 - rotate an 8-bit value right * @word: value to rotate * @shift: bits to roll */ static inline uint8_t ror8(uint8_t word, unsigned int shift) { return (word >> shift) | (word << ((8 - shift) & 7)); } /** * rol16 - rotate a 16-bit value left * @word: value to rotate * @shift: bits to roll */ static inline uint16_t rol16(uint16_t word, unsigned int shift) { return (word << shift) | (word >> ((16 - shift) & 15)); } /** * ror16 - rotate a 16-bit value right * @word: value to rotate * @shift: bits to roll */ static inline uint16_t ror16(uint16_t word, unsigned int shift) { return (word >> shift) | (word << ((16 - shift) & 15)); } /** * rol32 - rotate a 32-bit value left * @word: value to rotate * @shift: bits to roll */ static inline uint32_t rol32(uint32_t word, unsigned int shift) { return (word << shift) | (word >> ((32 - shift) & 31)); } /** * ror32 - rotate a 32-bit value right * @word: value to rotate * @shift: bits to roll */ static inline uint32_t ror32(uint32_t word, unsigned int shift) { return (word >> shift) | (word << ((32 - shift) & 31)); } /** * rol64 - rotate a 64-bit value left * @word: value to rotate * @shift: bits to roll */ static inline uint64_t rol64(uint64_t word, unsigned int shift) { return (word << shift) | (word >> ((64 - shift) & 63)); } /** * ror64 - rotate a 64-bit value right * @word: value to rotate * @shift: bits to roll */ static inline uint64_t ror64(uint64_t word, unsigned int shift) { return (word >> shift) | (word << ((64 - shift) & 63)); } /** * extract32: * @value: the value to extract the bit field from * @start: the lowest bit in the bit field (numbered from 0) * @length: the length of the bit field * * Extract from the 32 bit input @value the bit field specified by the * @start and @length parameters, and return it. The bit field must * lie entirely within the 32 bit word. It is valid to request that * all 32 bits are returned (ie @length 32 and @start 0). * * Returns: the value of the bit field extracted from the input value. */ static inline uint32_t extract32(uint32_t value, int start, int length) { # 299 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ((void) sizeof (( # 299 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 32 - start # 299 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 299 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 32 - start # 299 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ; /* empty */ else __assert_fail ( # 299 "//qemu-2.11+dfsg/include/qemu/bitops.h" "start >= 0 && length > 0 && length <= 32 - start" # 299 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 , "//qemu-2.11+dfsg/include/qemu/bitops.h", 299, __extension__ __PRETTY_FUNCTION__); })) # 299 "//qemu-2.11+dfsg/include/qemu/bitops.h" ; return (value >> start) & (~0U >> (32 - length)); } /** * extract64: * @value: the value to extract the bit field from * @start: the lowest bit in the bit field (numbered from 0) * @length: the length of the bit field * * Extract from the 64 bit input @value the bit field specified by the * @start and @length parameters, and return it. The bit field must * lie entirely within the 64 bit word. It is valid to request that * all 64 bits are returned (ie @length 64 and @start 0). * * Returns: the value of the bit field extracted from the input value. */ static inline uint64_t extract64(uint64_t value, int start, int length) { # 318 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ((void) sizeof (( # 318 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 64 - start # 318 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 318 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 64 - start # 318 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ; /* empty */ else __assert_fail ( # 318 "//qemu-2.11+dfsg/include/qemu/bitops.h" "start >= 0 && length > 0 && length <= 64 - start" # 318 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 , "//qemu-2.11+dfsg/include/qemu/bitops.h", 318, __extension__ __PRETTY_FUNCTION__); })) # 318 "//qemu-2.11+dfsg/include/qemu/bitops.h" ; return (value >> start) & (~0ULL >> (64 - length)); } /** * sextract32: * @value: the value to extract the bit field from * @start: the lowest bit in the bit field (numbered from 0) * @length: the length of the bit field * * Extract from the 32 bit input @value the bit field specified by the * @start and @length parameters, and return it, sign extended to * an int32_t (ie with the most significant bit of the field propagated * to all the upper bits of the return value). The bit field must lie * entirely within the 32 bit word. It is valid to request that * all 32 bits are returned (ie @length 32 and @start 0). * * Returns: the sign extended value of the bit field extracted from the * input value. */ static inline int32_t sextract32(uint32_t value, int start, int length) { # 340 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ((void) sizeof (( # 340 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 32 - start # 340 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 340 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 32 - start # 340 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ; /* empty */ else __assert_fail ( # 340 "//qemu-2.11+dfsg/include/qemu/bitops.h" "start >= 0 && length > 0 && length <= 32 - start" # 340 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 , "//qemu-2.11+dfsg/include/qemu/bitops.h", 340, __extension__ __PRETTY_FUNCTION__); })) # 340 "//qemu-2.11+dfsg/include/qemu/bitops.h" ; /* Note that this implementation relies on right shift of signed * integers being an arithmetic shift. */ return ((int32_t)(value << (32 - length - start))) >> (32 - length); } /** * sextract64: * @value: the value to extract the bit field from * @start: the lowest bit in the bit field (numbered from 0) * @length: the length of the bit field * * Extract from the 64 bit input @value the bit field specified by the * @start and @length parameters, and return it, sign extended to * an int64_t (ie with the most significant bit of the field propagated * to all the upper bits of the return value). The bit field must lie * entirely within the 64 bit word. It is valid to request that * all 64 bits are returned (ie @length 64 and @start 0). * * Returns: the sign extended value of the bit field extracted from the * input value. */ static inline int64_t sextract64(uint64_t value, int start, int length) { # 365 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ((void) sizeof (( # 365 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 64 - start # 365 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 365 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 64 - start # 365 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ; /* empty */ else __assert_fail ( # 365 "//qemu-2.11+dfsg/include/qemu/bitops.h" "start >= 0 && length > 0 && length <= 64 - start" # 365 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 , "//qemu-2.11+dfsg/include/qemu/bitops.h", 365, __extension__ __PRETTY_FUNCTION__); })) # 365 "//qemu-2.11+dfsg/include/qemu/bitops.h" ; /* Note that this implementation relies on right shift of signed * integers being an arithmetic shift. */ return ((int64_t)(value << (64 - length - start))) >> (64 - length); } /** * deposit32: * @value: initial value to insert bit field into * @start: the lowest bit in the bit field (numbered from 0) * @length: the length of the bit field * @fieldval: the value to insert into the bit field * * Deposit @fieldval into the 32 bit @value at the bit field specified * by the @start and @length parameters, and return the modified * @value. Bits of @value outside the bit field are not modified. * Bits of @fieldval above the least significant @length bits are * ignored. The bit field must lie entirely within the 32 bit word. * It is valid to request that all 32 bits are modified (ie @length * 32 and @start 0). * * Returns: the modified @value. */ static inline uint32_t deposit32(uint32_t value, int start, int length, uint32_t fieldval) { uint32_t mask; # 393 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ((void) sizeof (( # 393 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 32 - start # 393 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 393 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 32 - start # 393 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ; /* empty */ else __assert_fail ( # 393 "//qemu-2.11+dfsg/include/qemu/bitops.h" "start >= 0 && length > 0 && length <= 32 - start" # 393 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 , "//qemu-2.11+dfsg/include/qemu/bitops.h", 393, __extension__ __PRETTY_FUNCTION__); })) # 393 "//qemu-2.11+dfsg/include/qemu/bitops.h" ; mask = (~0U >> (32 - length)) << start; return (value & ~mask) | ((fieldval << start) & mask); } /** * deposit64: * @value: initial value to insert bit field into * @start: the lowest bit in the bit field (numbered from 0) * @length: the length of the bit field * @fieldval: the value to insert into the bit field * * Deposit @fieldval into the 64 bit @value at the bit field specified * by the @start and @length parameters, and return the modified * @value. Bits of @value outside the bit field are not modified. * Bits of @fieldval above the least significant @length bits are * ignored. The bit field must lie entirely within the 64 bit word. * It is valid to request that all 64 bits are modified (ie @length * 64 and @start 0). * * Returns: the modified @value. */ static inline uint64_t deposit64(uint64_t value, int start, int length, uint64_t fieldval) { uint64_t mask; # 419 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ((void) sizeof (( # 419 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 64 - start # 419 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 419 "//qemu-2.11+dfsg/include/qemu/bitops.h" start >= 0 && length > 0 && length <= 64 - start # 419 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 ) ; /* empty */ else __assert_fail ( # 419 "//qemu-2.11+dfsg/include/qemu/bitops.h" "start >= 0 && length > 0 && length <= 64 - start" # 419 "//qemu-2.11+dfsg/include/qemu/bitops.h" 3 4 , "//qemu-2.11+dfsg/include/qemu/bitops.h", 419, __extension__ __PRETTY_FUNCTION__); })) # 419 "//qemu-2.11+dfsg/include/qemu/bitops.h" ; mask = (~0ULL >> (64 - length)) << start; return (value & ~mask) | ((fieldval << start) & mask); } /** * half_shuffle32: * @value: 32-bit value (of which only the bottom 16 bits are of interest) * * Given an input value: * xxxx xxxx xxxx xxxx ABCD EFGH IJKL MNOP * return the value where the bottom 16 bits are spread out into * the odd bits in the word, and the even bits are zeroed: * 0A0B 0C0D 0E0F 0G0H 0I0J 0K0L 0M0N 0O0P * * Any bits set in the top half of the input are ignored. * * Returns: the shuffled bits. */ static inline uint32_t half_shuffle32(uint32_t x) { /* This algorithm is from _Hacker's Delight_ section 7-2 "Shuffling Bits". * It ignores any bits set in the top half of the input. */ x = ((x & 0xFF00) << 8) | (x & 0x00FF); x = ((x << 4) | x) & 0x0F0F0F0F; x = ((x << 2) | x) & 0x33333333; x = ((x << 1) | x) & 0x55555555; return x; } /** * half_shuffle64: * @value: 64-bit value (of which only the bottom 32 bits are of interest) * * Given an input value: * xxxx xxxx xxxx .... xxxx xxxx ABCD EFGH IJKL MNOP QRST UVWX YZab cdef * return the value where the bottom 32 bits are spread out into * the odd bits in the word, and the even bits are zeroed: * 0A0B 0C0D 0E0F 0G0H 0I0J 0K0L 0M0N .... 0U0V 0W0X 0Y0Z 0a0b 0c0d 0e0f * * Any bits set in the top half of the input are ignored. * * Returns: the shuffled bits. */ static inline uint64_t half_shuffle64(uint64_t x) { /* This algorithm is from _Hacker's Delight_ section 7-2 "Shuffling Bits". * It ignores any bits set in the top half of the input. */ x = ((x & 0xFFFF0000ULL) << 16) | (x & 0xFFFF); x = ((x << 8) | x) & 0x00FF00FF00FF00FFULL; x = ((x << 4) | x) & 0x0F0F0F0F0F0F0F0FULL; x = ((x << 2) | x) & 0x3333333333333333ULL; x = ((x << 1) | x) & 0x5555555555555555ULL; return x; } /** * half_unshuffle32: * @value: 32-bit value (of which only the odd bits are of interest) * * Given an input value: * xAxB xCxD xExF xGxH xIxJ xKxL xMxN xOxP * return the value where all the odd bits are compressed down * into the low half of the word, and the high half is zeroed: * 0000 0000 0000 0000 ABCD EFGH IJKL MNOP * * Any even bits set in the input are ignored. * * Returns: the unshuffled bits. */ static inline uint32_t half_unshuffle32(uint32_t x) { /* This algorithm is from _Hacker's Delight_ section 7-2 "Shuffling Bits". * where it is called an inverse half shuffle. */ x &= 0x55555555; x = ((x >> 1) | x) & 0x33333333; x = ((x >> 2) | x) & 0x0F0F0F0F; x = ((x >> 4) | x) & 0x00FF00FF; x = ((x >> 8) | x) & 0x0000FFFF; return x; } /** * half_unshuffle64: * @value: 64-bit value (of which only the odd bits are of interest) * * Given an input value: * xAxB xCxD xExF xGxH xIxJ xKxL xMxN .... xUxV xWxX xYxZ xaxb xcxd xexf * return the value where all the odd bits are compressed down * into the low half of the word, and the high half is zeroed: * 0000 0000 0000 .... 0000 0000 ABCD EFGH IJKL MNOP QRST UVWX YZab cdef * * Any even bits set in the input are ignored. * * Returns: the unshuffled bits. */ static inline uint64_t half_unshuffle64(uint64_t x) { /* This algorithm is from _Hacker's Delight_ section 7-2 "Shuffling Bits". * where it is called an inverse half shuffle. */ x &= 0x5555555555555555ULL; x = ((x >> 1) | x) & 0x3333333333333333ULL; x = ((x >> 2) | x) & 0x0F0F0F0F0F0F0F0FULL; x = ((x >> 4) | x) & 0x00FF00FF00FF00FFULL; x = ((x >> 8) | x) & 0x0000FFFF0000FFFFULL; x = ((x >> 16) | x) & 0x00000000FFFFFFFFULL; return x; } # 16 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/host-utils.h" 1 /* * Utility compute operations used by translated code. * * Copyright (c) 2007 Thiemo Seufer * Copyright (c) 2007 Jocelyn Mayer * * 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. */ # 17 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 2 typedef struct HBitmap HBitmap; typedef struct HBitmapIter HBitmapIter; /* For 32-bit, the largest that fits in a 4 GiB address space. * For 64-bit, the number of sectors in 1 PiB. Good luck, in * either case... :) */ /* We need to place a sentinel in level 0 to speed up iteration. Thus, * we do this instead of HBITMAP_LOG_MAX_SIZE / BITS_PER_LEVEL. The * difference is that it allocates an extra level when HBITMAP_LOG_MAX_SIZE * is an exact multiple of BITS_PER_LEVEL. */ struct HBitmapIter { const HBitmap *hb; /* Copied from hb for access in the inline functions (hb is opaque). */ int granularity; /* Entry offset into the last-level array of longs. */ size_t pos; /* The currently-active path in the tree. Each item of cur[i] stores * the bits (i.e. the subtrees) yet to be processed under that node. */ unsigned long cur[((((sizeof (unsigned long) * 8) == 32 ? 34 : 41) / ((sizeof (unsigned long) * 8) == 32 ? 5 : 6)) + 1)]; }; /** * hbitmap_alloc: * @size: Number of bits in the bitmap. * @granularity: Granularity of the bitmap. Aligned groups of 2^@granularity * bits will be represented by a single bit. Each operation on a * range of bits first rounds the bits to determine which group they land * in, and then affect the entire set; iteration will only visit the first * bit of each group. * * Allocate a new HBitmap. */ HBitmap *hbitmap_alloc(uint64_t size, int granularity); /** * hbitmap_truncate: * @hb: The bitmap to change the size of. * @size: The number of elements to change the bitmap to accommodate. * * truncate or grow an existing bitmap to accommodate a new number of elements. * This may invalidate existing HBitmapIterators. */ void hbitmap_truncate(HBitmap *hb, uint64_t size); /** * hbitmap_merge: * @a: The bitmap to store the result in. * @b: The bitmap to merge into @a. * @return true if the merge was successful, * false if it was not attempted. * * Merge two bitmaps together. * A := A (BITOR) B. * B is left unmodified. */ # 85 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 3 4 _Bool # 85 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" hbitmap_merge(HBitmap *a, const HBitmap *b); /** * hbitmap_empty: * @hb: HBitmap to operate on. * * Return whether the bitmap is empty. */ # 93 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 3 4 _Bool # 93 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" hbitmap_empty(const HBitmap *hb); /** * hbitmap_granularity: * @hb: HBitmap to operate on. * * Return the granularity of the HBitmap. */ int hbitmap_granularity(const HBitmap *hb); /** * hbitmap_count: * @hb: HBitmap to operate on. * * Return the number of bits set in the HBitmap. */ uint64_t hbitmap_count(const HBitmap *hb); /** * hbitmap_set: * @hb: HBitmap to operate on. * @start: First bit to set (0-based). * @count: Number of bits to set. * * Set a consecutive range of bits in an HBitmap. */ void hbitmap_set(HBitmap *hb, uint64_t start, uint64_t count); /** * hbitmap_reset: * @hb: HBitmap to operate on. * @start: First bit to reset (0-based). * @count: Number of bits to reset. * * Reset a consecutive range of bits in an HBitmap. */ void hbitmap_reset(HBitmap *hb, uint64_t start, uint64_t count); /** * hbitmap_reset_all: * @hb: HBitmap to operate on. * * Reset all bits in an HBitmap. */ void hbitmap_reset_all(HBitmap *hb); /** * hbitmap_get: * @hb: HBitmap to operate on. * @item: Bit to query (0-based). * * Return whether the @item-th bit in an HBitmap is set. */ # 146 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 3 4 _Bool # 146 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" hbitmap_get(const HBitmap *hb, uint64_t item); /** * hbitmap_is_serializable: * @hb: HBitmap which should be (de-)serialized. * * Returns whether the bitmap can actually be (de-)serialized. Other * (de-)serialization functions may only be invoked if this function returns * true. * * Calling (de-)serialization functions does not affect a bitmap's * (de-)serializability. */ # 159 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 3 4 _Bool # 159 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" hbitmap_is_serializable(const HBitmap *hb); /** * hbitmap_serialization_align: * @hb: HBitmap to operate on. * * Required alignment of serialization chunks, used by other serialization * functions. For every chunk: * 1. Chunk start should be aligned to this granularity. * 2. Chunk size should be aligned too, except for last chunk (for which * start + count == hb->size) */ uint64_t hbitmap_serialization_align(const HBitmap *hb); /** * hbitmap_serialization_size: * @hb: HBitmap to operate on. * @start: Starting bit * @count: Number of bits * * Return number of bytes hbitmap_(de)serialize_part needs */ uint64_t hbitmap_serialization_size(const HBitmap *hb, uint64_t start, uint64_t count); /** * hbitmap_serialize_part * @hb: HBitmap to operate on. * @buf: Buffer to store serialized bitmap. * @start: First bit to store. * @count: Number of bits to store. * * Stores HBitmap data corresponding to given region. The format of saved data * is linear sequence of bits, so it can be used by hbitmap_deserialize_part * independently of endianness and size of HBitmap level array elements */ void hbitmap_serialize_part(const HBitmap *hb, uint8_t *buf, uint64_t start, uint64_t count); /** * hbitmap_deserialize_part * @hb: HBitmap to operate on. * @buf: Buffer to restore bitmap data from. * @start: First bit to restore. * @count: Number of bits to restore. * @finish: Whether to call hbitmap_deserialize_finish automatically. * * Restores HBitmap data corresponding to given region. The format is the same * as for hbitmap_serialize_part. * * If @finish is false, caller must call hbitmap_serialize_finish before using * the bitmap. */ void hbitmap_deserialize_part(HBitmap *hb, uint8_t *buf, uint64_t start, uint64_t count, # 214 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 3 4 _Bool # 214 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" finish); /** * hbitmap_deserialize_zeroes * @hb: HBitmap to operate on. * @start: First bit to restore. * @count: Number of bits to restore. * @finish: Whether to call hbitmap_deserialize_finish automatically. * * Fills the bitmap with zeroes. * * If @finish is false, caller must call hbitmap_serialize_finish before using * the bitmap. */ void hbitmap_deserialize_zeroes(HBitmap *hb, uint64_t start, uint64_t count, # 229 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 3 4 _Bool # 229 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" finish); /** * hbitmap_deserialize_ones * @hb: HBitmap to operate on. * @start: First bit to restore. * @count: Number of bits to restore. * @finish: Whether to call hbitmap_deserialize_finish automatically. * * Fills the bitmap with ones. * * If @finish is false, caller must call hbitmap_serialize_finish before using * the bitmap. */ void hbitmap_deserialize_ones(HBitmap *hb, uint64_t start, uint64_t count, # 244 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 3 4 _Bool # 244 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" finish); /** * hbitmap_deserialize_finish * @hb: HBitmap to operate on. * * Repair HBitmap after calling hbitmap_deserialize_data. Actually, all HBitmap * layers are restored here. */ void hbitmap_deserialize_finish(HBitmap *hb); /** * hbitmap_sha256: * @bitmap: HBitmap to operate on. * * Returns SHA256 hash of the last level. */ char *hbitmap_sha256(const HBitmap *bitmap, Error **errp); /** * hbitmap_free: * @hb: HBitmap to operate on. * * Free an HBitmap and all of its associated memory. */ void hbitmap_free(HBitmap *hb); /** * hbitmap_iter_init: * @hbi: HBitmapIter to initialize. * @hb: HBitmap to iterate on. * @first: First bit to visit (0-based, must be strictly less than the * size of the bitmap). * * Set up @hbi to iterate on the HBitmap @hb. hbitmap_iter_next will return * the lowest-numbered bit that is set in @hb, starting at @first. * * Concurrent setting of bits is acceptable, and will at worst cause the * iteration to miss some of those bits. * * The concurrent resetting of bits is OK. */ void hbitmap_iter_init(HBitmapIter *hbi, const HBitmap *hb, uint64_t first); /* hbitmap_iter_skip_words: * @hbi: HBitmapIter to operate on. * * Internal function used by hbitmap_iter_next and hbitmap_iter_next_word. */ unsigned long hbitmap_iter_skip_words(HBitmapIter *hbi); /* hbitmap_create_meta: * Create a "meta" hbitmap to track dirtiness of the bits in this HBitmap. * The caller owns the created bitmap and must call hbitmap_free_meta(hb) to * free it. * * Currently, we only guarantee that if a bit in the hbitmap is changed it * will be reflected in the meta bitmap, but we do not yet guarantee the * opposite. * * @hb: The HBitmap to operate on. * @chunk_size: How many bits in @hb does one bit in the meta track. */ HBitmap *hbitmap_create_meta(HBitmap *hb, int chunk_size); /* hbitmap_free_meta: * Free the meta bitmap of @hb. * * @hb: The HBitmap whose meta bitmap should be freed. */ void hbitmap_free_meta(HBitmap *hb); /** * hbitmap_iter_next: * @hbi: HBitmapIter to operate on. * * Return the next bit that is set in @hbi's associated HBitmap, * or -1 if all remaining bits are zero. */ int64_t hbitmap_iter_next(HBitmapIter *hbi); /** * hbitmap_iter_next_word: * @hbi: HBitmapIter to operate on. * @p_cur: Location where to store the next non-zero word. * * Return the index of the next nonzero word that is set in @hbi's * associated HBitmap, and set *p_cur to the content of that word * (bits before the index that was passed to hbitmap_iter_init are * trimmed on the first call). Return -1, and set *p_cur to zero, * if all remaining words are zero. */ static inline size_t hbitmap_iter_next_word(HBitmapIter *hbi, unsigned long *p_cur) { unsigned long cur = hbi->cur[((((sizeof (unsigned long) * 8) == 32 ? 34 : 41) / ((sizeof (unsigned long) * 8) == 32 ? 5 : 6)) + 1) - 1]; if (cur == 0) { cur = hbitmap_iter_skip_words(hbi); if (cur == 0) { *p_cur = 0; return -1; } } /* The next call will resume work from the next word. */ hbi->cur[((((sizeof (unsigned long) * 8) == 32 ? 34 : 41) / ((sizeof (unsigned long) * 8) == 32 ? 5 : 6)) + 1) - 1] = 0; *p_cur = cur; return hbi->pos; } # 6 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 2 BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs, uint32_t granularity, const char *name, Error **errp); void bdrv_create_meta_dirty_bitmap(BdrvDirtyBitmap *bitmap, int chunk_size); void bdrv_release_meta_dirty_bitmap(BdrvDirtyBitmap *bitmap); int bdrv_dirty_bitmap_create_successor(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, Error **errp); BdrvDirtyBitmap *bdrv_dirty_bitmap_abdicate(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, Error **errp); BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, Error **errp); BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs, const char *name); void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap); void bdrv_release_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap); void bdrv_release_named_dirty_bitmaps(BlockDriverState *bs); void bdrv_release_persistent_dirty_bitmaps(BlockDriverState *bs); void bdrv_remove_persistent_dirty_bitmap(BlockDriverState *bs, const char *name, Error **errp); void bdrv_disable_dirty_bitmap(BdrvDirtyBitmap *bitmap); void bdrv_enable_dirty_bitmap(BdrvDirtyBitmap *bitmap); BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs); uint32_t bdrv_get_default_bitmap_granularity(BlockDriverState *bs); uint32_t bdrv_dirty_bitmap_granularity(const BdrvDirtyBitmap *bitmap); # 37 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 37 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap); # 38 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 38 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" bdrv_dirty_bitmap_frozen(BdrvDirtyBitmap *bitmap); const char *bdrv_dirty_bitmap_name(const BdrvDirtyBitmap *bitmap); int64_t bdrv_dirty_bitmap_size(const BdrvDirtyBitmap *bitmap); DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap); void bdrv_set_dirty_bitmap(BdrvDirtyBitmap *bitmap, int64_t offset, int64_t bytes); void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap, int64_t offset, int64_t bytes); BdrvDirtyBitmapIter *bdrv_dirty_meta_iter_new(BdrvDirtyBitmap *bitmap); BdrvDirtyBitmapIter *bdrv_dirty_iter_new(BdrvDirtyBitmap *bitmap); void bdrv_dirty_iter_free(BdrvDirtyBitmapIter *iter); uint64_t bdrv_dirty_bitmap_serialization_size(const BdrvDirtyBitmap *bitmap, uint64_t offset, uint64_t bytes); uint64_t bdrv_dirty_bitmap_serialization_align(const BdrvDirtyBitmap *bitmap); void bdrv_dirty_bitmap_serialize_part(const BdrvDirtyBitmap *bitmap, uint8_t *buf, uint64_t offset, uint64_t bytes); void bdrv_dirty_bitmap_deserialize_part(BdrvDirtyBitmap *bitmap, uint8_t *buf, uint64_t offset, uint64_t bytes, # 58 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 58 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" finish); void bdrv_dirty_bitmap_deserialize_zeroes(BdrvDirtyBitmap *bitmap, uint64_t offset, uint64_t bytes, # 61 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 61 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" finish); void bdrv_dirty_bitmap_deserialize_ones(BdrvDirtyBitmap *bitmap, uint64_t offset, uint64_t bytes, # 64 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 64 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" finish); void bdrv_dirty_bitmap_deserialize_finish(BdrvDirtyBitmap *bitmap); void bdrv_dirty_bitmap_set_readonly(BdrvDirtyBitmap *bitmap, # 67 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 67 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" value); void bdrv_dirty_bitmap_set_autoload(BdrvDirtyBitmap *bitmap, # 68 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 68 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" autoload); void bdrv_dirty_bitmap_set_persistance(BdrvDirtyBitmap *bitmap, # 70 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 70 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" persistent); /* Functions that require manual locking. */ void bdrv_dirty_bitmap_lock(BdrvDirtyBitmap *bitmap); void bdrv_dirty_bitmap_unlock(BdrvDirtyBitmap *bitmap); # 75 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 75 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" bdrv_get_dirty_locked(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, int64_t offset); void bdrv_set_dirty_bitmap_locked(BdrvDirtyBitmap *bitmap, int64_t offset, int64_t bytes); void bdrv_reset_dirty_bitmap_locked(BdrvDirtyBitmap *bitmap, int64_t offset, int64_t bytes); int64_t bdrv_dirty_iter_next(BdrvDirtyBitmapIter *iter); void bdrv_set_dirty_iter(BdrvDirtyBitmapIter *hbi, int64_t offset); int64_t bdrv_get_dirty_count(BdrvDirtyBitmap *bitmap); int64_t bdrv_get_meta_dirty_count(BdrvDirtyBitmap *bitmap); void bdrv_dirty_bitmap_truncate(BlockDriverState *bs, int64_t bytes); # 86 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 86 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" bdrv_dirty_bitmap_readonly(const BdrvDirtyBitmap *bitmap); # 87 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 87 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" bdrv_has_readonly_bitmaps(BlockDriverState *bs); # 88 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 88 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" bdrv_dirty_bitmap_get_autoload(const BdrvDirtyBitmap *bitmap); # 89 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 89 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" bdrv_dirty_bitmap_get_persistance(BdrvDirtyBitmap *bitmap); # 90 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" 3 4 _Bool # 90 "//qemu-2.11+dfsg/include/block/dirty-bitmap.h" bdrv_has_changed_persistent_bitmaps(BlockDriverState *bs); BdrvDirtyBitmap *bdrv_dirty_bitmap_next(BlockDriverState *bs, BdrvDirtyBitmap *bitmap); char *bdrv_dirty_bitmap_sha256(const BdrvDirtyBitmap *bitmap, Error **errp); # 10 "//qemu-2.11+dfsg/include/block/block.h" 2 # 1 "//qemu-2.11+dfsg/include/block/blockjob.h" 1 /* * Declarations for long-running block device operations * * Copyright (c) 2011 IBM Corp. * Copyright (c) 2012 Red Hat, Inc. * * 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. */ # 1 "//qemu-2.11+dfsg/include/block/block.h" 1 # 30 "//qemu-2.11+dfsg/include/block/blockjob.h" 2 typedef struct BlockJobDriver BlockJobDriver; typedef struct BlockJobTxn BlockJobTxn; /** * BlockJob: * * Long-running operation on a BlockDriverState. */ typedef struct BlockJob { /** The job type, including the job vtable. */ const BlockJobDriver *driver; /** The block device on which the job is operating. */ BlockBackend *blk; /** * The ID of the block job. May be NULL for internal jobs. */ char *id; /** * The coroutine that executes the job. If not NULL, it is * reentered when busy is false and the job is cancelled. */ Coroutine *co; /** * Set to true if the job should cancel itself. The flag must * always be tested just before toggling the busy flag from false * to true. After a job has been cancelled, it should only yield * if #aio_poll will ("sooner or later") reenter the coroutine. */ # 63 "//qemu-2.11+dfsg/include/block/blockjob.h" 3 4 _Bool # 63 "//qemu-2.11+dfsg/include/block/blockjob.h" cancelled; /** * Counter for pause request. If non-zero, the block job is either paused, * or if busy == true will pause itself as soon as possible. */ int pause_count; /** * Set to true if the job is paused by user. Can be unpaused with the * block-job-resume QMP command. */ # 75 "//qemu-2.11+dfsg/include/block/blockjob.h" 3 4 _Bool # 75 "//qemu-2.11+dfsg/include/block/blockjob.h" user_paused; /** * Set to false by the job while the coroutine has yielded and may be * re-entered by block_job_enter(). There may still be I/O or event loop * activity pending. Accessed under block_job_mutex (in blockjob.c). */ # 82 "//qemu-2.11+dfsg/include/block/blockjob.h" 3 4 _Bool # 82 "//qemu-2.11+dfsg/include/block/blockjob.h" busy; /** * Set to true by the job while it is in a quiescent state, where * no I/O or event loop activity is pending. */ # 88 "//qemu-2.11+dfsg/include/block/blockjob.h" 3 4 _Bool # 88 "//qemu-2.11+dfsg/include/block/blockjob.h" paused; /** * Set to true when the job is ready to be completed. */ # 93 "//qemu-2.11+dfsg/include/block/blockjob.h" 3 4 _Bool # 93 "//qemu-2.11+dfsg/include/block/blockjob.h" ready; /** * Set to true when the job has deferred work to the main loop. */ # 98 "//qemu-2.11+dfsg/include/block/blockjob.h" 3 4 _Bool # 98 "//qemu-2.11+dfsg/include/block/blockjob.h" deferred_to_main_loop; /** Element of the list of block jobs */ struct { struct BlockJob *le_next; /* next element */ struct BlockJob **le_prev; /* address of previous next element */ } job_list; /** Status that is published by the query-block-jobs QMP API */ BlockDeviceIoStatus iostatus; /** Offset that is published by the query-block-jobs QMP API */ int64_t offset; /** Length that is published by the query-block-jobs QMP API */ int64_t len; /** Speed that was set with @block_job_set_speed. */ int64_t speed; /** The completion function that will be called when the job completes. */ BlockCompletionFunc *cb; /** Block other operations when block job is running */ Error *blocker; /** BlockDriverStates that are involved in this block job */ GSList *nodes; /** The opaque value that is passed to the completion function. */ void *opaque; /** Reference count of the block job */ int refcnt; /* True if this job has reported completion by calling block_job_completed. */ # 132 "//qemu-2.11+dfsg/include/block/blockjob.h" 3 4 _Bool # 132 "//qemu-2.11+dfsg/include/block/blockjob.h" completed; /* ret code passed to block_job_completed. */ int ret; /** * Timer that is used by @block_job_sleep_ns. Accessed under * block_job_mutex (in blockjob.c). */ QEMUTimer sleep_timer; /** Non-NULL if this job is part of a transaction */ BlockJobTxn *txn; struct { struct BlockJob *le_next; /* next element */ struct BlockJob **le_prev; /* address of previous next element */ } txn_list; } BlockJob; typedef enum BlockJobCreateFlags { BLOCK_JOB_DEFAULT = 0x00, BLOCK_JOB_INTERNAL = 0x01, } BlockJobCreateFlags; /** * block_job_next: * @job: A block job, or %NULL. * * Get the next element from the list of block jobs after @job, or the * first one if @job is %NULL. * * Returns the requested job, or %NULL if there are no more jobs left. */ BlockJob *block_job_next(BlockJob *job); /** * block_job_get: * @id: The id of the block job. * * Get the block job identified by @id (which must not be %NULL). * * Returns the requested job, or %NULL if it doesn't exist. */ BlockJob *block_job_get(const char *id); /** * block_job_add_bdrv: * @job: A block job * @name: The name to assign to the new BdrvChild * @bs: A BlockDriverState that is involved in @job * @perm, @shared_perm: Permissions to request on the node * * Add @bs to the list of BlockDriverState that are involved in * @job. This means that all operations will be blocked on @bs while * @job exists. */ int block_job_add_bdrv(BlockJob *job, const char *name, BlockDriverState *bs, uint64_t perm, uint64_t shared_perm, Error **errp); /** * block_job_remove_all_bdrv: * @job: The block job * * Remove all BlockDriverStates from the list of nodes that are involved in the * job. This removes the blockers added with block_job_add_bdrv(). */ void block_job_remove_all_bdrv(BlockJob *job); /** * block_job_set_speed: * @job: The job to set the speed for. * @speed: The new value * @errp: Error object. * * Set a rate-limiting parameter for the job; the actual meaning may * vary depending on the job type. */ void block_job_set_speed(BlockJob *job, int64_t speed, Error **errp); /** * block_job_start: * @job: A job that has not yet been started. * * Begins execution of a block job. * Takes ownership of one reference to the job object. */ void block_job_start(BlockJob *job); /** * block_job_cancel: * @job: The job to be canceled. * * Asynchronously cancel the specified job. */ void block_job_cancel(BlockJob *job); /** * block_job_complete: * @job: The job to be completed. * @errp: Error object. * * Asynchronously complete the specified job. */ void block_job_complete(BlockJob *job, Error **errp); /** * block_job_query: * @job: The job to get information about. * * Return information about a job. */ BlockJobInfo *block_job_query(BlockJob *job, Error **errp); /** * block_job_user_pause: * @job: The job to be paused. * * Asynchronously pause the specified job. * Do not allow a resume until a matching call to block_job_user_resume. */ void block_job_user_pause(BlockJob *job); /** * block_job_paused: * @job: The job to query. * * Returns true if the job is user-paused. */ # 258 "//qemu-2.11+dfsg/include/block/blockjob.h" 3 4 _Bool # 258 "//qemu-2.11+dfsg/include/block/blockjob.h" block_job_user_paused(BlockJob *job); /** * block_job_user_resume: * @job: The job to be resumed. * * Resume the specified job. * Must be paired with a preceding block_job_user_pause. */ void block_job_user_resume(BlockJob *job); /** * block_job_cancel_sync: * @job: The job to be canceled. * * Synchronously cancel the job. The completion callback is called * before the function returns. The job may actually complete * instead of canceling itself; the circumstances under which this * happens depend on the kind of job that is active. * * Returns the return value from the job if the job actually completed * during the call, or -ECANCELED if it was canceled. */ int block_job_cancel_sync(BlockJob *job); /** * block_job_cancel_sync_all: * * Synchronously cancels all jobs using block_job_cancel_sync(). */ void block_job_cancel_sync_all(void); /** * block_job_complete_sync: * @job: The job to be completed. * @errp: Error object which may be set by block_job_complete(); this is not * necessarily set on every error, the job return value has to be * checked as well. * * Synchronously complete the job. The completion callback is called before the * function returns, unless it is NULL (which is permissible when using this * function). * * Returns the return value from the job. */ int block_job_complete_sync(BlockJob *job, Error **errp); /** * block_job_iostatus_reset: * @job: The job whose I/O status should be reset. * * Reset I/O status on @job and on BlockDriverState objects it uses, * other than job->blk. */ void block_job_iostatus_reset(BlockJob *job); /** * block_job_txn_new: * * Allocate and return a new block job transaction. Jobs can be added to the * transaction using block_job_txn_add_job(). * * The transaction is automatically freed when the last job completes or is * cancelled. * * All jobs in the transaction either complete successfully or fail/cancel as a * group. Jobs wait for each other before completing. Cancelling one job * cancels all jobs in the transaction. */ BlockJobTxn *block_job_txn_new(void); /** * block_job_ref: * * Add a reference to BlockJob refcnt, it will be decreased with * block_job_unref, and then be freed if it comes to be the last * reference. */ void block_job_ref(BlockJob *job); /** * block_job_unref: * * Release a reference that was previously acquired with block_job_ref * or block_job_create. If it's the last reference to the object, it will be * freed. */ void block_job_unref(BlockJob *job); /** * block_job_txn_unref: * * Release a reference that was previously acquired with block_job_txn_add_job * or block_job_txn_new. If it's the last reference to the object, it will be * freed. */ void block_job_txn_unref(BlockJobTxn *txn); /** * block_job_txn_add_job: * @txn: The transaction (may be NULL) * @job: Job to add to the transaction * * Add @job to the transaction. The @job must not already be in a transaction. * The caller must call either block_job_txn_unref() or block_job_completed() * to release the reference that is automatically grabbed here. */ void block_job_txn_add_job(BlockJobTxn *txn, BlockJob *job); /** * block_job_is_internal: * @job: The job to determine if it is user-visible or not. * * Returns true if the job should not be visible to the management layer. */ # 373 "//qemu-2.11+dfsg/include/block/blockjob.h" 3 4 _Bool # 373 "//qemu-2.11+dfsg/include/block/blockjob.h" block_job_is_internal(BlockJob *job); # 11 "//qemu-2.11+dfsg/include/block/block.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 1 /* * QEMU Object Model. * * Based on ideas by Avi Kivity * * Copyright (C) 2009, 2015 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * * QObject Reference Counts Terminology * ------------------------------------ * * - Returning references: A function that returns an object may * return it as either a weak or a strong reference. If the reference * is strong, you are responsible for calling QDECREF() on the reference * when you are done. * * If the reference is weak, the owner of the reference may free it at * any time in the future. Before storing the reference anywhere, you * should call QINCREF() to make the reference strong. * * - Transferring ownership: when you transfer ownership of a reference * by calling a function, you are no longer responsible for calling * QDECREF() when the reference is no longer needed. In other words, * when the function returns you must behave as if the reference to the * passed object was weak. */ # 12 "//qemu-2.11+dfsg/include/block/block.h" 2 # 1 "./qapi-types.h" 1 /* AUTOMATICALLY GENERATED, DO NOT MODIFY */ /* * schema-defined QAPI types * * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * */ # 13 "//qemu-2.11+dfsg/include/block/block.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 1 /* * Hierarchical Bitmap Data Type * * Copyright Red Hat, Inc., 2012 * * Author: Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or * later. See the COPYING file in the top-level directory. */ # 14 "//qemu-2.11+dfsg/include/block/block.h" 2 /* block.c */ typedef struct BlockDriver BlockDriver; typedef struct BdrvChild BdrvChild; typedef struct BdrvChildRole BdrvChildRole; typedef struct BlockDriverInfo { /* in bytes, 0 if irrelevant */ int cluster_size; /* offset at which the VM state can be saved (0 if not possible) */ int64_t vm_state_offset; # 25 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 25 "//qemu-2.11+dfsg/include/block/block.h" is_dirty; /* * True if unallocated blocks read back as zeroes. This is equivalent * to the LBPRZ flag in the SCSI logical block provisioning page. */ # 30 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 30 "//qemu-2.11+dfsg/include/block/block.h" unallocated_blocks_are_zero; /* * True if the driver can optimize writing zeroes by unmapping * sectors. This is equivalent to the BLKDISCARDZEROES ioctl in Linux * with the difference that in qemu a discard is allowed to silently * fail. Therefore we have to use bdrv_pwrite_zeroes with the * BDRV_REQ_MAY_UNMAP flag for an optimized zero write with unmapping. * After this call the driver has to guarantee that the contents read * back as zero. It is additionally required that the block device is * opened with BDRV_O_UNMAP flag for this to work. */ # 41 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 41 "//qemu-2.11+dfsg/include/block/block.h" can_write_zeroes_with_unmap; /* * True if this block driver only supports compressed writes */ # 45 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 45 "//qemu-2.11+dfsg/include/block/block.h" needs_compressed_writes; } BlockDriverInfo; typedef struct BlockFragInfo { uint64_t allocated_clusters; uint64_t total_clusters; uint64_t fragmented_clusters; uint64_t compressed_clusters; } BlockFragInfo; typedef enum { BDRV_REQ_COPY_ON_READ = 0x1, BDRV_REQ_ZERO_WRITE = 0x2, /* The BDRV_REQ_MAY_UNMAP flag is used to indicate that the block driver * is allowed to optimize a write zeroes request by unmapping (discarding) * blocks if it is guaranteed that the result will read back as * zeroes. The flag is only passed to the driver if the block device is * opened with BDRV_O_UNMAP. */ BDRV_REQ_MAY_UNMAP = 0x4, BDRV_REQ_NO_SERIALISING = 0x8, BDRV_REQ_FUA = 0x10, BDRV_REQ_WRITE_COMPRESSED = 0x20, /* Mask of valid flags */ BDRV_REQ_MASK = 0x3f, } BdrvRequestFlags; typedef struct BlockSizes { uint32_t phys; uint32_t log; } BlockSizes; typedef struct HDGeometry { uint32_t heads; uint32_t sectors; uint32_t cylinders; } HDGeometry; # 105 "//qemu-2.11+dfsg/include/block/block.h" /* Option names of options parsed by the block layer */ # 123 "//qemu-2.11+dfsg/include/block/block.h" /* * Allocation status flags for bdrv_block_status() and friends. * * Public flags: * BDRV_BLOCK_DATA: allocation for data at offset is tied to this layer * BDRV_BLOCK_ZERO: offset reads as zero * BDRV_BLOCK_OFFSET_VALID: an associated offset exists for accessing raw data * BDRV_BLOCK_ALLOCATED: the content of the block is determined by this * layer (short for DATA || ZERO), set by block layer * BDRV_BLOCK_EOF: the returned pnum covers through end of file for this layer * * Internal flag: * BDRV_BLOCK_RAW: for use by passthrough drivers, such as raw, to request * that the block layer recompute the answer from the returned * BDS; must be accompanied by just BDRV_BLOCK_OFFSET_VALID. * * If BDRV_BLOCK_OFFSET_VALID is set, bits 9-62 (BDRV_BLOCK_OFFSET_MASK) of * the return value (old interface) or the entire map parameter (new * interface) represent the offset in the returned BDS that is allocated for * the corresponding raw data. However, whether that offset actually * contains data also depends on BDRV_BLOCK_DATA, as follows: * * DATA ZERO OFFSET_VALID * t t t sectors read as zero, returned file is zero at offset * t f t sectors read as valid from file at offset * f t t sectors preallocated, read as zero, returned file not * necessarily zero at offset * f f t sectors preallocated but read from backing_hd, * returned file contains garbage at offset * t t f sectors preallocated, read as zero, unknown offset * t f f sectors read from unknown file or offset * f t f not allocated or unknown offset, read as zero * f f f not allocated or unknown offset, read from backing_hd */ # 165 "//qemu-2.11+dfsg/include/block/block.h" typedef struct BlockReopenQueue { struct BlockReopenQueueEntry *sqh_first; /* first element */ struct BlockReopenQueueEntry **sqh_last; /* addr of last next element */ } BlockReopenQueue; typedef struct BDRVReopenState { BlockDriverState *bs; int flags; uint64_t perm, shared_perm; QDict *options; QDict *explicit_options; void *opaque; } BDRVReopenState; /* * Block operation types */ typedef enum BlockOpType { BLOCK_OP_TYPE_BACKUP_SOURCE, BLOCK_OP_TYPE_BACKUP_TARGET, BLOCK_OP_TYPE_CHANGE, BLOCK_OP_TYPE_COMMIT_SOURCE, BLOCK_OP_TYPE_COMMIT_TARGET, BLOCK_OP_TYPE_DATAPLANE, BLOCK_OP_TYPE_DRIVE_DEL, BLOCK_OP_TYPE_EJECT, BLOCK_OP_TYPE_EXTERNAL_SNAPSHOT, BLOCK_OP_TYPE_INTERNAL_SNAPSHOT, BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE, BLOCK_OP_TYPE_MIRROR_SOURCE, BLOCK_OP_TYPE_MIRROR_TARGET, BLOCK_OP_TYPE_RESIZE, BLOCK_OP_TYPE_STREAM, BLOCK_OP_TYPE_REPLACE, BLOCK_OP_TYPE_MAX, } BlockOpType; /* Block node permission constants */ enum { /** * A user that has the "permission" of consistent reads is guaranteed that * their view of the contents of the block device is complete and * self-consistent, representing the contents of a disk at a specific * point. * * For most block devices (including their backing files) this is true, but * the property cannot be maintained in a few situations like for * intermediate nodes of a commit block job. */ BLK_PERM_CONSISTENT_READ = 0x01, /** This permission is required to change the visible disk contents. */ BLK_PERM_WRITE = 0x02, /** * This permission (which is weaker than BLK_PERM_WRITE) is both enough and * required for writes to the block node when the caller promises that * the visible disk content doesn't change. */ BLK_PERM_WRITE_UNCHANGED = 0x04, /** This permission is required to change the size of a block node. */ BLK_PERM_RESIZE = 0x08, /** * This permission is required to change the node that this BdrvChild * points to. */ BLK_PERM_GRAPH_MOD = 0x10, BLK_PERM_ALL = 0x1f, }; char *bdrv_perm_names(uint64_t perm); /* disk I/O throttling */ void bdrv_init(void); void bdrv_init_with_whitelist(void); # 240 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 240 "//qemu-2.11+dfsg/include/block/block.h" bdrv_uses_whitelist(void); BlockDriver *bdrv_find_protocol(const char *filename, # 242 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 242 "//qemu-2.11+dfsg/include/block/block.h" allow_protocol_prefix, Error **errp); BlockDriver *bdrv_find_format(const char *format_name); int bdrv_create(BlockDriver *drv, const char* filename, QemuOpts *opts, Error **errp); int bdrv_create_file(const char *filename, QemuOpts *opts, Error **errp); BlockDriverState *bdrv_new(void); void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top, Error **errp); void bdrv_replace_node(BlockDriverState *from, BlockDriverState *to, Error **errp); int bdrv_parse_cache_mode(const char *mode, int *flags, # 254 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 254 "//qemu-2.11+dfsg/include/block/block.h" *writethrough); int bdrv_parse_discard_flags(const char *mode, int *flags); BdrvChild *bdrv_open_child(const char *filename, QDict *options, const char *bdref_key, BlockDriverState* parent, const BdrvChildRole *child_role, # 260 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 260 "//qemu-2.11+dfsg/include/block/block.h" allow_none, Error **errp); void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd, Error **errp); int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options, const char *bdref_key, Error **errp); BlockDriverState *bdrv_open(const char *filename, const char *reference, QDict *options, int flags, Error **errp); BlockDriverState *bdrv_new_open_driver(BlockDriver *drv, const char *node_name, int flags, Error **errp); BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue, BlockDriverState *bs, QDict *options, int flags); int bdrv_reopen_multiple(AioContext *ctx, BlockReopenQueue *bs_queue, Error **errp); int bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp); int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue, Error **errp); void bdrv_reopen_commit(BDRVReopenState *reopen_state); void bdrv_reopen_abort(BDRVReopenState *reopen_state); int bdrv_read(BdrvChild *child, int64_t sector_num, uint8_t *buf, int nb_sectors); int bdrv_write(BdrvChild *child, int64_t sector_num, const uint8_t *buf, int nb_sectors); int bdrv_pwrite_zeroes(BdrvChild *child, int64_t offset, int bytes, BdrvRequestFlags flags); int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags); int bdrv_pread(BdrvChild *child, int64_t offset, void *buf, int bytes); int bdrv_preadv(BdrvChild *child, int64_t offset, QEMUIOVector *qiov); int bdrv_pwrite(BdrvChild *child, int64_t offset, const void *buf, int bytes); int bdrv_pwritev(BdrvChild *child, int64_t offset, QEMUIOVector *qiov); int bdrv_pwrite_sync(BdrvChild *child, int64_t offset, const void *buf, int count); int bdrv_co_readv(BdrvChild *child, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); int bdrv_co_writev(BdrvChild *child, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); /* * Efficiently zero a region of the disk image. Note that this is a regular * I/O request like read or write and should have a reasonable size. This * function is not suitable for zeroing the entire image in a single request * because it may allocate memory for the entire region. */ int bdrv_co_pwrite_zeroes(BdrvChild *child, int64_t offset, int bytes, BdrvRequestFlags flags); BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs, const char *backing_file); void bdrv_refresh_filename(BlockDriverState *bs); int bdrv_truncate(BdrvChild *child, int64_t offset, PreallocMode prealloc, Error **errp); int64_t bdrv_nb_sectors(BlockDriverState *bs); int64_t bdrv_getlength(BlockDriverState *bs); int64_t bdrv_get_allocated_file_size(BlockDriverState *bs); BlockMeasureInfo *bdrv_measure(BlockDriver *drv, QemuOpts *opts, BlockDriverState *in_bs, Error **errp); void bdrv_get_geometry(BlockDriverState *bs, uint64_t *nb_sectors_ptr); void bdrv_refresh_limits(BlockDriverState *bs, Error **errp); int bdrv_commit(BlockDriverState *bs); int bdrv_change_backing_file(BlockDriverState *bs, const char *backing_file, const char *backing_fmt); void bdrv_register(BlockDriver *bdrv); int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base, const char *backing_file_str); BlockDriverState *bdrv_find_overlay(BlockDriverState *active, BlockDriverState *bs); BlockDriverState *bdrv_find_base(BlockDriverState *bs); typedef struct BdrvCheckResult { int corruptions; int leaks; int check_errors; int corruptions_fixed; int leaks_fixed; int64_t image_end_offset; BlockFragInfo bfi; } BdrvCheckResult; typedef enum { BDRV_FIX_LEAKS = 1, BDRV_FIX_ERRORS = 2, } BdrvCheckMode; int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix); /* The units of offset and total_work_size may be chosen arbitrarily by the * block driver; total_work_size may change during the course of the amendment * operation */ typedef void BlockDriverAmendStatusCB(BlockDriverState *bs, int64_t offset, int64_t total_work_size, void *opaque); int bdrv_amend_options(BlockDriverState *bs_new, QemuOpts *opts, BlockDriverAmendStatusCB *status_cb, void *cb_opaque); /* external snapshots */ # 352 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 352 "//qemu-2.11+dfsg/include/block/block.h" bdrv_recurse_is_first_non_filter(BlockDriverState *bs, BlockDriverState *candidate); # 354 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 354 "//qemu-2.11+dfsg/include/block/block.h" bdrv_is_first_non_filter(BlockDriverState *candidate); /* check if a named node can be replaced when doing drive-mirror */ BlockDriverState *check_to_replace_node(BlockDriverState *parent_bs, const char *node_name, Error **errp); /* async block I/O */ void bdrv_aio_cancel(BlockAIOCB *acb); void bdrv_aio_cancel_async(BlockAIOCB *acb); /* sg packet commands */ int bdrv_co_ioctl(BlockDriverState *bs, int req, void *buf); /* Invalidate any cached metadata used by image formats */ void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp); void bdrv_invalidate_cache_all(Error **errp); int bdrv_inactivate_all(void); /* Ensure contents are flushed to disk. */ int bdrv_flush(BlockDriverState *bs); int bdrv_co_flush(BlockDriverState *bs); int bdrv_flush_all(void); void bdrv_close_all(void); void bdrv_drain(BlockDriverState *bs); void bdrv_co_drain(BlockDriverState *bs); void bdrv_drain_all_begin(void); void bdrv_drain_all_end(void); void bdrv_drain_all(void); # 419 "//qemu-2.11+dfsg/include/block/block.h" int bdrv_pdiscard(BlockDriverState *bs, int64_t offset, int bytes); int bdrv_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes); int bdrv_has_zero_init_1(BlockDriverState *bs); int bdrv_has_zero_init(BlockDriverState *bs); # 423 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 423 "//qemu-2.11+dfsg/include/block/block.h" bdrv_unallocated_blocks_are_zero(BlockDriverState *bs); # 424 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 424 "//qemu-2.11+dfsg/include/block/block.h" bdrv_can_write_zeroes_with_unmap(BlockDriverState *bs); int bdrv_block_status(BlockDriverState *bs, int64_t offset, int64_t bytes, int64_t *pnum, int64_t *map, BlockDriverState **file); int bdrv_block_status_above(BlockDriverState *bs, BlockDriverState *base, int64_t offset, int64_t bytes, int64_t *pnum, int64_t *map, BlockDriverState **file); int bdrv_is_allocated(BlockDriverState *bs, int64_t offset, int64_t bytes, int64_t *pnum); int bdrv_is_allocated_above(BlockDriverState *top, BlockDriverState *base, int64_t offset, int64_t bytes, int64_t *pnum); # 436 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 436 "//qemu-2.11+dfsg/include/block/block.h" bdrv_is_read_only(BlockDriverState *bs); int bdrv_can_set_read_only(BlockDriverState *bs, # 437 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 437 "//qemu-2.11+dfsg/include/block/block.h" read_only, # 438 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 438 "//qemu-2.11+dfsg/include/block/block.h" ignore_allow_rdw, Error **errp); int bdrv_set_read_only(BlockDriverState *bs, # 439 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 439 "//qemu-2.11+dfsg/include/block/block.h" read_only, Error **errp); # 440 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 440 "//qemu-2.11+dfsg/include/block/block.h" bdrv_is_sg(BlockDriverState *bs); # 441 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 441 "//qemu-2.11+dfsg/include/block/block.h" bdrv_is_inserted(BlockDriverState *bs); void bdrv_lock_medium(BlockDriverState *bs, # 442 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 442 "//qemu-2.11+dfsg/include/block/block.h" locked); void bdrv_eject(BlockDriverState *bs, # 443 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 443 "//qemu-2.11+dfsg/include/block/block.h" eject_flag); const char *bdrv_get_format_name(BlockDriverState *bs); BlockDriverState *bdrv_find_node(const char *node_name); BlockDeviceInfoList *bdrv_named_nodes_list(Error **errp); BlockDriverState *bdrv_lookup_bs(const char *device, const char *node_name, Error **errp); # 450 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 450 "//qemu-2.11+dfsg/include/block/block.h" bdrv_chain_contains(BlockDriverState *top, BlockDriverState *base); BlockDriverState *bdrv_next_node(BlockDriverState *bs); typedef struct BdrvNextIterator { enum { BDRV_NEXT_BACKEND_ROOTS, BDRV_NEXT_MONITOR_OWNED, } phase; BlockBackend *blk; BlockDriverState *bs; } BdrvNextIterator; BlockDriverState *bdrv_first(BdrvNextIterator *it); BlockDriverState *bdrv_next(BdrvNextIterator *it); void bdrv_next_cleanup(BdrvNextIterator *it); BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs); # 467 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 467 "//qemu-2.11+dfsg/include/block/block.h" bdrv_is_encrypted(BlockDriverState *bs); void bdrv_iterate_format(void (*it)(void *opaque, const char *name), void *opaque); const char *bdrv_get_node_name(const BlockDriverState *bs); const char *bdrv_get_device_name(const BlockDriverState *bs); const char *bdrv_get_device_or_node_name(const BlockDriverState *bs); int bdrv_get_flags(BlockDriverState *bs); int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi); ImageInfoSpecific *bdrv_get_specific_info(BlockDriverState *bs); void bdrv_round_to_clusters(BlockDriverState *bs, int64_t offset, int64_t bytes, int64_t *cluster_offset, int64_t *cluster_bytes); const char *bdrv_get_encrypted_filename(BlockDriverState *bs); void bdrv_get_backing_filename(BlockDriverState *bs, char *filename, int filename_size); void bdrv_get_full_backing_filename(BlockDriverState *bs, char *dest, size_t sz, Error **errp); void bdrv_get_full_backing_filename_from_filename(const char *backed, const char *backing, char *dest, size_t sz, Error **errp); int path_has_protocol(const char *path); int path_is_absolute(const char *path); void path_combine(char *dest, int dest_size, const char *base_path, const char *filename); int bdrv_readv_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos); int bdrv_writev_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos); int bdrv_save_vmstate(BlockDriverState *bs, const uint8_t *buf, int64_t pos, int size); int bdrv_load_vmstate(BlockDriverState *bs, uint8_t *buf, int64_t pos, int size); void bdrv_img_create(const char *filename, const char *fmt, const char *base_filename, const char *base_fmt, char *options, uint64_t img_size, int flags, # 508 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 508 "//qemu-2.11+dfsg/include/block/block.h" quiet, Error **errp); /* Returns the alignment in bytes that is required so that no bounce buffer * is required throughout the stack */ size_t bdrv_min_mem_align(BlockDriverState *bs); /* Returns optimal alignment in bytes for bounce buffer */ size_t bdrv_opt_mem_align(BlockDriverState *bs); void *qemu_blockalign(BlockDriverState *bs, size_t size); void *qemu_blockalign0(BlockDriverState *bs, size_t size); void *qemu_try_blockalign(BlockDriverState *bs, size_t size); void *qemu_try_blockalign0(BlockDriverState *bs, size_t size); # 519 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 519 "//qemu-2.11+dfsg/include/block/block.h" bdrv_qiov_is_aligned(BlockDriverState *bs, QEMUIOVector *qiov); void bdrv_enable_copy_on_read(BlockDriverState *bs); void bdrv_disable_copy_on_read(BlockDriverState *bs); void bdrv_ref(BlockDriverState *bs); void bdrv_unref(BlockDriverState *bs); void bdrv_unref_child(BlockDriverState *parent, BdrvChild *child); BdrvChild *bdrv_attach_child(BlockDriverState *parent_bs, BlockDriverState *child_bs, const char *child_name, const BdrvChildRole *child_role, Error **errp); # 533 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 533 "//qemu-2.11+dfsg/include/block/block.h" bdrv_op_is_blocked(BlockDriverState *bs, BlockOpType op, Error **errp); void bdrv_op_block(BlockDriverState *bs, BlockOpType op, Error *reason); void bdrv_op_unblock(BlockDriverState *bs, BlockOpType op, Error *reason); void bdrv_op_block_all(BlockDriverState *bs, Error *reason); void bdrv_op_unblock_all(BlockDriverState *bs, Error *reason); # 538 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 538 "//qemu-2.11+dfsg/include/block/block.h" bdrv_op_blocker_is_empty(BlockDriverState *bs); # 547 "//qemu-2.11+dfsg/include/block/block.h" void bdrv_debug_event(BlockDriverState *bs, BlkdebugEvent event); int bdrv_debug_breakpoint(BlockDriverState *bs, const char *event, const char *tag); int bdrv_debug_remove_breakpoint(BlockDriverState *bs, const char *tag); int bdrv_debug_resume(BlockDriverState *bs, const char *tag); # 553 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 553 "//qemu-2.11+dfsg/include/block/block.h" bdrv_debug_is_suspended(BlockDriverState *bs, const char *tag); /** * bdrv_get_aio_context: * * Returns: the currently bound #AioContext */ AioContext *bdrv_get_aio_context(BlockDriverState *bs); /** * Transfer control to @co in the aio context of @bs */ void bdrv_coroutine_enter(BlockDriverState *bs, Coroutine *co); /** * bdrv_set_aio_context: * * Changes the #AioContext used for fd handlers, timers, and BHs by this * BlockDriverState and all its children. * * This function must be called with iothread lock held. */ void bdrv_set_aio_context(BlockDriverState *bs, AioContext *new_context); int bdrv_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz); int bdrv_probe_geometry(BlockDriverState *bs, HDGeometry *geo); void bdrv_io_plug(BlockDriverState *bs); void bdrv_io_unplug(BlockDriverState *bs); /** * bdrv_parent_drained_begin: * * Begin a quiesced section of all users of @bs. This is part of * bdrv_drained_begin. */ void bdrv_parent_drained_begin(BlockDriverState *bs); /** * bdrv_parent_drained_end: * * End a quiesced section of all users of @bs. This is part of * bdrv_drained_end. */ void bdrv_parent_drained_end(BlockDriverState *bs); /** * bdrv_drained_begin: * * Begin a quiesced section for exclusive access to the BDS, by disabling * external request sources including NBD server and device model. Note that * this doesn't block timers or coroutines from submitting more requests, which * means block_job_pause is still necessary. * * This function can be recursive. */ void bdrv_drained_begin(BlockDriverState *bs); /** * bdrv_drained_end: * * End a quiescent section started by bdrv_drained_begin(). */ void bdrv_drained_end(BlockDriverState *bs); void bdrv_add_child(BlockDriverState *parent, BlockDriverState *child, Error **errp); void bdrv_del_child(BlockDriverState *parent, BdrvChild *child, Error **errp); # 621 "//qemu-2.11+dfsg/include/block/block.h" 3 4 _Bool # 621 "//qemu-2.11+dfsg/include/block/block.h" bdrv_can_store_new_dirty_bitmap(BlockDriverState *bs, const char *name, uint32_t granularity, Error **errp); # 29 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/option.h" 1 /* * Commandline option parsing functions * * Copyright (c) 2003-2008 Fabrice Bellard * Copyright (c) 2009 Kevin Wolf * * 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. */ # 30 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ # 31 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/coroutine.h" 1 /* * QEMU coroutine implementation * * Copyright IBM, Corp. 2011 * * Authors: * Stefan Hajnoczi * Kevin Wolf * * This work is licensed under the terms of the GNU LGPL, version 2 or later. * See the COPYING.LIB file in the top-level directory. * */ # 32 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/stats64.h" 1 /* * Atomic operations on 64-bit quantities. * * Copyright (C) 2017 Red Hat, Inc. * * Author: Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qemu/atomic.h" 1 /* * Simple interface for atomic operations. * * Copyright (C) 2013 Red Hat, Inc. * * Author: Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * * See docs/devel/atomics.txt for discussion about the guarantees each * atomic primitive is meant to provide. */ # 16 "//qemu-2.11+dfsg/include/qemu/stats64.h" 2 /* This provides atomic operations on 64-bit type, using a reader-writer * spinlock on architectures that do not have 64-bit accesses. Even on * those architectures, it tries hard not to take the lock. */ typedef struct Stat64 { uint64_t value; } Stat64; static inline void stat64_init(Stat64 *s, uint64_t value) { /* This is not guaranteed to be atomic! */ *s = (Stat64) { value }; } static inline uint64_t stat64_get(const Stat64 *s) { return __atomic_load_n(&s->value, 0); } static inline void stat64_add(Stat64 *s, uint64_t value) { ((void) __atomic_fetch_add(&s->value, value, 5)); } static inline void stat64_min(Stat64 *s, uint64_t value) { uint64_t orig = __atomic_load_n(&s->value, 0); while (orig > value) { orig = ({ typeof( __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" ) || __builtin_types_compatible_p(typeof(*&s->value), const # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" ) || __builtin_types_compatible_p(typeof(*&s->value), volatile # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" ) || __builtin_types_compatible_p(typeof(*&s->value), const volatile # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" ), ( # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" )1, __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), signed char) || __builtin_types_compatible_p(typeof(*&s->value), const signed char) || __builtin_types_compatible_p(typeof(*&s->value), volatile signed char) || __builtin_types_compatible_p(typeof(*&s->value), const volatile signed char), (signed char)1, __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), unsigned char) || __builtin_types_compatible_p(typeof(*&s->value), const unsigned char) || __builtin_types_compatible_p(typeof(*&s->value), volatile unsigned char) || __builtin_types_compatible_p(typeof(*&s->value), const volatile unsigned char), (unsigned char)1, __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), signed short) || __builtin_types_compatible_p(typeof(*&s->value), const signed short) || __builtin_types_compatible_p(typeof(*&s->value), volatile signed short) || __builtin_types_compatible_p(typeof(*&s->value), const volatile signed short), (signed short)1, __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), unsigned short) || __builtin_types_compatible_p(typeof(*&s->value), const unsigned short) || __builtin_types_compatible_p(typeof(*&s->value), volatile unsigned short) || __builtin_types_compatible_p(typeof(*&s->value), const volatile unsigned short), (unsigned short)1, (*&s->value)+0)))))) _old = (orig); __atomic_compare_exchange_n(&s->value, &_old, value, # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 0 # 52 "//qemu-2.11+dfsg/include/qemu/stats64.h" , 5, 5); _old; }); } } static inline void stat64_max(Stat64 *s, uint64_t value) { uint64_t orig = __atomic_load_n(&s->value, 0); while (orig < value) { orig = ({ typeof( __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" ) || __builtin_types_compatible_p(typeof(*&s->value), const # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" ) || __builtin_types_compatible_p(typeof(*&s->value), volatile # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" ) || __builtin_types_compatible_p(typeof(*&s->value), const volatile # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" ), ( # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 _Bool # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" )1, __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), signed char) || __builtin_types_compatible_p(typeof(*&s->value), const signed char) || __builtin_types_compatible_p(typeof(*&s->value), volatile signed char) || __builtin_types_compatible_p(typeof(*&s->value), const volatile signed char), (signed char)1, __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), unsigned char) || __builtin_types_compatible_p(typeof(*&s->value), const unsigned char) || __builtin_types_compatible_p(typeof(*&s->value), volatile unsigned char) || __builtin_types_compatible_p(typeof(*&s->value), const volatile unsigned char), (unsigned char)1, __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), signed short) || __builtin_types_compatible_p(typeof(*&s->value), const signed short) || __builtin_types_compatible_p(typeof(*&s->value), volatile signed short) || __builtin_types_compatible_p(typeof(*&s->value), const volatile signed short), (signed short)1, __builtin_choose_expr( __builtin_types_compatible_p(typeof(*&s->value), unsigned short) || __builtin_types_compatible_p(typeof(*&s->value), const unsigned short) || __builtin_types_compatible_p(typeof(*&s->value), volatile unsigned short) || __builtin_types_compatible_p(typeof(*&s->value), const volatile unsigned short), (unsigned short)1, (*&s->value)+0)))))) _old = (orig); __atomic_compare_exchange_n(&s->value, &_old, value, # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" 3 4 0 # 60 "//qemu-2.11+dfsg/include/qemu/stats64.h" , 5, 5); _old; }); } } # 33 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "./qapi-types.h" 1 /* AUTOMATICALLY GENERATED, DO NOT MODIFY */ /* * schema-defined QAPI types * * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * */ # 35 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/hbitmap.h" 1 /* * Hierarchical Bitmap Data Type * * Copyright Red Hat, Inc., 2012 * * Author: Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2 or * later. See the COPYING file in the top-level directory. */ # 36 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "//qemu-2.11+dfsg/include/block/snapshot.h" 1 /* * Block layer snapshot related functions * * Copyright (c) 2003-2008 Fabrice Bellard * * 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. */ # 1 "//qemu-2.11+dfsg/include/qemu-common.h" 1 /* Common header file that is included by all of QEMU. * * This file is supposed to be included only by .c files. No header file should * depend on qemu-common.h, as this would easily lead to circular header * dependencies. * * If a header file uses a definition from qemu-common.h, that definition * must be moved to a separate header file, and the header that uses it * must include that header. */ # 29 "//qemu-2.11+dfsg/include/block/snapshot.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/option.h" 1 /* * Commandline option parsing functions * * Copyright (c) 2003-2008 Fabrice Bellard * Copyright (c) 2009 Kevin Wolf * * 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. */ # 30 "//qemu-2.11+dfsg/include/block/snapshot.h" 2 extern QemuOptsList internal_snapshot_opts; typedef struct QEMUSnapshotInfo { char id_str[128]; /* unique snapshot id */ /* the following fields are informative. They are not needed for the consistency of the snapshot */ char name[256]; /* user chosen name */ uint64_t vm_state_size; /* VM state info size */ uint32_t date_sec; /* UTC date of the snapshot */ uint32_t date_nsec; uint64_t vm_clock_nsec; /* VM clock relative to boot */ } QEMUSnapshotInfo; int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info, const char *name); # 51 "//qemu-2.11+dfsg/include/block/snapshot.h" 3 4 _Bool # 51 "//qemu-2.11+dfsg/include/block/snapshot.h" bdrv_snapshot_find_by_id_and_name(BlockDriverState *bs, const char *id, const char *name, QEMUSnapshotInfo *sn_info, Error **errp); int bdrv_can_snapshot(BlockDriverState *bs); int bdrv_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info); int bdrv_snapshot_goto(BlockDriverState *bs, const char *snapshot_id, Error **errp); int bdrv_snapshot_delete(BlockDriverState *bs, const char *snapshot_id, const char *name, Error **errp); int bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs, const char *id_or_name, Error **errp); int bdrv_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_info); int bdrv_snapshot_load_tmp(BlockDriverState *bs, const char *snapshot_id, const char *name, Error **errp); int bdrv_snapshot_load_tmp_by_id_or_name(BlockDriverState *bs, const char *id_or_name, Error **errp); /* Group operations. All block drivers are involved. * These functions will properly handle dataplane (take aio_context_acquire * when appropriate for appropriate block drivers */ # 84 "//qemu-2.11+dfsg/include/block/snapshot.h" 3 4 _Bool # 84 "//qemu-2.11+dfsg/include/block/snapshot.h" bdrv_all_can_snapshot(BlockDriverState **first_bad_bs); int bdrv_all_delete_snapshot(const char *name, BlockDriverState **first_bsd_bs, Error **err); int bdrv_all_goto_snapshot(const char *name, BlockDriverState **first_bad_bs, Error **errp); int bdrv_all_find_snapshot(const char *name, BlockDriverState **first_bad_bs); int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn, BlockDriverState *vm_state_bs, uint64_t vm_state_size, BlockDriverState **first_bad_bs); BlockDriverState *bdrv_all_find_vmstate_bs(void); # 37 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/main-loop.h" 1 /* * QEMU System Emulator * * Copyright (c) 2003-2008 Fabrice Bellard * * 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. */ # 1 "//qemu-2.11+dfsg/include/block/aio.h" 1 /* * QEMU aio implementation * * Copyright IBM, Corp. 2008 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * */ # 29 "//qemu-2.11+dfsg/include/qemu/main-loop.h" 2 /** * qemu_init_main_loop: Set up the process so that it can run the main loop. * * This includes setting up signal handlers. It should be called before * any other threads are created. In addition, threads other than the * main one should block signals that are trapped by the main loop. * For simplicity, you can consider these signals to be safe: SIGUSR1, * SIGUSR2, thread signals (SIGFPE, SIGILL, SIGSEGV, SIGBUS) and real-time * signals if available. Remember that Windows in practice does not have * signals, though. * * In the case of QEMU tools, this will also start/initialize timers. */ int qemu_init_main_loop(Error **errp); /** * main_loop_wait: Run one iteration of the main loop. * * If @nonblocking is true, poll for events, otherwise suspend until * one actually occurs. The main loop usually consists of a loop that * repeatedly calls main_loop_wait(false). * * Main loop services include file descriptor callbacks, bottom halves * and timers (defined in qemu-timer.h). Bottom halves are similar to timers * that execute immediately, but have a lower overhead and scheduling them * is wait-free, thread-safe and signal-safe. * * It is sometimes useful to put a whole program in a coroutine. In this * case, the coroutine actually should be started from within the main loop, * so that the main loop can run whenever the coroutine yields. To do this, * you can use a bottom half to enter the coroutine as soon as the main loop * starts: * * void enter_co_bh(void *opaque) { * QEMUCoroutine *co = opaque; * qemu_coroutine_enter(co); * } * * ... * QEMUCoroutine *co = qemu_coroutine_create(coroutine_entry, NULL); * QEMUBH *start_bh = qemu_bh_new(enter_co_bh, co); * qemu_bh_schedule(start_bh); * while (...) { * main_loop_wait(false); * } * * (In the future we may provide a wrapper for this). * * @nonblocking: Whether the caller should block until an event occurs. */ void main_loop_wait(int nonblocking); /** * qemu_get_aio_context: Return the main loop's AioContext */ AioContext *qemu_get_aio_context(void); /** * qemu_notify_event: Force processing of pending events. * * Similar to signaling a condition variable, qemu_notify_event forces * main_loop_wait to look at pending events and exit. The caller of * main_loop_wait will usually call it again very soon, so qemu_notify_event * also has the side effect of recalculating the sets of file descriptors * that the main loop waits for. * * Calling qemu_notify_event is rarely necessary, because main loop * services (bottom halves and timers) call it themselves. */ void qemu_notify_event(void); # 168 "//qemu-2.11+dfsg/include/qemu/main-loop.h" /* async I/O support */ typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size); typedef int IOCanReadHandler(void *opaque); /** * qemu_set_fd_handler: Register a file descriptor with the main loop * * This function tells the main loop to wake up whenever one of the * following conditions is true: * * 1) if @fd_write is not %NULL, when the file descriptor is writable; * * 2) if @fd_read is not %NULL, when the file descriptor is readable. * * The callbacks that are set up by qemu_set_fd_handler are level-triggered. * If @fd_read does not read from @fd, or @fd_write does not write to @fd * until its buffers are full, they will be called again on the next * iteration. * * @fd: The file descriptor to be observed. Under Windows it must be * a #SOCKET. * * @fd_read: A level-triggered callback that is fired if @fd is readable * at the beginning of a main loop iteration, or if it becomes readable * during one. * * @fd_write: A level-triggered callback that is fired when @fd is writable * at the beginning of a main loop iteration, or if it becomes writable * during one. * * @opaque: A pointer-sized value that is passed to @fd_read and @fd_write. */ void qemu_set_fd_handler(int fd, IOHandler *fd_read, IOHandler *fd_write, void *opaque); /** * event_notifier_set_handler: Register an EventNotifier with the main loop * * This function tells the main loop to wake up whenever the * #EventNotifier was set. * * @e: The #EventNotifier to be observed. * * @handler: A level-triggered callback that is fired when @e * has been set. @e is passed to it as a parameter. */ void event_notifier_set_handler(EventNotifier *e, EventNotifierHandler *handler); GSource *iohandler_get_g_source(void); AioContext *iohandler_get_aio_context(void); /** * qemu_add_child_watch: Register a child process for reaping. * * Under POSIX systems, a parent process must read the exit status of * its child processes using waitpid, or the operating system will not * free some of the resources attached to that process. * * This function directs the QEMU main loop to observe a child process * and call waitpid as soon as it exits; the watch is then removed * automatically. It is useful whenever QEMU forks a child process * but will find out about its termination by other means such as a * "broken pipe". * * @pid: The pid that QEMU should observe. */ int qemu_add_child_watch(pid_t pid); /** * qemu_mutex_iothread_locked: Return lock status of the main loop mutex. * * The main loop mutex is the coarsest lock in QEMU, and as such it * must always be taken outside other locks. This function helps * functions take different paths depending on whether the current * thread is running within the main loop mutex. */ # 250 "//qemu-2.11+dfsg/include/qemu/main-loop.h" 3 4 _Bool # 250 "//qemu-2.11+dfsg/include/qemu/main-loop.h" qemu_mutex_iothread_locked(void); /** * qemu_mutex_lock_iothread: Lock the main loop mutex. * * This function locks the main loop mutex. The mutex is taken by * main() in vl.c and always taken except while waiting on * external events (such as with select). The mutex should be taken * by threads other than the main loop thread when calling * qemu_bh_new(), qemu_set_fd_handler() and basically all other * functions documented in this file. * * NOTE: tools currently are single-threaded and qemu_mutex_lock_iothread * is a no-op there. */ void qemu_mutex_lock_iothread(void); /** * qemu_mutex_unlock_iothread: Unlock the main loop mutex. * * This function unlocks the main loop mutex. The mutex is taken by * main() in vl.c and always taken except while waiting on * external events (such as with select). The mutex should be unlocked * as soon as possible by threads other than the main loop thread, * because it prevents the main loop from processing callbacks, * including timers and bottom halves. * * NOTE: tools currently are single-threaded and qemu_mutex_unlock_iothread * is a no-op there. */ void qemu_mutex_unlock_iothread(void); /* internal interfaces */ void qemu_fd_register(int fd); QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque); void qemu_bh_schedule_idle(QEMUBH *bh); # 38 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/throttle.h" 1 /* * QEMU throttling infrastructure * * Copyright (C) Nodalink, EURL. 2013-2014 * Copyright (C) Igalia, S.L. 2015-2016 * * Authors: * Benoît Canet * Alberto Garcia * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) version 3 of the License. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ # 1 "//qemu-2.11+dfsg/include/qemu-common.h" 1 /* Common header file that is included by all of QEMU. * * This file is supposed to be included only by .c files. No header file should * depend on qemu-common.h, as this would easily lead to circular header * dependencies. * * If a header file uses a definition from qemu-common.h, that definition * must be moved to a separate header file, and the header that uses it * must include that header. */ # 29 "//qemu-2.11+dfsg/include/qemu/throttle.h" 2 typedef enum { THROTTLE_BPS_TOTAL, THROTTLE_BPS_READ, THROTTLE_BPS_WRITE, THROTTLE_OPS_TOTAL, THROTTLE_OPS_READ, THROTTLE_OPS_WRITE, BUCKETS_COUNT, } BucketType; /* * This module implements I/O limits using the leaky bucket * algorithm. The code is independent of the I/O units, but it is * currently used for bytes per second and operations per second. * * Three parameters can be set by the user: * * - avg: the desired I/O limits in units per second. * - max: the limit during bursts, also in units per second. * - burst_length: the maximum length of the burst period, in seconds. * * Here's how it works: * * - The bucket level (number of performed I/O units) is kept in * bkt.level and leaks at a rate of bkt.avg units per second. * * - The size of the bucket is bkt.max * bkt.burst_length. Once the * bucket is full no more I/O is performed until the bucket leaks * again. This is what makes the I/O rate bkt.avg. * * - The bkt.avg rate does not apply until the bucket is full, * allowing the user to do bursts until then. The I/O limit during * bursts is bkt.max. To enforce this limit we keep an additional * bucket in bkt.burst_level that leaks at a rate of bkt.max units * per second. * * - Because of all of the above, the user can perform I/O at a * maximum of bkt.max units per second for at most bkt.burst_length * seconds in a row. After that the bucket will be full and the I/O * rate will go down to bkt.avg. * * - Since the bucket always leaks at a rate of bkt.avg, this also * determines how much the user needs to wait before being able to * do bursts again. */ typedef struct LeakyBucket { uint64_t avg; /* average goal in units per second */ uint64_t max; /* leaky bucket max burst in units */ double level; /* bucket level in units */ double burst_level; /* bucket level in units (for computing bursts) */ uint64_t burst_length; /* max length of the burst period, in seconds */ } LeakyBucket; /* The following structure is used to configure a ThrottleState * It contains a bit of state: the bucket field of the LeakyBucket structure. * However it allows to keep the code clean and the bucket field is reset to * zero at the right time. */ typedef struct ThrottleConfig { LeakyBucket buckets[BUCKETS_COUNT]; /* leaky buckets */ uint64_t op_size; /* size of an operation in bytes */ } ThrottleConfig; typedef struct ThrottleState { ThrottleConfig cfg; /* configuration */ int64_t previous_leak; /* timestamp of the last leak done */ } ThrottleState; typedef struct ThrottleTimers { QEMUTimer *timers[2]; /* timers used to do the throttling */ QEMUClockType clock_type; /* the clock used */ /* Callbacks */ QEMUTimerCB *read_timer_cb; QEMUTimerCB *write_timer_cb; void *timer_opaque; } ThrottleTimers; /* operations on single leaky buckets */ void throttle_leak_bucket(LeakyBucket *bkt, int64_t delta); int64_t throttle_compute_wait(LeakyBucket *bkt); /* init/destroy cycle */ void throttle_init(ThrottleState *ts); void throttle_timers_init(ThrottleTimers *tt, AioContext *aio_context, QEMUClockType clock_type, QEMUTimerCB *read_timer_cb, QEMUTimerCB *write_timer_cb, void *timer_opaque); void throttle_timers_destroy(ThrottleTimers *tt); void throttle_timers_detach_aio_context(ThrottleTimers *tt); void throttle_timers_attach_aio_context(ThrottleTimers *tt, AioContext *new_context); # 134 "//qemu-2.11+dfsg/include/qemu/throttle.h" 3 4 _Bool # 134 "//qemu-2.11+dfsg/include/qemu/throttle.h" throttle_timers_are_initialized(ThrottleTimers *tt); /* configuration */ # 137 "//qemu-2.11+dfsg/include/qemu/throttle.h" 3 4 _Bool # 137 "//qemu-2.11+dfsg/include/qemu/throttle.h" throttle_enabled(ThrottleConfig *cfg); # 139 "//qemu-2.11+dfsg/include/qemu/throttle.h" 3 4 _Bool # 139 "//qemu-2.11+dfsg/include/qemu/throttle.h" throttle_is_valid(ThrottleConfig *cfg, Error **errp); void throttle_config(ThrottleState *ts, QEMUClockType clock_type, ThrottleConfig *cfg); void throttle_get_config(ThrottleState *ts, ThrottleConfig *cfg); void throttle_config_init(ThrottleConfig *cfg); /* usage */ # 150 "//qemu-2.11+dfsg/include/qemu/throttle.h" 3 4 _Bool # 150 "//qemu-2.11+dfsg/include/qemu/throttle.h" throttle_schedule_timer(ThrottleState *ts, ThrottleTimers *tt, # 152 "//qemu-2.11+dfsg/include/qemu/throttle.h" 3 4 _Bool # 152 "//qemu-2.11+dfsg/include/qemu/throttle.h" is_write); void throttle_account(ThrottleState *ts, # 154 "//qemu-2.11+dfsg/include/qemu/throttle.h" 3 4 _Bool # 154 "//qemu-2.11+dfsg/include/qemu/throttle.h" is_write, uint64_t size); void throttle_limits_to_config(ThrottleLimits *arg, ThrottleConfig *cfg, Error **errp); void throttle_config_to_limits(ThrottleConfig *cfg, ThrottleLimits *var); # 39 "//qemu-2.11+dfsg/include/block/block_int.h" 2 # 63 "//qemu-2.11+dfsg/include/block/block_int.h" enum BdrvTrackedRequestType { BDRV_TRACKED_READ, BDRV_TRACKED_WRITE, BDRV_TRACKED_DISCARD, }; typedef struct BdrvTrackedRequest { BlockDriverState *bs; int64_t offset; unsigned int bytes; enum BdrvTrackedRequestType type; # 75 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 75 "//qemu-2.11+dfsg/include/block/block_int.h" serialising; int64_t overlap_offset; unsigned int overlap_bytes; struct { struct BdrvTrackedRequest *le_next; /* next element */ struct BdrvTrackedRequest **le_prev; /* address of previous next element */ } list; Coroutine *co; /* owner, used for deadlock detection */ CoQueue wait_queue; /* coroutines blocked on this request */ struct BdrvTrackedRequest *waiting_for; } BdrvTrackedRequest; struct BlockDriver { const char *format_name; int instance_size; /* set to true if the BlockDriver is a block filter. Block filters pass * certain callbacks that refer to data (see block.c) to their bs->file if * the driver doesn't implement them. Drivers that do not wish to forward * must implement them and return -ENOTSUP. */ # 95 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 95 "//qemu-2.11+dfsg/include/block/block_int.h" is_filter; /* for snapshots block filter like Quorum can implement the * following recursive callback. * It's purpose is to recurse on the filter children while calling * bdrv_recurse_is_first_non_filter on them. * For a sample implementation look in the future Quorum block filter. */ # 102 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 102 "//qemu-2.11+dfsg/include/block/block_int.h" (*bdrv_recurse_is_first_non_filter)(BlockDriverState *bs, BlockDriverState *candidate); int (*bdrv_probe)(const uint8_t *buf, int buf_size, const char *filename); int (*bdrv_probe_device)(const char *filename); /* Any driver implementing this callback is expected to be able to handle * NULL file names in its .bdrv_open() implementation */ void (*bdrv_parse_filename)(const char *filename, QDict *options, Error **errp); /* Drivers not implementing bdrv_parse_filename nor bdrv_open should have * this field set to true, except ones that are defined only by their * child's bs. * An example of the last type will be the quorum block driver. */ # 116 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 116 "//qemu-2.11+dfsg/include/block/block_int.h" bdrv_needs_filename; /* Set if a driver can support backing files */ # 119 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 119 "//qemu-2.11+dfsg/include/block/block_int.h" supports_backing; /* For handling image reopen for split or non-split files */ int (*bdrv_reopen_prepare)(BDRVReopenState *reopen_state, BlockReopenQueue *queue, Error **errp); void (*bdrv_reopen_commit)(BDRVReopenState *reopen_state); void (*bdrv_reopen_abort)(BDRVReopenState *reopen_state); void (*bdrv_join_options)(QDict *options, QDict *old_options); int (*bdrv_open)(BlockDriverState *bs, QDict *options, int flags, Error **errp); int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags, Error **errp); void (*bdrv_close)(BlockDriverState *bs); int (*bdrv_create)(const char *filename, QemuOpts *opts, Error **errp); int (*bdrv_make_empty)(BlockDriverState *bs); void (*bdrv_refresh_filename)(BlockDriverState *bs, QDict *options); /* aio */ BlockAIOCB *(*bdrv_aio_readv)(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque); BlockAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque); BlockAIOCB *(*bdrv_aio_flush)(BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque); BlockAIOCB *(*bdrv_aio_pdiscard)(BlockDriverState *bs, int64_t offset, int bytes, BlockCompletionFunc *cb, void *opaque); int (*bdrv_co_readv)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); /** * @offset: position in bytes to read at * @bytes: number of bytes to read * @qiov: the buffers to fill with read data * @flags: currently unused, always 0 * * @offset and @bytes will be a multiple of 'request_alignment', * but the length of individual @qiov elements does not have to * be a multiple. * * @bytes will always equal the total size of @qiov, and will be * no larger than 'max_transfer'. * * The buffer in @qiov may point directly to guest memory. */ int (*bdrv_co_preadv)(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags); int (*bdrv_co_writev)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); int (*bdrv_co_writev_flags)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov, int flags); /** * @offset: position in bytes to write at * @bytes: number of bytes to write * @qiov: the buffers containing data to write * @flags: zero or more bits allowed by 'supported_write_flags' * * @offset and @bytes will be a multiple of 'request_alignment', * but the length of individual @qiov elements does not have to * be a multiple. * * @bytes will always equal the total size of @qiov, and will be * no larger than 'max_transfer'. * * The buffer in @qiov may point directly to guest memory. */ int (*bdrv_co_pwritev)(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags); /* * Efficiently zero a region of the disk image. Typically an image format * would use a compact metadata representation to implement this. This * function pointer may be NULL or return -ENOSUP and .bdrv_co_writev() * will be called instead. */ int (*bdrv_co_pwrite_zeroes)(BlockDriverState *bs, int64_t offset, int bytes, BdrvRequestFlags flags); int (*bdrv_co_pdiscard)(BlockDriverState *bs, int64_t offset, int bytes); /* * Building block for bdrv_block_status[_above] and * bdrv_is_allocated[_above]. The driver should answer only * according to the current layer, and should not set * BDRV_BLOCK_ALLOCATED, but may set BDRV_BLOCK_RAW. See block.h * for the meaning of _DATA, _ZERO, and _OFFSET_VALID. The block * layer guarantees input aligned to request_alignment, as well as * non-NULL pnum and file. */ int64_t (*bdrv_co_get_block_status)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file); /* * Invalidate any cached meta-data. */ void (*bdrv_invalidate_cache)(BlockDriverState *bs, Error **errp); int (*bdrv_inactivate)(BlockDriverState *bs); /* * Flushes all data for all layers by calling bdrv_co_flush for underlying * layers, if needed. This function is needed for deterministic * synchronization of the flush finishing callback. */ int (*bdrv_co_flush)(BlockDriverState *bs); /* * Flushes all data that was already written to the OS all the way down to * the disk (for example file-posix.c calls fsync()). */ int (*bdrv_co_flush_to_disk)(BlockDriverState *bs); /* * Flushes all internal caches to the OS. The data may still sit in a * writeback cache of the host OS, but it will survive a crash of the qemu * process. */ int (*bdrv_co_flush_to_os)(BlockDriverState *bs); const char *protocol_name; int (*bdrv_truncate)(BlockDriverState *bs, int64_t offset, PreallocMode prealloc, Error **errp); int64_t (*bdrv_getlength)(BlockDriverState *bs); # 248 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 248 "//qemu-2.11+dfsg/include/block/block_int.h" has_variable_length; int64_t (*bdrv_get_allocated_file_size)(BlockDriverState *bs); BlockMeasureInfo *(*bdrv_measure)(QemuOpts *opts, BlockDriverState *in_bs, Error **errp); int (*bdrv_co_pwritev_compressed)(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov); int (*bdrv_snapshot_create)(BlockDriverState *bs, QEMUSnapshotInfo *sn_info); int (*bdrv_snapshot_goto)(BlockDriverState *bs, const char *snapshot_id); int (*bdrv_snapshot_delete)(BlockDriverState *bs, const char *snapshot_id, const char *name, Error **errp); int (*bdrv_snapshot_list)(BlockDriverState *bs, QEMUSnapshotInfo **psn_info); int (*bdrv_snapshot_load_tmp)(BlockDriverState *bs, const char *snapshot_id, const char *name, Error **errp); int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi); ImageInfoSpecific *(*bdrv_get_specific_info)(BlockDriverState *bs); int (*bdrv_save_vmstate)(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos); int (*bdrv_load_vmstate)(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos); int (*bdrv_change_backing_file)(BlockDriverState *bs, const char *backing_file, const char *backing_fmt); /* removable device specific */ # 284 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 284 "//qemu-2.11+dfsg/include/block/block_int.h" (*bdrv_is_inserted)(BlockDriverState *bs); void (*bdrv_eject)(BlockDriverState *bs, # 285 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 285 "//qemu-2.11+dfsg/include/block/block_int.h" eject_flag); void (*bdrv_lock_medium)(BlockDriverState *bs, # 286 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 286 "//qemu-2.11+dfsg/include/block/block_int.h" locked); /* to control generic scsi devices */ BlockAIOCB *(*bdrv_aio_ioctl)(BlockDriverState *bs, unsigned long int req, void *buf, BlockCompletionFunc *cb, void *opaque); int (*bdrv_co_ioctl)(BlockDriverState *bs, unsigned long int req, void *buf); /* List of options for creating images, terminated by name == NULL */ QemuOptsList *create_opts; /* * Returns 0 for completed check, -errno for internal errors. * The check results are stored in result. */ int (*bdrv_check)(BlockDriverState *bs, BdrvCheckResult *result, BdrvCheckMode fix); int (*bdrv_amend_options)(BlockDriverState *bs, QemuOpts *opts, BlockDriverAmendStatusCB *status_cb, void *cb_opaque); void (*bdrv_debug_event)(BlockDriverState *bs, BlkdebugEvent event); /* TODO Better pass a option string/QDict/QemuOpts to add any rule? */ int (*bdrv_debug_breakpoint)(BlockDriverState *bs, const char *event, const char *tag); int (*bdrv_debug_remove_breakpoint)(BlockDriverState *bs, const char *tag); int (*bdrv_debug_resume)(BlockDriverState *bs, const char *tag); # 317 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 317 "//qemu-2.11+dfsg/include/block/block_int.h" (*bdrv_debug_is_suspended)(BlockDriverState *bs, const char *tag); void (*bdrv_refresh_limits)(BlockDriverState *bs, Error **errp); /* * Returns 1 if newly created images are guaranteed to contain only * zeros, 0 otherwise. */ int (*bdrv_has_zero_init)(BlockDriverState *bs); /* Remove fd handlers, timers, and other event loop callbacks so the event * loop is no longer in use. Called with no in-flight requests and in * depth-first traversal order with parents before child nodes. */ void (*bdrv_detach_aio_context)(BlockDriverState *bs); /* Add fd handlers, timers, and other event loop callbacks so I/O requests * can be processed again. Called with no in-flight requests and in * depth-first traversal order with child nodes before parent nodes. */ void (*bdrv_attach_aio_context)(BlockDriverState *bs, AioContext *new_context); /* io queue for linux-aio */ void (*bdrv_io_plug)(BlockDriverState *bs); void (*bdrv_io_unplug)(BlockDriverState *bs); /** * Try to get @bs's logical and physical block size. * On success, store them in @bsz and return zero. * On failure, return negative errno. */ int (*bdrv_probe_blocksizes)(BlockDriverState *bs, BlockSizes *bsz); /** * Try to get @bs's geometry (cyls, heads, sectors) * On success, store them in @geo and return 0. * On failure return -errno. * Only drivers that want to override guest geometry implement this * callback; see hd_geometry_guess(). */ int (*bdrv_probe_geometry)(BlockDriverState *bs, HDGeometry *geo); /** * bdrv_co_drain_begin is called if implemented in the beginning of a * drain operation to drain and stop any internal sources of requests in * the driver. * bdrv_co_drain_end is called if implemented at the end of the drain. * * They should be used by the driver to e.g. manage scheduled I/O * requests, or toggle an internal state. After the end of the drain new * requests will continue normally. */ void (*bdrv_co_drain_begin)(BlockDriverState *bs); void (*bdrv_co_drain_end)(BlockDriverState *bs); void (*bdrv_add_child)(BlockDriverState *parent, BlockDriverState *child, Error **errp); void (*bdrv_del_child)(BlockDriverState *parent, BdrvChild *child, Error **errp); /** * Informs the block driver that a permission change is intended. The * driver checks whether the change is permissible and may take other * preparations for the change (e.g. get file system locks). This operation * is always followed either by a call to either .bdrv_set_perm or * .bdrv_abort_perm_update. * * Checks whether the requested set of cumulative permissions in @perm * can be granted for accessing @bs and whether no other users are using * permissions other than those given in @shared (both arguments take * BLK_PERM_* bitmasks). * * If both conditions are met, 0 is returned. Otherwise, -errno is returned * and errp is set to an error describing the conflict. */ int (*bdrv_check_perm)(BlockDriverState *bs, uint64_t perm, uint64_t shared, Error **errp); /** * Called to inform the driver that the set of cumulative set of used * permissions for @bs has changed to @perm, and the set of sharable * permission to @shared. The driver can use this to propagate changes to * its children (i.e. request permissions only if a parent actually needs * them). * * This function is only invoked after bdrv_check_perm(), so block drivers * may rely on preparations made in their .bdrv_check_perm implementation. */ void (*bdrv_set_perm)(BlockDriverState *bs, uint64_t perm, uint64_t shared); /* * Called to inform the driver that after a previous bdrv_check_perm() * call, the permission update is not performed and any preparations made * for it (e.g. taken file locks) need to be undone. * * This function can be called even for nodes that never saw a * bdrv_check_perm() call. It is a no-op then. */ void (*bdrv_abort_perm_update)(BlockDriverState *bs); /** * Returns in @nperm and @nshared the permissions that the driver for @bs * needs on its child @c, based on the cumulative permissions requested by * the parents in @parent_perm and @parent_shared. * * If @c is NULL, return the permissions for attaching a new child for the * given @role. * * If @reopen_queue is non-NULL, don't return the currently needed * permissions, but those that will be needed after applying the * @reopen_queue. */ void (*bdrv_child_perm)(BlockDriverState *bs, BdrvChild *c, const BdrvChildRole *role, BlockReopenQueue *reopen_queue, uint64_t parent_perm, uint64_t parent_shared, uint64_t *nperm, uint64_t *nshared); /** * Bitmaps should be marked as 'IN_USE' in the image on reopening image * as rw. This handler should realize it. It also should unset readonly * field of BlockDirtyBitmap's in case of success. */ int (*bdrv_reopen_bitmaps_rw)(BlockDriverState *bs, Error **errp); # 441 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 441 "//qemu-2.11+dfsg/include/block/block_int.h" (*bdrv_can_store_new_dirty_bitmap)(BlockDriverState *bs, const char *name, uint32_t granularity, Error **errp); void (*bdrv_remove_persistent_dirty_bitmap)(BlockDriverState *bs, const char *name, Error **errp); struct { struct BlockDriver *le_next; /* next element */ struct BlockDriver **le_prev; /* address of previous next element */ } list; }; typedef struct BlockLimits { /* Alignment requirement, in bytes, for offset/length of I/O * requests. Must be a power of 2 less than INT_MAX; defaults to * 1 for drivers with modern byte interfaces, and to 512 * otherwise. */ uint32_t request_alignment; /* Maximum number of bytes that can be discarded at once (since it * is signed, it must be < 2G, if set). Must be multiple of * pdiscard_alignment, but need not be power of 2. May be 0 if no * inherent 32-bit limit */ int32_t max_pdiscard; /* Optimal alignment for discard requests in bytes. A power of 2 * is best but not mandatory. Must be a multiple of * bl.request_alignment, and must be less than max_pdiscard if * that is set. May be 0 if bl.request_alignment is good enough */ uint32_t pdiscard_alignment; /* Maximum number of bytes that can zeroized at once (since it is * signed, it must be < 2G, if set). Must be multiple of * pwrite_zeroes_alignment. May be 0 if no inherent 32-bit limit */ int32_t max_pwrite_zeroes; /* Optimal alignment for write zeroes requests in bytes. A power * of 2 is best but not mandatory. Must be a multiple of * bl.request_alignment, and must be less than max_pwrite_zeroes * if that is set. May be 0 if bl.request_alignment is good * enough */ uint32_t pwrite_zeroes_alignment; /* Optimal transfer length in bytes. A power of 2 is best but not * mandatory. Must be a multiple of bl.request_alignment, or 0 if * no preferred size */ uint32_t opt_transfer; /* Maximal transfer length in bytes. Need not be power of 2, but * must be multiple of opt_transfer and bl.request_alignment, or 0 * for no 32-bit limit. For now, anything larger than INT_MAX is * clamped down. */ uint32_t max_transfer; /* memory alignment, in bytes so that no bounce buffer is needed */ size_t min_mem_alignment; /* memory alignment, in bytes, for bounce buffer */ size_t opt_mem_alignment; /* maximum number of iovec elements */ int max_iov; } BlockLimits; typedef struct BdrvOpBlocker BdrvOpBlocker; typedef struct BdrvAioNotifier { void (*attached_aio_context)(AioContext *new_context, void *opaque); void (*detach_aio_context)(void *opaque); void *opaque; # 511 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 511 "//qemu-2.11+dfsg/include/block/block_int.h" deleted; struct { struct BdrvAioNotifier *le_next; /* next element */ struct BdrvAioNotifier **le_prev; /* address of previous next element */ } list; } BdrvAioNotifier; struct BdrvChildRole { /* If true, bdrv_replace_node() doesn't change the node this BdrvChild * points to. */ # 519 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 519 "//qemu-2.11+dfsg/include/block/block_int.h" stay_at_node; void (*inherit_options)(int *child_flags, QDict *child_options, int parent_flags, QDict *parent_options); void (*change_media)(BdrvChild *child, # 524 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 524 "//qemu-2.11+dfsg/include/block/block_int.h" load); void (*resize)(BdrvChild *child); /* Returns a name that is supposedly more useful for human users than the * node name for identifying the node in question (in particular, a BB * name), or NULL if the parent can't provide a better name. */ const char *(*get_name)(BdrvChild *child); /* Returns a malloced string that describes the parent of the child for a * human reader. This could be a node-name, BlockBackend name, qdev ID or * QOM path of the device owning the BlockBackend, job type and ID etc. The * caller is responsible for freeing the memory. */ char *(*get_parent_desc)(BdrvChild *child); /* * If this pair of functions is implemented, the parent doesn't issue new * requests after returning from .drained_begin() until .drained_end() is * called. * * Note that this can be nested. If drained_begin() was called twice, new * I/O is allowed only after drained_end() was called twice, too. */ void (*drained_begin)(BdrvChild *child); void (*drained_end)(BdrvChild *child); /* Notifies the parent that the child has been activated/inactivated (e.g. * when migration is completing) and it can start/stop requesting * permissions and doing I/O on it. */ void (*activate)(BdrvChild *child, Error **errp); int (*inactivate)(BdrvChild *child); void (*attach)(BdrvChild *child); void (*detach)(BdrvChild *child); /* Notifies the parent that the filename of its child has changed (e.g. * because the direct child was removed from the backing chain), so that it * can update its reference. */ int (*update_filename)(BdrvChild *child, BlockDriverState *new_base, const char *filename, Error **errp); }; extern const BdrvChildRole child_file; extern const BdrvChildRole child_format; extern const BdrvChildRole child_backing; struct BdrvChild { BlockDriverState *bs; char *name; const BdrvChildRole *role; void *opaque; /** * Granted permissions for operating on this BdrvChild (BLK_PERM_* bitmask) */ uint64_t perm; /** * Permissions that can still be granted to other users of @bs while this * BdrvChild is still attached to it. (BLK_PERM_* bitmask) */ uint64_t shared_perm; struct { struct BdrvChild *le_next; /* next element */ struct BdrvChild **le_prev; /* address of previous next element */ } next; struct { struct BdrvChild *le_next; /* next element */ struct BdrvChild **le_prev; /* address of previous next element */ } next_parent; }; /* * Note: the function bdrv_append() copies and swaps contents of * BlockDriverStates, so if you add new fields to this struct, please * inspect bdrv_append() to determine if the new fields need to be * copied as well. */ struct BlockDriverState { /* Protected by big QEMU lock or read-only after opening. No special * locking needed during I/O... */ int open_flags; /* flags used to open the file, re-used for re-open */ # 601 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 601 "//qemu-2.11+dfsg/include/block/block_int.h" read_only; /* if true, the media is read only */ # 602 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 602 "//qemu-2.11+dfsg/include/block/block_int.h" encrypted; /* if true, the media is encrypted */ # 603 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 603 "//qemu-2.11+dfsg/include/block/block_int.h" sg; /* if true, the device is a /dev/sg* */ # 604 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 604 "//qemu-2.11+dfsg/include/block/block_int.h" probed; /* if true, format was probed rather than specified */ # 605 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 605 "//qemu-2.11+dfsg/include/block/block_int.h" force_share; /* if true, always allow all shared permissions */ # 606 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 606 "//qemu-2.11+dfsg/include/block/block_int.h" implicit; /* if true, this filter node was automatically inserted */ BlockDriver *drv; /* NULL means no media */ void *opaque; AioContext *aio_context; /* event loop used for fd handlers, timers, etc */ /* long-running tasks intended to always use the same AioContext as this * BDS may register themselves in this list to be notified of changes * regarding this BDS's context */ struct { struct BdrvAioNotifier *lh_first; /* first element */ } aio_notifiers; # 616 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 616 "//qemu-2.11+dfsg/include/block/block_int.h" walking_aio_notifiers; /* to make removal during iteration safe */ char filename[ # 618 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 4096 /* # chars in a path name including nul */ # 618 "//qemu-2.11+dfsg/include/block/block_int.h" ]; char backing_file[ # 619 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 4096 /* # chars in a path name including nul */ # 619 "//qemu-2.11+dfsg/include/block/block_int.h" ]; /* if non zero, the image is a diff of this file image */ char backing_format[16]; /* if non-zero and backing_file exists */ QDict *full_open_options; char exact_filename[ # 624 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 4096 /* # chars in a path name including nul */ # 624 "//qemu-2.11+dfsg/include/block/block_int.h" ]; BdrvChild *backing; BdrvChild *file; /* I/O Limits */ BlockLimits bl; /* Flags honored during pwrite (so far: BDRV_REQ_FUA) */ unsigned int supported_write_flags; /* Flags honored during pwrite_zeroes (so far: BDRV_REQ_FUA, * BDRV_REQ_MAY_UNMAP) */ unsigned int supported_zero_flags; /* the following member gives a name to every node on the bs graph. */ char node_name[32]; /* element of the list of named nodes building the graph */ struct { struct BlockDriverState *tqe_next; /* next element */ struct BlockDriverState * *tqe_prev; /* address of previous next element */} node_list; /* element of the list of all BlockDriverStates (all_bdrv_states) */ struct { struct BlockDriverState *tqe_next; /* next element */ struct BlockDriverState * *tqe_prev; /* address of previous next element */} bs_list; /* element of the list of monitor-owned BDS */ struct { struct BlockDriverState *tqe_next; /* next element */ struct BlockDriverState * *tqe_prev; /* address of previous next element */} monitor_list; int refcnt; /* operation blockers */ struct { struct BdrvOpBlocker *lh_first; /* first element */ } op_blockers[BLOCK_OP_TYPE_MAX]; /* long-running background operation */ BlockJob *job; /* The node that this node inherited default options from (and a reopen on * which can affect this node by changing these defaults). This is always a * parent node of this node. */ BlockDriverState *inherits_from; struct { struct BdrvChild *lh_first; /* first element */ } children; struct { struct BdrvChild *lh_first; /* first element */ } parents; QDict *options; QDict *explicit_options; BlockdevDetectZeroesOptions detect_zeroes; /* The error object in use for blocking operations on backing_hd */ Error *backing_blocker; /* Protected by AioContext lock */ /* If we are reading a disk image, give its size in sectors. * Generally read-only; it is written to by load_snapshot and * save_snaphost, but the block layer is quiescent during those. */ int64_t total_sectors; /* Callback before write request is processed */ NotifierWithReturnList before_write_notifiers; /* threshold limit for writes, in bytes. "High water mark". */ uint64_t write_threshold_offset; NotifierWithReturn write_threshold_notifier; /* Writing to the list requires the BQL _and_ the dirty_bitmap_mutex. * Reading from the list can be done with either the BQL or the * dirty_bitmap_mutex. Modifying a bitmap only requires * dirty_bitmap_mutex. */ QemuMutex dirty_bitmap_mutex; struct { struct BdrvDirtyBitmap *lh_first; /* first element */ } dirty_bitmaps; /* Offset after the highest byte written to */ Stat64 wr_highest_offset; /* If true, copy read backing sectors into image. Can be >1 if more * than one client has requested copy-on-read. Accessed with atomic * ops. */ int copy_on_read; /* number of in-flight requests; overall and serialising. * Accessed with atomic ops. */ unsigned int in_flight; unsigned int serialising_in_flight; /* Internal to BDRV_POLL_WHILE and bdrv_wakeup. Accessed with atomic * ops. */ # 708 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 708 "//qemu-2.11+dfsg/include/block/block_int.h" wakeup; /* counter for nested bdrv_io_plug. * Accessed with atomic ops. */ unsigned io_plugged; /* do we need to tell the quest if we have a volatile write cache? */ int enable_write_cache; /* Accessed with atomic ops. */ int quiesce_counter; unsigned int write_gen; /* Current data generation */ /* Protected by reqs_lock. */ CoMutex reqs_lock; struct { struct BdrvTrackedRequest *lh_first; /* first element */ } tracked_requests; CoQueue flush_queue; /* Serializing flush queue */ # 726 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 726 "//qemu-2.11+dfsg/include/block/block_int.h" active_flush_req; /* Flush request in flight? */ /* Only read/written by whoever has set active_flush_req to true. */ unsigned int flushed_gen; /* Flushed write generation */ }; struct BlockBackendRootState { int open_flags; # 734 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 734 "//qemu-2.11+dfsg/include/block/block_int.h" read_only; BlockdevDetectZeroesOptions detect_zeroes; }; typedef enum BlockMirrorBackingMode { /* Reuse the existing backing chain from the source for the target. * - sync=full: Set backing BDS to NULL. * - sync=top: Use source's backing BDS. * - sync=none: Use source as the backing BDS. */ MIRROR_SOURCE_BACKING_CHAIN, /* Open the target's backing chain completely anew */ MIRROR_OPEN_BACKING_CHAIN, /* Do not change the target's backing BDS after job completion */ MIRROR_LEAVE_BACKING_CHAIN, } BlockMirrorBackingMode; static inline BlockDriverState *backing_bs(BlockDriverState *bs) { return bs->backing ? bs->backing->bs : # 754 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 ((void *)0) # 754 "//qemu-2.11+dfsg/include/block/block_int.h" ; } /* Essential block drivers which must always be statically linked into qemu, and * which therefore can be accessed without using bdrv_find_format() */ extern BlockDriver bdrv_file; extern BlockDriver bdrv_raw; extern BlockDriver bdrv_qcow2; int bdrv_co_preadv(BdrvChild *child, int64_t offset, unsigned int bytes, QEMUIOVector *qiov, BdrvRequestFlags flags); int bdrv_co_pwritev(BdrvChild *child, int64_t offset, unsigned int bytes, QEMUIOVector *qiov, BdrvRequestFlags flags); int get_tmp_filename(char *filename, int size); BlockDriver *bdrv_probe_all(const uint8_t *buf, int buf_size, const char *filename); void bdrv_parse_filename_strip_prefix(const char *filename, const char *prefix, QDict *options); /** * bdrv_add_before_write_notifier: * * Register a callback that is invoked before write requests are processed but * after any throttling or waiting for overlapping requests. */ void bdrv_add_before_write_notifier(BlockDriverState *bs, NotifierWithReturn *notifier); /** * bdrv_detach_aio_context: * * May be called from .bdrv_detach_aio_context() to detach children from the * current #AioContext. This is only needed by block drivers that manage their * own children. Both ->file and ->backing are automatically handled and * block drivers should not call this function on them explicitly. */ void bdrv_detach_aio_context(BlockDriverState *bs); /** * bdrv_attach_aio_context: * * May be called from .bdrv_attach_aio_context() to attach children to the new * #AioContext. This is only needed by block drivers that manage their own * children. Both ->file and ->backing are automatically handled and block * drivers should not call this function on them explicitly. */ void bdrv_attach_aio_context(BlockDriverState *bs, AioContext *new_context); /** * bdrv_add_aio_context_notifier: * * If a long-running job intends to be always run in the same AioContext as a * certain BDS, it may use this function to be notified of changes regarding the * association of the BDS to an AioContext. * * attached_aio_context() is called after the target BDS has been attached to a * new AioContext; detach_aio_context() is called before the target BDS is being * detached from its old AioContext. */ void bdrv_add_aio_context_notifier(BlockDriverState *bs, void (*attached_aio_context)(AioContext *new_context, void *opaque), void (*detach_aio_context)(void *opaque), void *opaque); /** * bdrv_remove_aio_context_notifier: * * Unsubscribe of change notifications regarding the BDS's AioContext. The * parameters given here have to be the same as those given to * bdrv_add_aio_context_notifier(). */ void bdrv_remove_aio_context_notifier(BlockDriverState *bs, void (*aio_context_attached)(AioContext *, void *), void (*aio_context_detached)(void *), void *opaque); /** * bdrv_wakeup: * @bs: The BlockDriverState for which an I/O operation has been completed. * * Wake up the main thread if it is waiting on BDRV_POLL_WHILE. During * synchronous I/O on a BlockDriverState that is attached to another * I/O thread, the main thread lets the I/O thread's event loop run, * waiting for the I/O operation to complete. A bdrv_wakeup will wake * up the main thread if necessary. * * Manual calls to bdrv_wakeup are rarely necessary, because * bdrv_dec_in_flight already calls it. */ void bdrv_wakeup(BlockDriverState *bs); /** * stream_start: * @job_id: The id of the newly-created job, or %NULL to use the * device name of @bs. * @bs: Block device to operate on. * @base: Block device that will become the new base, or %NULL to * flatten the whole backing file chain onto @bs. * @backing_file_str: The file name that will be written to @bs as the * the new backing file if the job completes. Ignored if @base is %NULL. * @speed: The maximum speed, in bytes per second, or 0 for unlimited. * @on_error: The action to take upon error. * @errp: Error object. * * Start a streaming operation on @bs. Clusters that are unallocated * in @bs, but allocated in any image between @base and @bs (both * exclusive) will be written to @bs. At the end of a successful * streaming job, the backing file of @bs will be changed to * @backing_file_str in the written image and to @base in the live * BlockDriverState. */ void stream_start(const char *job_id, BlockDriverState *bs, BlockDriverState *base, const char *backing_file_str, int64_t speed, BlockdevOnError on_error, Error **errp); /** * commit_start: * @job_id: The id of the newly-created job, or %NULL to use the * device name of @bs. * @bs: Active block device. * @top: Top block device to be committed. * @base: Block device that will be written into, and become the new top. * @speed: The maximum speed, in bytes per second, or 0 for unlimited. * @on_error: The action to take upon error. * @backing_file_str: String to use as the backing file in @top's overlay * @filter_node_name: The node name that should be assigned to the filter * driver that the commit job inserts into the graph above @top. NULL means * that a node name should be autogenerated. * @errp: Error object. * */ void commit_start(const char *job_id, BlockDriverState *bs, BlockDriverState *base, BlockDriverState *top, int64_t speed, BlockdevOnError on_error, const char *backing_file_str, const char *filter_node_name, Error **errp); /** * commit_active_start: * @job_id: The id of the newly-created job, or %NULL to use the * device name of @bs. * @bs: Active block device to be committed. * @base: Block device that will be written into, and become the new top. * @creation_flags: Flags that control the behavior of the Job lifetime. * See @BlockJobCreateFlags * @speed: The maximum speed, in bytes per second, or 0 for unlimited. * @on_error: The action to take upon error. * @filter_node_name: The node name that should be assigned to the filter * driver that the commit job inserts into the graph above @bs. NULL means that * a node name should be autogenerated. * @cb: Completion function for the job. * @opaque: Opaque pointer value passed to @cb. * @auto_complete: Auto complete the job. * @errp: Error object. * */ void commit_active_start(const char *job_id, BlockDriverState *bs, BlockDriverState *base, int creation_flags, int64_t speed, BlockdevOnError on_error, const char *filter_node_name, BlockCompletionFunc *cb, void *opaque, # 924 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 924 "//qemu-2.11+dfsg/include/block/block_int.h" auto_complete, Error **errp); /* * mirror_start: * @job_id: The id of the newly-created job, or %NULL to use the * device name of @bs. * @bs: Block device to operate on. * @target: Block device to write to. * @replaces: Block graph node name to replace once the mirror is done. Can * only be used when full mirroring is selected. * @speed: The maximum speed, in bytes per second, or 0 for unlimited. * @granularity: The chosen granularity for the dirty bitmap. * @buf_size: The amount of data that can be in flight at one time. * @mode: Whether to collapse all images in the chain to the target. * @backing_mode: How to establish the target's backing chain after completion. * @on_source_error: The action to take upon error reading from the source. * @on_target_error: The action to take upon error writing to the target. * @unmap: Whether to unmap target where source sectors only contain zeroes. * @filter_node_name: The node name that should be assigned to the filter * driver that the mirror job inserts into the graph above @bs. NULL means that * a node name should be autogenerated. * @errp: Error object. * * Start a mirroring operation on @bs. Clusters that are allocated * in @bs will be written to @target until the job is cancelled or * manually completed. At the end of a successful mirroring job, * @bs will be switched to read from @target. */ void mirror_start(const char *job_id, BlockDriverState *bs, BlockDriverState *target, const char *replaces, int64_t speed, uint32_t granularity, int64_t buf_size, MirrorSyncMode mode, BlockMirrorBackingMode backing_mode, BlockdevOnError on_source_error, BlockdevOnError on_target_error, # 957 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 957 "//qemu-2.11+dfsg/include/block/block_int.h" unmap, const char *filter_node_name, Error **errp); /* * backup_job_create: * @job_id: The id of the newly-created job, or %NULL to use the * device name of @bs. * @bs: Block device to operate on. * @target: Block device to write to. * @speed: The maximum speed, in bytes per second, or 0 for unlimited. * @sync_mode: What parts of the disk image should be copied to the destination. * @sync_bitmap: The dirty bitmap if sync_mode is MIRROR_SYNC_MODE_INCREMENTAL. * @on_source_error: The action to take upon error reading from the source. * @on_target_error: The action to take upon error writing to the target. * @creation_flags: Flags that control the behavior of the Job lifetime. * See @BlockJobCreateFlags * @cb: Completion function for the job. * @opaque: Opaque pointer value passed to @cb. * @txn: Transaction that this job is part of (may be NULL). * * Create a backup operation on @bs. Clusters in @bs are written to @target * until the job is cancelled or manually completed. */ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, BlockDriverState *target, int64_t speed, MirrorSyncMode sync_mode, BdrvDirtyBitmap *sync_bitmap, # 983 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 983 "//qemu-2.11+dfsg/include/block/block_int.h" compress, BlockdevOnError on_source_error, BlockdevOnError on_target_error, int creation_flags, BlockCompletionFunc *cb, void *opaque, BlockJobTxn *txn, Error **errp); void hmp_drive_add_node(Monitor *mon, const char *optstr); BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs, const char *child_name, const BdrvChildRole *child_role, uint64_t perm, uint64_t shared_perm, void *opaque, Error **errp); void bdrv_root_unref_child(BdrvChild *child); int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared, Error **errp); /* Default implementation for BlockDriver.bdrv_child_perm() that can be used by * block filters: Forward CONSISTENT_READ, WRITE, WRITE_UNCHANGED and RESIZE to * all children */ void bdrv_filter_default_perms(BlockDriverState *bs, BdrvChild *c, const BdrvChildRole *role, BlockReopenQueue *reopen_queue, uint64_t perm, uint64_t shared, uint64_t *nperm, uint64_t *nshared); /* Default implementation for BlockDriver.bdrv_child_perm() that can be used by * (non-raw) image formats: Like above for bs->backing, but for bs->file it * requires WRITE | RESIZE for read-write images, always requires * CONSISTENT_READ and doesn't share WRITE. */ void bdrv_format_default_perms(BlockDriverState *bs, BdrvChild *c, const BdrvChildRole *role, BlockReopenQueue *reopen_queue, uint64_t perm, uint64_t shared, uint64_t *nperm, uint64_t *nshared); /* * Default implementation for drivers to pass bdrv_co_get_block_status() to * their file. */ int64_t bdrv_co_get_block_status_from_file(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file); /* * Default implementation for drivers to pass bdrv_co_get_block_status() to * their backing file. */ int64_t bdrv_co_get_block_status_from_backing(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file); const char *bdrv_get_parent_name(const BlockDriverState *bs); void blk_dev_change_media_cb(BlockBackend *blk, # 1040 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 1040 "//qemu-2.11+dfsg/include/block/block_int.h" load, Error **errp); # 1041 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 1041 "//qemu-2.11+dfsg/include/block/block_int.h" blk_dev_has_removable_media(BlockBackend *blk); # 1042 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 1042 "//qemu-2.11+dfsg/include/block/block_int.h" blk_dev_has_tray(BlockBackend *blk); void blk_dev_eject_request(BlockBackend *blk, # 1043 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 1043 "//qemu-2.11+dfsg/include/block/block_int.h" force); # 1044 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 1044 "//qemu-2.11+dfsg/include/block/block_int.h" blk_dev_is_tray_open(BlockBackend *blk); # 1045 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 1045 "//qemu-2.11+dfsg/include/block/block_int.h" blk_dev_is_medium_locked(BlockBackend *blk); void bdrv_set_dirty(BlockDriverState *bs, int64_t offset, int64_t bytes); # 1048 "//qemu-2.11+dfsg/include/block/block_int.h" 3 4 _Bool # 1048 "//qemu-2.11+dfsg/include/block/block_int.h" bdrv_requests_pending(BlockDriverState *bs); void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out); void bdrv_undo_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *in); void bdrv_inc_in_flight(BlockDriverState *bs); void bdrv_dec_in_flight(BlockDriverState *bs); void blockdev_close_all_bdrv_states(void); # 29 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/qemu/module.h" 1 /* * QEMU Module Infrastructure * * Copyright IBM, Corp. 2009 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * */ # 30 "../block/file-posix.c" 2 # 1 "block/trace.h" 1 /* This file is autogenerated by tracetool, do not edit. */ # 1 "//qemu-2.11+dfsg/include/qemu-common.h" 1 /* Common header file that is included by all of QEMU. * * This file is supposed to be included only by .c files. No header file should * depend on qemu-common.h, as this would easily lead to circular header * dependencies. * * If a header file uses a definition from qemu-common.h, that definition * must be moved to a separate header file, and the header that uses it * must include that header. */ # 7 "block/trace.h" 2 # 1 "//qemu-2.11+dfsg/trace/control.h" 1 /* * Interface for configuring and controlling the state of tracing events. * * Copyright (C) 2011-2016 Lluís Vilanova * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qemu-common.h" 1 /* Common header file that is included by all of QEMU. * * This file is supposed to be included only by .c files. No header file should * depend on qemu-common.h, as this would easily lead to circular header * dependencies. * * If a header file uses a definition from qemu-common.h, that definition * must be moved to a separate header file, and the header that uses it * must include that header. */ # 14 "//qemu-2.11+dfsg/trace/control.h" 2 # 1 "//qemu-2.11+dfsg/trace/event-internal.h" 1 /* * Interface for configuring and controlling the state of tracing events. * * Copyright (C) 2012-2016 Lluís Vilanova * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ /* * Special value for TraceEvent.vcpu_id field to indicate * that the event is not VCPU specific */ /** * TraceEvent: * @id: Unique event identifier. * @vcpu_id: Unique per-vCPU event identifier. * @name: Event name. * @sstate: Static tracing state. * @dstate: Dynamic tracing state * * Interpretation of @dstate depends on whether the event has the 'vcpu' * property: * - false: Boolean value indicating whether the event is active. * - true : Integral counting the number of vCPUs that have this event enabled. * * Opaque generic description of a tracing event. */ typedef struct TraceEvent { uint32_t id; uint32_t vcpu_id; const char * name; const # 38 "//qemu-2.11+dfsg/trace/event-internal.h" 3 4 _Bool # 38 "//qemu-2.11+dfsg/trace/event-internal.h" sstate; uint16_t *dstate; } TraceEvent; void trace_event_set_state_dynamic_init(TraceEvent *ev, # 42 "//qemu-2.11+dfsg/trace/event-internal.h" 3 4 _Bool # 42 "//qemu-2.11+dfsg/trace/event-internal.h" state); # 15 "//qemu-2.11+dfsg/trace/control.h" 2 typedef struct TraceEventIter { size_t event; size_t group; const char *pattern; } TraceEventIter; /** * trace_event_iter_init: * @iter: the event iterator struct * @pattern: optional pattern to filter events on name * * Initialize the event iterator struct @iter, * optionally using @pattern to filter out events * with non-matching names. */ void trace_event_iter_init(TraceEventIter *iter, const char *pattern); /** * trace_event_iter_next: * @iter: the event iterator struct * * Get the next event, if any. When this returns NULL, * the iterator should no longer be used. * * Returns: the next event, or NULL if no more events exist */ TraceEvent *trace_event_iter_next(TraceEventIter *iter); /** * trace_event_name: * @id: Event name. * * Search an event by its name. * * Returns: pointer to #TraceEvent or NULL if not found. */ TraceEvent *trace_event_name(const char *name); /** * trace_event_is_pattern: * * Whether the given string is an event name pattern. */ static # 61 "//qemu-2.11+dfsg/trace/control.h" 3 4 _Bool # 61 "//qemu-2.11+dfsg/trace/control.h" trace_event_is_pattern(const char *str); /** * trace_event_get_id: * * Get the identifier of an event. */ static uint32_t trace_event_get_id(TraceEvent *ev); /** * trace_event_get_vcpu_id: * * Get the per-vCPU identifier of an event. * * Special value #TRACE_VCPU_EVENT_NONE means the event is not vCPU-specific * (does not have the "vcpu" property). */ static uint32_t trace_event_get_vcpu_id(TraceEvent *ev); /** * trace_event_is_vcpu: * * Whether this is a per-vCPU event. */ static # 86 "//qemu-2.11+dfsg/trace/control.h" 3 4 _Bool # 86 "//qemu-2.11+dfsg/trace/control.h" trace_event_is_vcpu(TraceEvent *ev); /** * trace_event_get_name: * * Get the name of an event. */ static const char * trace_event_get_name(TraceEvent *ev); /** * trace_event_get_state: * @id: Event identifier name. * * Get the tracing state of an event, both static and the QEMU dynamic state. * * If the event has the disabled property, the check will have no performance * impact. */ /** * trace_event_get_state_backends: * @id: Event identifier name. * * Get the tracing state of an event, both static and dynamic state from all * compiled-in backends. * * If the event has the disabled property, the check will have no performance * impact. * * Returns: true if at least one backend has the event enabled and the event * does not have the disabled property. */ /** * trace_event_get_vcpu_state: * @vcpu: Target vCPU. * @id: Event identifier name. * * Get the tracing state of an event (both static and dynamic) for the given * vCPU. * * If the event has the disabled property, the check will have no performance * impact. */ /** * trace_event_get_state_static: * @id: Event identifier. * * Get the static tracing state of an event. * * Use the define 'TRACE_${EVENT_NAME}_ENABLED' for compile-time checks (it will * be set to 1 or 0 according to the presence of the disabled property). */ static # 148 "//qemu-2.11+dfsg/trace/control.h" 3 4 _Bool # 148 "//qemu-2.11+dfsg/trace/control.h" trace_event_get_state_static(TraceEvent *ev); /** * trace_event_get_state_dynamic: * * Get the dynamic tracing state of an event. * * If the event has the 'vcpu' property, gets the OR'ed state of all vCPUs. */ static # 157 "//qemu-2.11+dfsg/trace/control.h" 3 4 _Bool # 157 "//qemu-2.11+dfsg/trace/control.h" trace_event_get_state_dynamic(TraceEvent *ev); /** * trace_event_get_vcpu_state_dynamic: * * Get the dynamic tracing state of an event for the given vCPU. */ static # 164 "//qemu-2.11+dfsg/trace/control.h" 3 4 _Bool # 164 "//qemu-2.11+dfsg/trace/control.h" trace_event_get_vcpu_state_dynamic(CPUState *vcpu, TraceEvent *ev); /** * trace_event_set_state_dynamic: * * Set the dynamic tracing state of an event. * * If the event has the 'vcpu' property, sets the state on all vCPUs. * * Pre-condition: trace_event_get_state_static(ev) == true */ void trace_event_set_state_dynamic(TraceEvent *ev, # 176 "//qemu-2.11+dfsg/trace/control.h" 3 4 _Bool # 176 "//qemu-2.11+dfsg/trace/control.h" state); /** * trace_event_set_vcpu_state_dynamic: * * Set the dynamic tracing state of an event for the given vCPU. * * Pre-condition: trace_event_get_vcpu_state_static(ev) == true * * Note: Changes for execution-time events with the 'tcg' property will not be * propagated until the next TB is executed (iff executing in TCG mode). */ void trace_event_set_vcpu_state_dynamic(CPUState *vcpu, TraceEvent *ev, # 189 "//qemu-2.11+dfsg/trace/control.h" 3 4 _Bool # 189 "//qemu-2.11+dfsg/trace/control.h" state); /** * trace_init_backends: * @file: Name of trace output file; may be NULL. * Corresponds to commandline option "-trace file=...". * * Initialize the tracing backend. * * Returns: Whether the backends could be successfully initialized. */ # 202 "//qemu-2.11+dfsg/trace/control.h" 3 4 _Bool # 202 "//qemu-2.11+dfsg/trace/control.h" trace_init_backends(void); /** * trace_init_file: * @file: Name of trace output file; may be NULL. * Corresponds to commandline option "-trace file=...". * * Record the name of the output file for the tracing backend. * Exits if no selected backend does not support specifying the * output file, and a non-NULL file was passed. */ void trace_init_file(const char *file); /** * trace_init_vcpu: * @vcpu: Added vCPU. * * Set initial dynamic event state for a hot-plugged vCPU. */ void trace_init_vcpu(CPUState *vcpu); /** * trace_fini_vcpu: * @vcpu: Removed vCPU. * * Disable dynamic event state for a hot-unplugged vCPU. */ void trace_fini_vcpu(CPUState *vcpu); /** * trace_list_events: * * List all available events. */ void trace_list_events(void); /** * trace_enable_events: * @line_buf: A string with a glob pattern of events to be enabled or, * if the string starts with '-', disabled. * * Enable or disable matching events. */ void trace_enable_events(const char *line_buf); /** * Definition of QEMU options describing trace subsystem configuration */ extern QemuOptsList qemu_trace_opts; /** * trace_opt_parse: * @optarg: A string argument of --trace command line argument * * Initialize tracing subsystem. * * Returns the filename to save trace to. It must be freed with g_free(). */ char *trace_opt_parse(const char *optarg); /** * trace_get_vcpu_event_count: * * Return the number of known vcpu-specific events */ uint32_t trace_get_vcpu_event_count(void); # 1 "//qemu-2.11+dfsg/trace/control-internal.h" 1 /* * Interface for configuring and controlling the state of tracing events. * * Copyright (C) 2011-2016 Lluís Vilanova * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ # 14 "//qemu-2.11+dfsg/trace/control-internal.h" 2 # 1 "//qemu-2.11+dfsg/include/qom/cpu.h" 1 # 1 "//qemu-2.11+dfsg/include/qom/cpu.h" /* * QEMU CPU model * * Copyright (c) 2012 SUSE LINUX Products GmbH * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see * */ # 1 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 1 # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ # 5 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/option.h" 1 /* * Commandline option parsing functions * * Copyright (c) 2003-2008 Fabrice Bellard * Copyright (c) 2009 Kevin Wolf * * 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. */ # 6 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/bitmap.h" 1 /* * Bitmap Module * * Copyright (C) 2010 Corentin Chary * * Mostly inspired by (stolen from) linux/bitmap.h and linux/bitops.h * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qemu/bitops.h" 1 /* * Bitops Module * * Copyright (C) 2010 Corentin Chary * * Mostly inspired by (stolen from) linux/bitmap.h and linux/bitops.h * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 17 "//qemu-2.11+dfsg/include/qemu/bitmap.h" 2 /* * The available bitmap operations and their rough meaning in the * case that the bitmap is a single unsigned long are thus: * * Note that nbits should be always a compile time evaluable constant. * Otherwise many inlines will generate horrible code. * * bitmap_zero(dst, nbits) *dst = 0UL * bitmap_fill(dst, nbits) *dst = ~0UL * bitmap_copy(dst, src, nbits) *dst = *src * bitmap_and(dst, src1, src2, nbits) *dst = *src1 & *src2 * bitmap_or(dst, src1, src2, nbits) *dst = *src1 | *src2 * bitmap_xor(dst, src1, src2, nbits) *dst = *src1 ^ *src2 * bitmap_andnot(dst, src1, src2, nbits) *dst = *src1 & ~(*src2) * bitmap_complement(dst, src, nbits) *dst = ~(*src) * bitmap_equal(src1, src2, nbits) Are *src1 and *src2 equal? * bitmap_intersects(src1, src2, nbits) Do *src1 and *src2 overlap? * bitmap_empty(src, nbits) Are all bits zero in *src? * bitmap_full(src, nbits) Are all bits set in *src? * bitmap_set(dst, pos, nbits) Set specified bit area * bitmap_set_atomic(dst, pos, nbits) Set specified bit area with atomic ops * bitmap_clear(dst, pos, nbits) Clear specified bit area * bitmap_test_and_clear_atomic(dst, pos, nbits) Test and clear area * bitmap_find_next_zero_area(buf, len, pos, n, mask) Find bit free area * bitmap_to_le(dst, src, nbits) Convert bitmap to little endian * bitmap_from_le(dst, src, nbits) Convert bitmap from little endian */ /* * Also the following operations apply to bitmaps. * * set_bit(bit, addr) *addr |= bit * clear_bit(bit, addr) *addr &= ~bit * change_bit(bit, addr) *addr ^= bit * test_bit(bit, addr) Is bit set in *addr? * test_and_set_bit(bit, addr) Set bit and return old value * test_and_clear_bit(bit, addr) Clear bit and return old value * test_and_change_bit(bit, addr) Change bit and return old value * find_first_zero_bit(addr, nbits) Position first zero bit in *addr * find_first_bit(addr, nbits) Position first set bit in *addr * find_next_zero_bit(addr, nbits, bit) Position next zero bit in *addr >= bit * find_next_bit(addr, nbits, bit) Position next set bit in *addr >= bit */ # 71 "//qemu-2.11+dfsg/include/qemu/bitmap.h" int slow_bitmap_empty(const unsigned long *bitmap, long bits); int slow_bitmap_full(const unsigned long *bitmap, long bits); int slow_bitmap_equal(const unsigned long *bitmap1, const unsigned long *bitmap2, long bits); void slow_bitmap_complement(unsigned long *dst, const unsigned long *src, long bits); int slow_bitmap_and(unsigned long *dst, const unsigned long *bitmap1, const unsigned long *bitmap2, long bits); void slow_bitmap_or(unsigned long *dst, const unsigned long *bitmap1, const unsigned long *bitmap2, long bits); void slow_bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, const unsigned long *bitmap2, long bits); int slow_bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, const unsigned long *bitmap2, long bits); int slow_bitmap_intersects(const unsigned long *bitmap1, const unsigned long *bitmap2, long bits); long slow_bitmap_count_one(const unsigned long *bitmap, long nbits); static inline unsigned long *bitmap_try_new(long nbits) { long len = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long); return g_try_malloc0(len); } static inline unsigned long *bitmap_new(long nbits) { unsigned long *ptr = bitmap_try_new(nbits); if (ptr == # 98 "//qemu-2.11+dfsg/include/qemu/bitmap.h" 3 4 ((void *)0) # 98 "//qemu-2.11+dfsg/include/qemu/bitmap.h" ) { abort(); } return ptr; } static inline void bitmap_zero(unsigned long *dst, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { *dst = 0UL; } else { long len = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long); memset(dst, 0, len); } } static inline void bitmap_fill(unsigned long *dst, long nbits) { size_t nlongs = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))); if (!((nbits) <= (sizeof (unsigned long) * 8))) { long len = (nlongs - 1) * sizeof(unsigned long); memset(dst, 0xff, len); } dst[nlongs - 1] = (~0UL >> (-(nbits) & ((sizeof (unsigned long) * 8) - 1))); } static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { *dst = *src; } else { long len = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long); memcpy(dst, src, len); } } static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { return (*dst = *src1 & *src2) != 0; } return slow_bitmap_and(dst, src1, src2, nbits); } static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { *dst = *src1 | *src2; } else { slow_bitmap_or(dst, src1, src2, nbits); } } static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { *dst = *src1 ^ *src2; } else { slow_bitmap_xor(dst, src1, src2, nbits); } } static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { return (*dst = *src1 & ~(*src2)) != 0; } return slow_bitmap_andnot(dst, src1, src2, nbits); } static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { *dst = ~(*src) & (~0UL >> (-(nbits) & ((sizeof (unsigned long) * 8) - 1))); } else { slow_bitmap_complement(dst, src, nbits); } } static inline int bitmap_equal(const unsigned long *src1, const unsigned long *src2, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { return ! ((*src1 ^ *src2) & (~0UL >> (-(nbits) & ((sizeof (unsigned long) * 8) - 1)))); } else { return slow_bitmap_equal(src1, src2, nbits); } } static inline int bitmap_empty(const unsigned long *src, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { return ! (*src & (~0UL >> (-(nbits) & ((sizeof (unsigned long) * 8) - 1)))); } else { return slow_bitmap_empty(src, nbits); } } static inline int bitmap_full(const unsigned long *src, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { return ! (~(*src) & (~0UL >> (-(nbits) & ((sizeof (unsigned long) * 8) - 1)))); } else { return slow_bitmap_full(src, nbits); } } static inline int bitmap_intersects(const unsigned long *src1, const unsigned long *src2, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { return ((*src1 & *src2) & (~0UL >> (-(nbits) & ((sizeof (unsigned long) * 8) - 1)))) != 0; } else { return slow_bitmap_intersects(src1, src2, nbits); } } static inline long bitmap_count_one(const unsigned long *bitmap, long nbits) { if (((nbits) <= (sizeof (unsigned long) * 8))) { return ctpop64(*bitmap & (~0UL >> (-(nbits) & ((sizeof (unsigned long) * 8) - 1)))); } else { return slow_bitmap_count_one(bitmap, nbits); } } void bitmap_set(unsigned long *map, long i, long len); void bitmap_set_atomic(unsigned long *map, long i, long len); void bitmap_clear(unsigned long *map, long start, long nr); # 234 "//qemu-2.11+dfsg/include/qemu/bitmap.h" 3 4 _Bool # 234 "//qemu-2.11+dfsg/include/qemu/bitmap.h" bitmap_test_and_clear_atomic(unsigned long *map, long start, long nr); void bitmap_copy_and_clear_atomic(unsigned long *dst, unsigned long *src, long nr); unsigned long bitmap_find_next_zero_area(unsigned long *map, unsigned long size, unsigned long start, unsigned long nr, unsigned long align_mask); static inline unsigned long *bitmap_zero_extend(unsigned long *old, long old_nbits, long new_nbits) { long new_len = (((new_nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long); unsigned long *new = g_realloc(old, new_len); bitmap_clear(new, old_nbits, new_nbits - old_nbits); return new; } void bitmap_to_le(unsigned long *dst, const unsigned long *src, long nbits); void bitmap_from_le(unsigned long *dst, const unsigned long *src, long nbits); # 7 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 2 # 1 "//qemu-2.11+dfsg/include/qom/object.h" 1 /* * QEMU Object Model * * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * */ # 1 "./qapi-types.h" 1 /* AUTOMATICALLY GENERATED, DO NOT MODIFY */ /* * schema-defined QAPI types * * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * */ # 18 "//qemu-2.11+dfsg/include/qom/object.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ # 19 "//qemu-2.11+dfsg/include/qom/object.h" 2 struct TypeImpl; typedef struct TypeImpl *Type; typedef struct ObjectClass ObjectClass; typedef struct Object Object; typedef struct TypeInfo TypeInfo; typedef struct InterfaceClass InterfaceClass; typedef struct InterfaceInfo InterfaceInfo; /** * SECTION:object.h * @title:Base Object Type System * @short_description: interfaces for creating new types and objects * * The QEMU Object Model provides a framework for registering user creatable * types and instantiating objects from those types. QOM provides the following * features: * * - System for dynamically registering types * - Support for single-inheritance of types * - Multiple inheritance of stateless interfaces * * * Creating a minimal type * * #include "qdev.h" * * #define TYPE_MY_DEVICE "my-device" * * // No new virtual functions: we can reuse the typedef for the * // superclass. * typedef DeviceClass MyDeviceClass; * typedef struct MyDevice * { * DeviceState parent; * * int reg0, reg1, reg2; * } MyDevice; * * static const TypeInfo my_device_info = { * .name = TYPE_MY_DEVICE, * .parent = TYPE_DEVICE, * .instance_size = sizeof(MyDevice), * }; * * static void my_device_register_types(void) * { * type_register_static(&my_device_info); * } * * type_init(my_device_register_types) * * * * In the above example, we create a simple type that is described by #TypeInfo. * #TypeInfo describes information about the type including what it inherits * from, the instance and class size, and constructor/destructor hooks. * * Alternatively several static types could be registered using helper macro * DEFINE_TYPES() * * * * static const TypeInfo device_types_info[] = { * { * .name = TYPE_MY_DEVICE_A, * .parent = TYPE_DEVICE, * .instance_size = sizeof(MyDeviceA), * }, * { * .name = TYPE_MY_DEVICE_B, * .parent = TYPE_DEVICE, * .instance_size = sizeof(MyDeviceB), * }, * }; * * DEFINE_TYPES(device_types_info) * * * * Every type has an #ObjectClass associated with it. #ObjectClass derivatives * are instantiated dynamically but there is only ever one instance for any * given type. The #ObjectClass typically holds a table of function pointers * for the virtual methods implemented by this type. * * Using object_new(), a new #Object derivative will be instantiated. You can * cast an #Object to a subclass (or base-class) type using * object_dynamic_cast(). You typically want to define macro wrappers around * OBJECT_CHECK() and OBJECT_CLASS_CHECK() to make it easier to convert to a * specific type: * * * Typecasting macros * * #define MY_DEVICE_GET_CLASS(obj) * OBJECT_GET_CLASS(MyDeviceClass, obj, TYPE_MY_DEVICE) ) * #define MY_DEVICE_CLASS(klass) * OBJECT_CLASS_CHECK(MyDeviceClass, klass, TYPE_MY_DEVICE) ) * #define MY_DEVICE(obj) * OBJECT_CHECK(MyDevice, obj, TYPE_MY_DEVICE) ) * * * * # Class Initialization # * * Before an object is initialized, the class for the object must be * initialized. There is only one class object for all instance objects * that is created lazily. * * Classes are initialized by first initializing any parent classes (if * necessary). After the parent class object has initialized, it will be * copied into the current class object and any additional storage in the * class object is zero filled. * * The effect of this is that classes automatically inherit any virtual * function pointers that the parent class has already initialized. All * other fields will be zero filled. * * Once all of the parent classes have been initialized, #TypeInfo::class_init * is called to let the class being instantiated provide default initialize for * its virtual functions. Here is how the above example might be modified * to introduce an overridden virtual function: * * * Overriding a virtual function * * #include "qdev.h" * * void my_device_class_init(ObjectClass *klass, void *class_data) * { * DeviceClass *dc = DEVICE_CLASS(klass); * dc->reset = my_device_reset; * } * * static const TypeInfo my_device_info = { * .name = TYPE_MY_DEVICE, * .parent = TYPE_DEVICE, * .instance_size = sizeof(MyDevice), * .class_init = my_device_class_init, * }; * * * * Introducing new virtual methods requires a class to define its own * struct and to add a .class_size member to the #TypeInfo. Each method * will also have a wrapper function to call it easily: * * * Defining an abstract class * * #include "qdev.h" * * typedef struct MyDeviceClass * { * DeviceClass parent; * * void (*frobnicate) (MyDevice *obj); * } MyDeviceClass; * * static const TypeInfo my_device_info = { * .name = TYPE_MY_DEVICE, * .parent = TYPE_DEVICE, * .instance_size = sizeof(MyDevice), * .abstract = true, // or set a default in my_device_class_init * .class_size = sizeof(MyDeviceClass), * }; * * void my_device_frobnicate(MyDevice *obj) * { * MyDeviceClass *klass = MY_DEVICE_GET_CLASS(obj); * * klass->frobnicate(obj); * } * * * * # Interfaces # * * Interfaces allow a limited form of multiple inheritance. Instances are * similar to normal types except for the fact that are only defined by * their classes and never carry any state. You can dynamically cast an object * to one of its #Interface types and vice versa. * * # Methods # * * A method is a function within the namespace scope of * a class. It usually operates on the object instance by passing it as a * strongly-typed first argument. * If it does not operate on an object instance, it is dubbed * class method. * * Methods cannot be overloaded. That is, the #ObjectClass and method name * uniquely identity the function to be called; the signature does not vary * except for trailing varargs. * * Methods are always virtual. Overriding a method in * #TypeInfo.class_init of a subclass leads to any user of the class obtained * via OBJECT_GET_CLASS() accessing the overridden function. * The original function is not automatically invoked. It is the responsibility * of the overriding class to determine whether and when to invoke the method * being overridden. * * To invoke the method being overridden, the preferred solution is to store * the original value in the overriding class before overriding the method. * This corresponds to |[ {super,base}.method(...) ]| in Java and C# * respectively; this frees the overriding class from hardcoding its parent * class, which someone might choose to change at some point. * * * Overriding a virtual method * * typedef struct MyState MyState; * * typedef void (*MyDoSomething)(MyState *obj); * * typedef struct MyClass { * ObjectClass parent_class; * * MyDoSomething do_something; * } MyClass; * * static void my_do_something(MyState *obj) * { * // do something * } * * static void my_class_init(ObjectClass *oc, void *data) * { * MyClass *mc = MY_CLASS(oc); * * mc->do_something = my_do_something; * } * * static const TypeInfo my_type_info = { * .name = TYPE_MY, * .parent = TYPE_OBJECT, * .instance_size = sizeof(MyState), * .class_size = sizeof(MyClass), * .class_init = my_class_init, * }; * * typedef struct DerivedClass { * MyClass parent_class; * * MyDoSomething parent_do_something; * } DerivedClass; * * static void derived_do_something(MyState *obj) * { * DerivedClass *dc = DERIVED_GET_CLASS(obj); * * // do something here * dc->parent_do_something(obj); * // do something else here * } * * static void derived_class_init(ObjectClass *oc, void *data) * { * MyClass *mc = MY_CLASS(oc); * DerivedClass *dc = DERIVED_CLASS(oc); * * dc->parent_do_something = mc->do_something; * mc->do_something = derived_do_something; * } * * static const TypeInfo derived_type_info = { * .name = TYPE_DERIVED, * .parent = TYPE_MY, * .class_size = sizeof(DerivedClass), * .class_init = derived_class_init, * }; * * * * Alternatively, object_class_by_name() can be used to obtain the class and * its non-overridden methods for a specific type. This would correspond to * |[ MyClass::method(...) ]| in C++. * * The first example of such a QOM method was #CPUClass.reset, * another example is #DeviceClass.realize. */ /** * ObjectPropertyAccessor: * @obj: the object that owns the property * @v: the visitor that contains the property data * @name: the name of the property * @opaque: the object property opaque * @errp: a pointer to an Error that is filled if getting/setting fails. * * Called when trying to get/set a property. */ typedef void (ObjectPropertyAccessor)(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp); /** * ObjectPropertyResolve: * @obj: the object that owns the property * @opaque: the opaque registered with the property * @part: the name of the property * * Resolves the #Object corresponding to property @part. * * The returned object can also be used as a starting point * to resolve a relative path starting with "@part". * * Returns: If @path is the path that led to @obj, the function * returns the #Object corresponding to "@path/@part". * If "@path/@part" is not a valid object path, it returns #NULL. */ typedef Object *(ObjectPropertyResolve)(Object *obj, void *opaque, const char *part); /** * ObjectPropertyRelease: * @obj: the object that owns the property * @name: the name of the property * @opaque: the opaque registered with the property * * Called when a property is removed from a object. */ typedef void (ObjectPropertyRelease)(Object *obj, const char *name, void *opaque); typedef struct ObjectProperty { gchar *name; gchar *type; gchar *description; ObjectPropertyAccessor *get; ObjectPropertyAccessor *set; ObjectPropertyResolve *resolve; ObjectPropertyRelease *release; void *opaque; } ObjectProperty; /** * ObjectUnparent: * @obj: the object that is being removed from the composition tree * * Called when an object is being removed from the QOM composition tree. * The function should remove any backlinks from children objects to @obj. */ typedef void (ObjectUnparent)(Object *obj); /** * ObjectFree: * @obj: the object being freed * * Called when an object's last reference is removed. */ typedef void (ObjectFree)(void *obj); /** * ObjectClass: * * The base for all classes. The only thing that #ObjectClass contains is an * integer type handle. */ struct ObjectClass { /*< private >*/ Type type; GSList *interfaces; const char *object_cast_cache[4]; const char *class_cast_cache[4]; ObjectUnparent *unparent; GHashTable *properties; }; /** * Object: * * The base for all objects. The first member of this object is a pointer to * a #ObjectClass. Since C guarantees that the first member of a structure * always begins at byte 0 of that structure, as long as any sub-object places * its parent as the first member, we can cast directly to a #Object. * * As a result, #Object contains a reference to the objects type as its * first member. This allows identification of the real type of the object at * run time. */ struct Object { /*< private >*/ ObjectClass *class; ObjectFree *free; GHashTable *properties; uint32_t ref; Object *parent; }; /** * TypeInfo: * @name: The name of the type. * @parent: The name of the parent type. * @instance_size: The size of the object (derivative of #Object). If * @instance_size is 0, then the size of the object will be the size of the * parent object. * @instance_init: This function is called to initialize an object. The parent * class will have already been initialized so the type is only responsible * for initializing its own members. * @instance_post_init: This function is called to finish initialization of * an object, after all @instance_init functions were called. * @instance_finalize: This function is called during object destruction. This * is called before the parent @instance_finalize function has been called. * An object should only free the members that are unique to its type in this * function. * @abstract: If this field is true, then the class is considered abstract and * cannot be directly instantiated. * @class_size: The size of the class object (derivative of #ObjectClass) * for this object. If @class_size is 0, then the size of the class will be * assumed to be the size of the parent class. This allows a type to avoid * implementing an explicit class type if they are not adding additional * virtual functions. * @class_init: This function is called after all parent class initialization * has occurred to allow a class to set its default virtual method pointers. * This is also the function to use to override virtual methods from a parent * class. * @class_base_init: This function is called for all base classes after all * parent class initialization has occurred, but before the class itself * is initialized. This is the function to use to undo the effects of * memcpy from the parent class to the descendants. * @class_finalize: This function is called during class destruction and is * meant to release and dynamic parameters allocated by @class_init. * @class_data: Data to pass to the @class_init, @class_base_init and * @class_finalize functions. This can be useful when building dynamic * classes. * @interfaces: The list of interfaces associated with this type. This * should point to a static array that's terminated with a zero filled * element. */ struct TypeInfo { const char *name; const char *parent; size_t instance_size; void (*instance_init)(Object *obj); void (*instance_post_init)(Object *obj); void (*instance_finalize)(Object *obj); # 477 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 477 "//qemu-2.11+dfsg/include/qom/object.h" abstract; size_t class_size; void (*class_init)(ObjectClass *klass, void *data); void (*class_base_init)(ObjectClass *klass, void *data); void (*class_finalize)(ObjectClass *klass, void *data); void *class_data; InterfaceInfo *interfaces; }; /** * OBJECT: * @obj: A derivative of #Object * * Converts an object to a #Object. Since all objects are #Objects, * this function will always succeed. */ /** * OBJECT_CLASS: * @class: A derivative of #ObjectClass. * * Converts a class to an #ObjectClass. Since all objects are #Objects, * this function will always succeed. */ /** * OBJECT_CHECK: * @type: The C type to use for the return value. * @obj: A derivative of @type to cast. * @name: The QOM typename of @type * * A type safe version of @object_dynamic_cast_assert. Typically each class * will define a macro based on this type to perform type safe dynamic_casts to * this object type. * * If an invalid object is passed to this function, a run time assert will be * generated. */ /** * OBJECT_CLASS_CHECK: * @class_type: The C type to use for the return value. * @class: A derivative class of @class_type to cast. * @name: the QOM typename of @class_type. * * A type safe version of @object_class_dynamic_cast_assert. This macro is * typically wrapped by each type to perform type safe casts of a class to a * specific class type. */ /** * OBJECT_GET_CLASS: * @class: The C type to use for the return value. * @obj: The object to obtain the class for. * @name: The QOM typename of @obj. * * This function will return a specific class for a given object. Its generally * used by each type to provide a type safe macro to get a specific class type * from an object. */ /** * InterfaceInfo: * @type: The name of the interface. * * The information associated with an interface. */ struct InterfaceInfo { const char *type; }; /** * InterfaceClass: * @parent_class: the base class * * The class for all interfaces. Subclasses of this class should only add * virtual methods. */ struct InterfaceClass { ObjectClass parent_class; /*< private >*/ ObjectClass *concrete_class; Type interface_type; }; /** * INTERFACE_CLASS: * @klass: class to cast from * Returns: An #InterfaceClass or raise an error if cast is invalid */ /** * INTERFACE_CHECK: * @interface: the type to return * @obj: the object to convert to an interface * @name: the interface type name * * Returns: @obj casted to @interface if cast is valid, otherwise raise error. */ /** * object_new: * @typename: The name of the type of the object to instantiate. * * This function will initialize a new object using heap allocated memory. * The returned object has a reference count of 1, and will be freed when * the last reference is dropped. * * Returns: The newly allocated and instantiated object. */ Object *object_new(const char *typename); /** * object_new_with_props: * @typename: The name of the type of the object to instantiate. * @parent: the parent object * @id: The unique ID of the object * @errp: pointer to error object * @...: list of property names and values * * This function will initialize a new object using heap allocated memory. * The returned object has a reference count of 1, and will be freed when * the last reference is dropped. * * The @id parameter will be used when registering the object as a * child of @parent in the composition tree. * * The variadic parameters are a list of pairs of (propname, propvalue) * strings. The propname of %NULL indicates the end of the property * list. If the object implements the user creatable interface, the * object will be marked complete once all the properties have been * processed. * * * Creating an object with properties * * Error *err = NULL; * Object *obj; * * obj = object_new_with_props(TYPE_MEMORY_BACKEND_FILE, * object_get_objects_root(), * "hostmem0", * &err, * "share", "yes", * "mem-path", "/dev/shm/somefile", * "prealloc", "yes", * "size", "1048576", * NULL); * * if (!obj) { * g_printerr("Cannot create memory backend: %s\n", * error_get_pretty(err)); * } * * * * The returned object will have one stable reference maintained * for as long as it is present in the object hierarchy. * * Returns: The newly allocated, instantiated & initialized object. */ Object *object_new_with_props(const char *typename, Object *parent, const char *id, Error **errp, ...) __attribute__((sentinel)); /** * object_new_with_propv: * @typename: The name of the type of the object to instantiate. * @parent: the parent object * @id: The unique ID of the object * @errp: pointer to error object * @vargs: list of property names and values * * See object_new_with_props() for documentation. */ Object *object_new_with_propv(const char *typename, Object *parent, const char *id, Error **errp, va_list vargs); /** * object_set_props: * @obj: the object instance to set properties on * @errp: pointer to error object * @...: list of property names and values * * This function will set a list of properties on an existing object * instance. * * The variadic parameters are a list of pairs of (propname, propvalue) * strings. The propname of %NULL indicates the end of the property * list. * * * Update an object's properties * * Error *err = NULL; * Object *obj = ...get / create object...; * * obj = object_set_props(obj, * &err, * "share", "yes", * "mem-path", "/dev/shm/somefile", * "prealloc", "yes", * "size", "1048576", * NULL); * * if (!obj) { * g_printerr("Cannot set properties: %s\n", * error_get_pretty(err)); * } * * * * The returned object will have one stable reference maintained * for as long as it is present in the object hierarchy. * * Returns: -1 on error, 0 on success */ int object_set_props(Object *obj, Error **errp, ...) __attribute__((sentinel)); /** * object_set_propv: * @obj: the object instance to set properties on * @errp: pointer to error object * @vargs: list of property names and values * * See object_set_props() for documentation. * * Returns: -1 on error, 0 on success */ int object_set_propv(Object *obj, Error **errp, va_list vargs); /** * object_initialize: * @obj: A pointer to the memory to be used for the object. * @size: The maximum size available at @obj for the object. * @typename: The name of the type of the object to instantiate. * * This function will initialize an object. The memory for the object should * have already been allocated. The returned object has a reference count of 1, * and will be finalized when the last reference is dropped. */ void object_initialize(void *obj, size_t size, const char *typename); /** * object_dynamic_cast: * @obj: The object to cast. * @typename: The @typename to cast to. * * This function will determine if @obj is-a @typename. @obj can refer to an * object or an interface associated with an object. * * Returns: This function returns @obj on success or #NULL on failure. */ Object *object_dynamic_cast(Object *obj, const char *typename); /** * object_dynamic_cast_assert: * * See object_dynamic_cast() for a description of the parameters of this * function. The only difference in behavior is that this function asserts * instead of returning #NULL on failure if QOM cast debugging is enabled. * This function is not meant to be called directly, but only through * the wrapper macro OBJECT_CHECK. */ Object *object_dynamic_cast_assert(Object *obj, const char *typename, const char *file, int line, const char *func); /** * object_get_class: * @obj: A derivative of #Object * * Returns: The #ObjectClass of the type associated with @obj. */ ObjectClass *object_get_class(Object *obj); /** * object_get_typename: * @obj: A derivative of #Object. * * Returns: The QOM typename of @obj. */ const char *object_get_typename(const Object *obj); /** * type_register_static: * @info: The #TypeInfo of the new type. * * @info and all of the strings it points to should exist for the life time * that the type is registered. * * Returns: the new #Type. */ Type type_register_static(const TypeInfo *info); /** * type_register: * @info: The #TypeInfo of the new type * * Unlike type_register_static(), this call does not require @info or its * string members to continue to exist after the call returns. * * Returns: the new #Type. */ Type type_register(const TypeInfo *info); /** * type_register_static_array: * @infos: The array of the new type #TypeInfo structures. * @nr_infos: number of entries in @infos * * @infos and all of the strings it points to should exist for the life time * that the type is registered. */ void type_register_static_array(const TypeInfo *infos, int nr_infos); /** * DEFINE_TYPES: * @type_array: The array containing #TypeInfo structures to register * * @type_array should be static constant that exists for the life time * that the type is registered. */ /** * object_class_dynamic_cast_assert: * @klass: The #ObjectClass to attempt to cast. * @typename: The QOM typename of the class to cast to. * * See object_class_dynamic_cast() for a description of the parameters * of this function. The only difference in behavior is that this function * asserts instead of returning #NULL on failure if QOM cast debugging is * enabled. This function is not meant to be called directly, but only through * the wrapper macros OBJECT_CLASS_CHECK and INTERFACE_CHECK. */ ObjectClass *object_class_dynamic_cast_assert(ObjectClass *klass, const char *typename, const char *file, int line, const char *func); /** * object_class_dynamic_cast: * @klass: The #ObjectClass to attempt to cast. * @typename: The QOM typename of the class to cast to. * * Returns: If @typename is a class, this function returns @klass if * @typename is a subtype of @klass, else returns #NULL. * * If @typename is an interface, this function returns the interface * definition for @klass if @klass implements it unambiguously; #NULL * is returned if @klass does not implement the interface or if multiple * classes or interfaces on the hierarchy leading to @klass implement * it. (FIXME: perhaps this can be detected at type definition time?) */ ObjectClass *object_class_dynamic_cast(ObjectClass *klass, const char *typename); /** * object_class_get_parent: * @klass: The class to obtain the parent for. * * Returns: The parent for @klass or %NULL if none. */ ObjectClass *object_class_get_parent(ObjectClass *klass); /** * object_class_get_name: * @klass: The class to obtain the QOM typename for. * * Returns: The QOM typename for @klass. */ const char *object_class_get_name(ObjectClass *klass); /** * object_class_is_abstract: * @klass: The class to obtain the abstractness for. * * Returns: %true if @klass is abstract, %false otherwise. */ # 892 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 892 "//qemu-2.11+dfsg/include/qom/object.h" object_class_is_abstract(ObjectClass *klass); /** * object_class_by_name: * @typename: The QOM typename to obtain the class for. * * Returns: The class for @typename or %NULL if not found. */ ObjectClass *object_class_by_name(const char *typename); void object_class_foreach(void (*fn)(ObjectClass *klass, void *opaque), const char *implements_type, # 903 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 903 "//qemu-2.11+dfsg/include/qom/object.h" include_abstract, void *opaque); /** * object_class_get_list: * @implements_type: The type to filter for, including its derivatives. * @include_abstract: Whether to include abstract classes. * * Returns: A singly-linked list of the classes in reverse hashtable order. */ GSList *object_class_get_list(const char *implements_type, # 914 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 914 "//qemu-2.11+dfsg/include/qom/object.h" include_abstract); /** * object_ref: * @obj: the object * * Increase the reference count of a object. A object cannot be freed as long * as its reference count is greater than zero. */ void object_ref(Object *obj); /** * object_unref: * @obj: the object * * Decrease the reference count of a object. A object cannot be freed as long * as its reference count is greater than zero. */ void object_unref(Object *obj); /** * object_property_add: * @obj: the object to add a property to * @name: the name of the property. This can contain any character except for * a forward slash. In general, you should use hyphens '-' instead of * underscores '_' when naming properties. * @type: the type name of the property. This namespace is pretty loosely * defined. Sub namespaces are constructed by using a prefix and then * to angle brackets. For instance, the type 'virtio-net-pci' in the * 'link' namespace would be 'link'. * @get: The getter to be called to read a property. If this is NULL, then * the property cannot be read. * @set: the setter to be called to write a property. If this is NULL, * then the property cannot be written. * @release: called when the property is removed from the object. This is * meant to allow a property to free its opaque upon object * destruction. This may be NULL. * @opaque: an opaque pointer to pass to the callbacks for the property * @errp: returns an error if this function fails * * Returns: The #ObjectProperty; this can be used to set the @resolve * callback for child and link properties. */ ObjectProperty *object_property_add(Object *obj, const char *name, const char *type, ObjectPropertyAccessor *get, ObjectPropertyAccessor *set, ObjectPropertyRelease *release, void *opaque, Error **errp); void object_property_del(Object *obj, const char *name, Error **errp); ObjectProperty *object_class_property_add(ObjectClass *klass, const char *name, const char *type, ObjectPropertyAccessor *get, ObjectPropertyAccessor *set, ObjectPropertyRelease *release, void *opaque, Error **errp); /** * object_property_find: * @obj: the object * @name: the name of the property * @errp: returns an error if this function fails * * Look up a property for an object and return its #ObjectProperty if found. */ ObjectProperty *object_property_find(Object *obj, const char *name, Error **errp); ObjectProperty *object_class_property_find(ObjectClass *klass, const char *name, Error **errp); typedef struct ObjectPropertyIterator { ObjectClass *nextclass; GHashTableIter iter; } ObjectPropertyIterator; /** * object_property_iter_init: * @obj: the object * * Initializes an iterator for traversing all properties * registered against an object instance, its class and all parent classes. * * It is forbidden to modify the property list while iterating, * whether removing or adding properties. * * Typical usage pattern would be * * * Using object property iterators * * ObjectProperty *prop; * ObjectPropertyIterator iter; * * object_property_iter_init(&iter, obj); * while ((prop = object_property_iter_next(&iter))) { * ... do something with prop ... * } * * */ void object_property_iter_init(ObjectPropertyIterator *iter, Object *obj); /** * object_property_iter_next: * @iter: the iterator instance * * Return the next available property. If no further properties * are available, a %NULL value will be returned and the @iter * pointer should not be used again after this point without * re-initializing it. * * Returns: the next property, or %NULL when all properties * have been traversed. */ ObjectProperty *object_property_iter_next(ObjectPropertyIterator *iter); void object_unparent(Object *obj); /** * object_property_get: * @obj: the object * @v: the visitor that will receive the property value. This should be an * Output visitor and the data will be written with @name as the name. * @name: the name of the property * @errp: returns an error if this function fails * * Reads a property from a object. */ void object_property_get(Object *obj, Visitor *v, const char *name, Error **errp); /** * object_property_set_str: * @value: the value to be written to the property * @name: the name of the property * @errp: returns an error if this function fails * * Writes a string value to a property. */ void object_property_set_str(Object *obj, const char *value, const char *name, Error **errp); /** * object_property_get_str: * @obj: the object * @name: the name of the property * @errp: returns an error if this function fails * * Returns: the value of the property, converted to a C string, or NULL if * an error occurs (including when the property value is not a string). * The caller should free the string. */ char *object_property_get_str(Object *obj, const char *name, Error **errp); /** * object_property_set_link: * @value: the value to be written to the property * @name: the name of the property * @errp: returns an error if this function fails * * Writes an object's canonical path to a property. */ void object_property_set_link(Object *obj, Object *value, const char *name, Error **errp); /** * object_property_get_link: * @obj: the object * @name: the name of the property * @errp: returns an error if this function fails * * Returns: the value of the property, resolved from a path to an Object, * or NULL if an error occurs (including when the property value is not a * string or not a valid object path). */ Object *object_property_get_link(Object *obj, const char *name, Error **errp); /** * object_property_set_bool: * @value: the value to be written to the property * @name: the name of the property * @errp: returns an error if this function fails * * Writes a bool value to a property. */ void object_property_set_bool(Object *obj, # 1104 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 1104 "//qemu-2.11+dfsg/include/qom/object.h" value, const char *name, Error **errp); /** * object_property_get_bool: * @obj: the object * @name: the name of the property * @errp: returns an error if this function fails * * Returns: the value of the property, converted to a boolean, or NULL if * an error occurs (including when the property value is not a bool). */ # 1116 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 1116 "//qemu-2.11+dfsg/include/qom/object.h" object_property_get_bool(Object *obj, const char *name, Error **errp); /** * object_property_set_int: * @value: the value to be written to the property * @name: the name of the property * @errp: returns an error if this function fails * * Writes an integer value to a property. */ void object_property_set_int(Object *obj, int64_t value, const char *name, Error **errp); /** * object_property_get_int: * @obj: the object * @name: the name of the property * @errp: returns an error if this function fails * * Returns: the value of the property, converted to an integer, or negative if * an error occurs (including when the property value is not an integer). */ int64_t object_property_get_int(Object *obj, const char *name, Error **errp); /** * object_property_set_uint: * @value: the value to be written to the property * @name: the name of the property * @errp: returns an error if this function fails * * Writes an unsigned integer value to a property. */ void object_property_set_uint(Object *obj, uint64_t value, const char *name, Error **errp); /** * object_property_get_uint: * @obj: the object * @name: the name of the property * @errp: returns an error if this function fails * * Returns: the value of the property, converted to an unsigned integer, or 0 * an error occurs (including when the property value is not an integer). */ uint64_t object_property_get_uint(Object *obj, const char *name, Error **errp); /** * object_property_get_enum: * @obj: the object * @name: the name of the property * @typename: the name of the enum data type * @errp: returns an error if this function fails * * Returns: the value of the property, converted to an integer, or * undefined if an error occurs (including when the property value is not * an enum). */ int object_property_get_enum(Object *obj, const char *name, const char *typename, Error **errp); /** * object_property_get_uint16List: * @obj: the object * @name: the name of the property * @list: the returned int list * @errp: returns an error if this function fails * * Returns: the value of the property, converted to integers, or * undefined if an error occurs (including when the property value is not * an list of integers). */ void object_property_get_uint16List(Object *obj, const char *name, uint16List **list, Error **errp); /** * object_property_set: * @obj: the object * @v: the visitor that will be used to write the property value. This should * be an Input visitor and the data will be first read with @name as the * name and then written as the property value. * @name: the name of the property * @errp: returns an error if this function fails * * Writes a property to a object. */ void object_property_set(Object *obj, Visitor *v, const char *name, Error **errp); /** * object_property_parse: * @obj: the object * @string: the string that will be used to parse the property value. * @name: the name of the property * @errp: returns an error if this function fails * * Parses a string and writes the result into a property of an object. */ void object_property_parse(Object *obj, const char *string, const char *name, Error **errp); /** * object_property_print: * @obj: the object * @name: the name of the property * @human: if true, print for human consumption * @errp: returns an error if this function fails * * Returns a string representation of the value of the property. The * caller shall free the string. */ char *object_property_print(Object *obj, const char *name, # 1229 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 1229 "//qemu-2.11+dfsg/include/qom/object.h" human, Error **errp); /** * object_property_get_type: * @obj: the object * @name: the name of the property * @errp: returns an error if this function fails * * Returns: The type name of the property. */ const char *object_property_get_type(Object *obj, const char *name, Error **errp); /** * object_get_root: * * Returns: the root object of the composition tree */ Object *object_get_root(void); /** * object_get_objects_root: * * Get the container object that holds user created * object instances. This is the object at path * "/objects" * * Returns: the user object container */ Object *object_get_objects_root(void); /** * object_get_internal_root: * * Get the container object that holds internally used object * instances. Any object which is put into this container must not be * user visible, and it will not be exposed in the QOM tree. * * Returns: the internal object container */ Object *object_get_internal_root(void); /** * object_get_canonical_path_component: * * Returns: The final component in the object's canonical path. The canonical * path is the path within the composition tree starting from the root. */ gchar *object_get_canonical_path_component(Object *obj); /** * object_get_canonical_path: * * Returns: The canonical path for a object. This is the path within the * composition tree starting from the root. */ gchar *object_get_canonical_path(Object *obj); /** * object_resolve_path: * @path: the path to resolve * @ambiguous: returns true if the path resolution failed because of an * ambiguous match * * There are two types of supported paths--absolute paths and partial paths. * * Absolute paths are derived from the root object and can follow child<> or * link<> properties. Since they can follow link<> properties, they can be * arbitrarily long. Absolute paths look like absolute filenames and are * prefixed with a leading slash. * * Partial paths look like relative filenames. They do not begin with a * prefix. The matching rules for partial paths are subtle but designed to make * specifying objects easy. At each level of the composition tree, the partial * path is matched as an absolute path. The first match is not returned. At * least two matches are searched for. A successful result is only returned if * only one match is found. If more than one match is found, a flag is * returned to indicate that the match was ambiguous. * * Returns: The matched object or NULL on path lookup failure. */ Object *object_resolve_path(const char *path, # 1312 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 1312 "//qemu-2.11+dfsg/include/qom/object.h" *ambiguous); /** * object_resolve_path_type: * @path: the path to resolve * @typename: the type to look for. * @ambiguous: returns true if the path resolution failed because of an * ambiguous match * * This is similar to object_resolve_path. However, when looking for a * partial path only matches that implement the given type are considered. * This restricts the search and avoids spuriously flagging matches as * ambiguous. * * For both partial and absolute paths, the return value goes through * a dynamic cast to @typename. This is important if either the link, * or the typename itself are of interface types. * * Returns: The matched object or NULL on path lookup failure. */ Object *object_resolve_path_type(const char *path, const char *typename, # 1333 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 1333 "//qemu-2.11+dfsg/include/qom/object.h" *ambiguous); /** * object_resolve_path_component: * @parent: the object in which to resolve the path * @part: the component to resolve. * * This is similar to object_resolve_path with an absolute path, but it * only resolves one element (@part) and takes the others from @parent. * * Returns: The resolved object or NULL on path lookup failure. */ Object *object_resolve_path_component(Object *parent, const gchar *part); /** * object_property_add_child: * @obj: the object to add a property to * @name: the name of the property * @child: the child object * @errp: if an error occurs, a pointer to an area to store the area * * Child properties form the composition tree. All objects need to be a child * of another object. Objects can only be a child of one object. * * There is no way for a child to determine what its parent is. It is not * a bidirectional relationship. This is by design. * * The value of a child property as a C string will be the child object's * canonical path. It can be retrieved using object_property_get_str(). * The child object itself can be retrieved using object_property_get_link(). */ void object_property_add_child(Object *obj, const char *name, Object *child, Error **errp); typedef enum { /* Unref the link pointer when the property is deleted */ OBJ_PROP_LINK_UNREF_ON_RELEASE = 0x1, } ObjectPropertyLinkFlags; /** * object_property_allow_set_link: * * The default implementation of the object_property_add_link() check() * callback function. It allows the link property to be set and never returns * an error. */ void object_property_allow_set_link(const Object *, const char *, Object *, Error **); /** * object_property_add_link: * @obj: the object to add a property to * @name: the name of the property * @type: the qobj type of the link * @child: a pointer to where the link object reference is stored * @check: callback to veto setting or NULL if the property is read-only * @flags: additional options for the link * @errp: if an error occurs, a pointer to an area to store the area * * Links establish relationships between objects. Links are unidirectional * although two links can be combined to form a bidirectional relationship * between objects. * * Links form the graph in the object model. * * The @check() callback is invoked when * object_property_set_link() is called and can raise an error to prevent the * link being set. If @check is NULL, the property is read-only * and cannot be set. * * Ownership of the pointer that @child points to is transferred to the * link property. The reference count for *@child is * managed by the property from after the function returns till the * property is deleted with object_property_del(). If the * @flags OBJ_PROP_LINK_UNREF_ON_RELEASE bit is set, * the reference count is decremented when the property is deleted. */ void object_property_add_link(Object *obj, const char *name, const char *type, Object **child, void (*check)(const Object *obj, const char *name, Object *val, Error **errp), ObjectPropertyLinkFlags flags, Error **errp); /** * object_property_add_str: * @obj: the object to add a property to * @name: the name of the property * @get: the getter or NULL if the property is write-only. This function must * return a string to be freed by g_free(). * @set: the setter or NULL if the property is read-only * @errp: if an error occurs, a pointer to an area to store the error * * Add a string property using getters/setters. This function will add a * property of type 'string'. */ void object_property_add_str(Object *obj, const char *name, char *(*get)(Object *, Error **), void (*set)(Object *, const char *, Error **), Error **errp); void object_class_property_add_str(ObjectClass *klass, const char *name, char *(*get)(Object *, Error **), void (*set)(Object *, const char *, Error **), Error **errp); /** * object_property_add_bool: * @obj: the object to add a property to * @name: the name of the property * @get: the getter or NULL if the property is write-only. * @set: the setter or NULL if the property is read-only * @errp: if an error occurs, a pointer to an area to store the error * * Add a bool property using getters/setters. This function will add a * property of type 'bool'. */ void object_property_add_bool(Object *obj, const char *name, # 1452 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 1452 "//qemu-2.11+dfsg/include/qom/object.h" (*get)(Object *, Error **), void (*set)(Object *, # 1453 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 1453 "//qemu-2.11+dfsg/include/qom/object.h" , Error **), Error **errp); void object_class_property_add_bool(ObjectClass *klass, const char *name, # 1457 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 1457 "//qemu-2.11+dfsg/include/qom/object.h" (*get)(Object *, Error **), void (*set)(Object *, # 1458 "//qemu-2.11+dfsg/include/qom/object.h" 3 4 _Bool # 1458 "//qemu-2.11+dfsg/include/qom/object.h" , Error **), Error **errp); /** * object_property_add_enum: * @obj: the object to add a property to * @name: the name of the property * @typename: the name of the enum data type * @get: the getter or %NULL if the property is write-only. * @set: the setter or %NULL if the property is read-only * @errp: if an error occurs, a pointer to an area to store the error * * Add an enum property using getters/setters. This function will add a * property of type '@typename'. */ void object_property_add_enum(Object *obj, const char *name, const char *typename, const QEnumLookup *lookup, int (*get)(Object *, Error **), void (*set)(Object *, int, Error **), Error **errp); void object_class_property_add_enum(ObjectClass *klass, const char *name, const char *typename, const QEnumLookup *lookup, int (*get)(Object *, Error **), void (*set)(Object *, int, Error **), Error **errp); /** * object_property_add_tm: * @obj: the object to add a property to * @name: the name of the property * @get: the getter or NULL if the property is write-only. * @errp: if an error occurs, a pointer to an area to store the error * * Add a read-only struct tm valued property using a getter function. * This function will add a property of type 'struct tm'. */ void object_property_add_tm(Object *obj, const char *name, void (*get)(Object *, struct tm *, Error **), Error **errp); void object_class_property_add_tm(ObjectClass *klass, const char *name, void (*get)(Object *, struct tm *, Error **), Error **errp); /** * object_property_add_uint8_ptr: * @obj: the object to add a property to * @name: the name of the property * @v: pointer to value * @errp: if an error occurs, a pointer to an area to store the error * * Add an integer property in memory. This function will add a * property of type 'uint8'. */ void object_property_add_uint8_ptr(Object *obj, const char *name, const uint8_t *v, Error **errp); void object_class_property_add_uint8_ptr(ObjectClass *klass, const char *name, const uint8_t *v, Error **errp); /** * object_property_add_uint16_ptr: * @obj: the object to add a property to * @name: the name of the property * @v: pointer to value * @errp: if an error occurs, a pointer to an area to store the error * * Add an integer property in memory. This function will add a * property of type 'uint16'. */ void object_property_add_uint16_ptr(Object *obj, const char *name, const uint16_t *v, Error **errp); void object_class_property_add_uint16_ptr(ObjectClass *klass, const char *name, const uint16_t *v, Error **errp); /** * object_property_add_uint32_ptr: * @obj: the object to add a property to * @name: the name of the property * @v: pointer to value * @errp: if an error occurs, a pointer to an area to store the error * * Add an integer property in memory. This function will add a * property of type 'uint32'. */ void object_property_add_uint32_ptr(Object *obj, const char *name, const uint32_t *v, Error **errp); void object_class_property_add_uint32_ptr(ObjectClass *klass, const char *name, const uint32_t *v, Error **errp); /** * object_property_add_uint64_ptr: * @obj: the object to add a property to * @name: the name of the property * @v: pointer to value * @errp: if an error occurs, a pointer to an area to store the error * * Add an integer property in memory. This function will add a * property of type 'uint64'. */ void object_property_add_uint64_ptr(Object *obj, const char *name, const uint64_t *v, Error **Errp); void object_class_property_add_uint64_ptr(ObjectClass *klass, const char *name, const uint64_t *v, Error **Errp); /** * object_property_add_alias: * @obj: the object to add a property to * @name: the name of the property * @target_obj: the object to forward property access to * @target_name: the name of the property on the forwarded object * @errp: if an error occurs, a pointer to an area to store the error * * Add an alias for a property on an object. This function will add a property * of the same type as the forwarded property. * * The caller must ensure that @target_obj stays alive as long as * this property exists. In the case of a child object or an alias on the same * object this will be the case. For aliases to other objects the caller is * responsible for taking a reference. */ void object_property_add_alias(Object *obj, const char *name, Object *target_obj, const char *target_name, Error **errp); /** * object_property_add_const_link: * @obj: the object to add a property to * @name: the name of the property * @target: the object to be referred by the link * @errp: if an error occurs, a pointer to an area to store the error * * Add an unmodifiable link for a property on an object. This function will * add a property of type link where TYPE is the type of @target. * * The caller must ensure that @target stays alive as long as * this property exists. In the case @target is a child of @obj, * this will be the case. Otherwise, the caller is responsible for * taking a reference. */ void object_property_add_const_link(Object *obj, const char *name, Object *target, Error **errp); /** * object_property_set_description: * @obj: the object owning the property * @name: the name of the property * @description: the description of the property on the object * @errp: if an error occurs, a pointer to an area to store the error * * Set an object property's description. * */ void object_property_set_description(Object *obj, const char *name, const char *description, Error **errp); void object_class_property_set_description(ObjectClass *klass, const char *name, const char *description, Error **errp); /** * object_child_foreach: * @obj: the object whose children will be navigated * @fn: the iterator function to be called * @opaque: an opaque value that will be passed to the iterator * * Call @fn passing each child of @obj and @opaque to it, until @fn returns * non-zero. * * It is forbidden to add or remove children from @obj from the @fn * callback. * * Returns: The last value returned by @fn, or 0 if there is no child. */ int object_child_foreach(Object *obj, int (*fn)(Object *child, void *opaque), void *opaque); /** * object_child_foreach_recursive: * @obj: the object whose children will be navigated * @fn: the iterator function to be called * @opaque: an opaque value that will be passed to the iterator * * Call @fn passing each child of @obj and @opaque to it, until @fn returns * non-zero. Calls recursively, all child nodes of @obj will also be passed * all the way down to the leaf nodes of the tree. Depth first ordering. * * It is forbidden to add or remove children from @obj (or its * child nodes) from the @fn callback. * * Returns: The last value returned by @fn, or 0 if there is no child. */ int object_child_foreach_recursive(Object *obj, int (*fn)(Object *child, void *opaque), void *opaque); /** * container_get: * @root: root of the #path, e.g., object_get_root() * @path: path to the container * * Return a container object whose path is @path. Create more containers * along the path if necessary. * * Returns: the container object. */ Object *container_get(Object *root, const char *path); /** * object_type_get_instance_size: * @typename: Name of the Type whose instance_size is required * * Returns the instance_size of the given @typename. */ size_t object_type_get_instance_size(const char *typename); # 8 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 2 # 1 "//qemu-2.11+dfsg/include/hw/irq.h" 1 /* Generic IRQ/GPIO pin infrastructure. */ typedef struct IRQState *qemu_irq; typedef void (*qemu_irq_handler)(void *opaque, int n, int level); void qemu_set_irq(qemu_irq irq, int level); static inline void qemu_irq_raise(qemu_irq irq) { qemu_set_irq(irq, 1); } static inline void qemu_irq_lower(qemu_irq irq) { qemu_set_irq(irq, 0); } static inline void qemu_irq_pulse(qemu_irq irq) { qemu_set_irq(irq, 1); qemu_set_irq(irq, 0); } /* Returns an array of N IRQs. Each IRQ is assigned the argument handler and * opaque data. */ qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n); /* * Allocates a single IRQ. The irq is assigned with a handler, an opaque * data and the interrupt number. */ qemu_irq qemu_allocate_irq(qemu_irq_handler handler, void *opaque, int n); /* Extends an Array of IRQs. Old IRQs have their handlers and opaque data * preserved. New IRQs are assigned the argument handler and opaque data. */ qemu_irq *qemu_extend_irqs(qemu_irq *old, int n_old, qemu_irq_handler handler, void *opaque, int n); void qemu_free_irqs(qemu_irq *s, int n); void qemu_free_irq(qemu_irq irq); /* Returns a new IRQ with opposite polarity. */ qemu_irq qemu_irq_invert(qemu_irq irq); /* Returns a new IRQ which feeds into both the passed IRQs */ qemu_irq qemu_irq_split(qemu_irq irq1, qemu_irq irq2); /* Returns a new IRQ set which connects 1:1 to another IRQ set, which * may be set later. */ qemu_irq *qemu_irq_proxy(qemu_irq **target, int n); /* For internal use in qtest. Similar to qemu_irq_split, but operating on an existing vector of qemu_irq. */ void qemu_irq_intercept_in(qemu_irq *gpio_in, qemu_irq_handler handler, int n); # 9 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 2 # 1 "//qemu-2.11+dfsg/include/hw/hotplug.h" 1 /* * Hotplug handler interface. * * Copyright (c) 2014 Red Hat Inc. * * Authors: * Igor Mammedov , * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qom/object.h" 1 /* * QEMU Object Model * * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * */ # 16 "//qemu-2.11+dfsg/include/hw/hotplug.h" 2 # 27 "//qemu-2.11+dfsg/include/hw/hotplug.h" typedef struct HotplugHandler { /* */ Object Parent; } HotplugHandler; /** * hotplug_fn: * @plug_handler: a device performing plug/uplug action * @plugged_dev: a device that has been (un)plugged * @errp: returns an error if this function fails */ typedef void (*hotplug_fn)(HotplugHandler *plug_handler, DeviceState *plugged_dev, Error **errp); /** * HotplugDeviceClass: * * Interface to be implemented by a device performing * hardware (un)plug functions. * * @parent: Opaque parent interface. * @pre_plug: pre plug callback called at start of device.realize(true) * @plug: plug callback called at end of device.realize(true). * @unplug_request: unplug request callback. * Used as a means to initiate device unplug for devices that * require asynchronous unplug handling. * @unplug: unplug callback. * Used for device removal with devices that implement * asynchronous and synchronous (surprise) removal. */ typedef struct HotplugHandlerClass { /* */ InterfaceClass parent; /* */ hotplug_fn pre_plug; hotplug_fn plug; hotplug_fn unplug_request; hotplug_fn unplug; } HotplugHandlerClass; /** * hotplug_handler_plug: * * Call #HotplugHandlerClass.plug callback of @plug_handler. */ void hotplug_handler_plug(HotplugHandler *plug_handler, DeviceState *plugged_dev, Error **errp); /** * hotplug_handler_pre_plug: * * Call #HotplugHandlerClass.pre_plug callback of @plug_handler. */ void hotplug_handler_pre_plug(HotplugHandler *plug_handler, DeviceState *plugged_dev, Error **errp); /** * hotplug_handler_unplug_request: * * Calls #HotplugHandlerClass.unplug_request callback of @plug_handler. */ void hotplug_handler_unplug_request(HotplugHandler *plug_handler, DeviceState *plugged_dev, Error **errp); /** * hotplug_handler_unplug: * * Calls #HotplugHandlerClass.unplug callback of @plug_handler. */ void hotplug_handler_unplug(HotplugHandler *plug_handler, DeviceState *plugged_dev, Error **errp); # 10 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 2 enum { DEV_NVECTORS_UNSPECIFIED = -1, }; typedef enum DeviceCategory { DEVICE_CATEGORY_BRIDGE, DEVICE_CATEGORY_USB, DEVICE_CATEGORY_STORAGE, DEVICE_CATEGORY_NETWORK, DEVICE_CATEGORY_INPUT, DEVICE_CATEGORY_DISPLAY, DEVICE_CATEGORY_SOUND, DEVICE_CATEGORY_MISC, DEVICE_CATEGORY_CPU, DEVICE_CATEGORY_MAX } DeviceCategory; typedef int (*qdev_initfn)(DeviceState *dev); typedef int (*qdev_event)(DeviceState *dev); typedef void (*qdev_resetfn)(DeviceState *dev); typedef void (*DeviceRealize)(DeviceState *dev, Error **errp); typedef void (*DeviceUnrealize)(DeviceState *dev, Error **errp); typedef void (*BusRealize)(BusState *bus, Error **errp); typedef void (*BusUnrealize)(BusState *bus, Error **errp); struct VMStateDescription; /** * DeviceClass: * @props: Properties accessing state fields. * @realize: Callback function invoked when the #DeviceState:realized * property is changed to %true. The default invokes @init if not %NULL. * @unrealize: Callback function invoked when the #DeviceState:realized * property is changed to %false. * @init: Callback function invoked when the #DeviceState::realized property * is changed to %true. Deprecated, new types inheriting directly from * TYPE_DEVICE should use @realize instead, new leaf types should consult * their respective parent type. * @hotpluggable: indicates if #DeviceClass is hotpluggable, available * as readonly "hotpluggable" property of #DeviceState instance * * # Realization # * Devices are constructed in two stages, * 1) object instantiation via object_initialize() and * 2) device realization via #DeviceState:realized property. * The former may not fail (it might assert or exit), the latter may return * error information to the caller and must be re-entrant. * Trivial field initializations should go into #TypeInfo.instance_init. * Operations depending on @props static properties should go into @realize. * After successful realization, setting static properties will fail. * * As an interim step, the #DeviceState:realized property can also be * set with qdev_init_nofail(). * In the future, devices will propagate this state change to their children * and along busses they expose. * The point in time will be deferred to machine creation, so that values * set in @realize will not be introspectable beforehand. Therefore devices * must not create children during @realize; they should initialize them via * object_initialize() in their own #TypeInfo.instance_init and forward the * realization events appropriately. * * The @init callback is considered private to a particular bus implementation * (immediate abstract child types of TYPE_DEVICE). Derived leaf types set an * "init" callback on their parent class instead. * * Any type may override the @realize and/or @unrealize callbacks but needs * to call the parent type's implementation if keeping their functionality * is desired. Refer to QOM documentation for further discussion and examples. * * * * If a type derived directly from TYPE_DEVICE implements @realize, it does * not need to implement @init and therefore does not need to store and call * #DeviceClass' default @realize callback. * For other types consult the documentation and implementation of the * respective parent types. * * */ typedef struct DeviceClass { /*< private >*/ ObjectClass parent_class; /*< public >*/ unsigned long categories[(((DEVICE_CATEGORY_MAX) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; const char *fw_name; const char *desc; Property *props; /* * Can this device be instantiated with -device / device_add? * All devices should support instantiation with device_add, and * this flag should not exist. But we're not there, yet. Some * devices fail to instantiate with cryptic error messages. * Others instantiate, but don't work. Exposing users to such * behavior would be cruel; clearing this flag will protect them. * It should never be cleared without a comment explaining why it * is cleared. * TODO remove once we're there */ # 116 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 116 "//qemu-2.11+dfsg/include/hw/qdev-core.h" user_creatable; # 117 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 117 "//qemu-2.11+dfsg/include/hw/qdev-core.h" hotpluggable; /* callbacks */ void (*reset)(DeviceState *dev); DeviceRealize realize; DeviceUnrealize unrealize; /* device state */ const struct VMStateDescription *vmsd; /* Private to qdev / bus. */ qdev_initfn init; /* TODO remove, once users are converted to realize */ qdev_event exit; /* TODO remove, once users are converted to unrealize */ const char *bus_type; } DeviceClass; typedef struct NamedGPIOList NamedGPIOList; struct NamedGPIOList { char *name; qemu_irq *in; int num_in; int num_out; struct { struct NamedGPIOList *le_next; /* next element */ struct NamedGPIOList **le_prev; /* address of previous next element */ } node; }; /** * DeviceState: * @realized: Indicates whether the device has been fully constructed. * * This structure should not be accessed directly. We declare it here * so that it can be embedded in individual device state structures. */ struct DeviceState { /*< private >*/ Object parent_obj; /*< public >*/ const char *id; char *canonical_path; # 157 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 157 "//qemu-2.11+dfsg/include/hw/qdev-core.h" realized; # 158 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 158 "//qemu-2.11+dfsg/include/hw/qdev-core.h" pending_deleted_event; QemuOpts *opts; int hotplugged; BusState *parent_bus; struct { struct NamedGPIOList *lh_first; /* first element */ } gpios; struct { struct BusState *lh_first; /* first element */ } child_bus; int num_child_bus; int instance_id_alias; int alias_required_for_version; }; struct DeviceListener { void (*realize)(DeviceListener *listener, DeviceState *dev); void (*unrealize)(DeviceListener *listener, DeviceState *dev); struct { struct DeviceListener *tqe_next; /* next element */ struct DeviceListener * *tqe_prev; /* address of previous next element */} link; }; struct BusClass { ObjectClass parent_class; /* FIXME first arg should be BusState */ void (*print_dev)(Monitor *mon, DeviceState *dev, int indent); char *(*get_dev_path)(DeviceState *dev); /* * This callback is used to create Open Firmware device path in accordance * with OF spec http://forthworks.com/standards/of1275.pdf. Individual bus * bindings can be found at http://playground.sun.com/1275/bindings/. */ char *(*get_fw_dev_path)(DeviceState *dev); void (*reset)(BusState *bus); BusRealize realize; BusUnrealize unrealize; /* maximum devices allowed on the bus, 0: no limit. */ int max_dev; /* number of automatically allocated bus ids (e.g. ide.0) */ int automatic_ids; }; typedef struct BusChild { DeviceState *child; int index; struct { struct BusChild *tqe_next; /* next element */ struct BusChild * *tqe_prev; /* address of previous next element */} sibling; } BusChild; /** * BusState: * @hotplug_device: link to a hotplug device associated with bus. */ struct BusState { Object obj; DeviceState *parent; char *name; HotplugHandler *hotplug_handler; int max_index; # 220 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 220 "//qemu-2.11+dfsg/include/hw/qdev-core.h" realized; struct ChildrenHead { struct BusChild *tqh_first; /* first element */ struct BusChild * *tqh_last; /* addr of last next element */ } children; struct { struct BusState *le_next; /* next element */ struct BusState **le_prev; /* address of previous next element */ } sibling; }; /** * Property: * @set_default: true if the default value should be set from @defval, * in which case @info->set_default_value must not be NULL * (if false then no default value is set by the property system * and the field retains whatever value it was given by instance_init). * @defval: default value for the property. This is used only if @set_default * is true. */ struct Property { const char *name; const PropertyInfo *info; ptrdiff_t offset; uint8_t bitnr; # 239 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 239 "//qemu-2.11+dfsg/include/hw/qdev-core.h" set_default; union { int64_t i; uint64_t u; } defval; int arrayoffset; const PropertyInfo *arrayinfo; int arrayfieldsize; const char *link_type; }; struct PropertyInfo { const char *name; const char *description; const QEnumLookup *enum_table; int (*print)(DeviceState *dev, Property *prop, char *dest, size_t len); void (*set_default_value)(Object *obj, const Property *prop); void (*create)(Object *obj, Property *prop, Error **errp); ObjectPropertyAccessor *get; ObjectPropertyAccessor *set; ObjectPropertyRelease *release; }; /** * GlobalProperty: * @user_provided: Set to true if property comes from user-provided config * (command-line or config file). * @used: Set to true if property was used when initializing a device. * @errp: Error destination, used like first argument of error_setg() * in case property setting fails later. If @errp is NULL, we * print warnings instead of ignoring errors silently. For * hotplugged devices, errp is always ignored and warnings are * printed instead. */ typedef struct GlobalProperty { const char *driver; const char *property; const char *value; # 277 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 277 "//qemu-2.11+dfsg/include/hw/qdev-core.h" user_provided; # 278 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 278 "//qemu-2.11+dfsg/include/hw/qdev-core.h" used; Error **errp; } GlobalProperty; /*** Board API. This should go away once we have a machine config file. ***/ DeviceState *qdev_create(BusState *bus, const char *name); DeviceState *qdev_try_create(BusState *bus, const char *name); void qdev_init_nofail(DeviceState *dev); void qdev_set_legacy_instance_id(DeviceState *dev, int alias_id, int required_for_version); HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev); void qdev_unplug(DeviceState *dev, Error **errp); void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp); void qdev_machine_creation_done(void); # 294 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 294 "//qemu-2.11+dfsg/include/hw/qdev-core.h" qdev_machine_modified(void); qemu_irq qdev_get_gpio_in(DeviceState *dev, int n); qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const char *name, int n); void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq pin); void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, qemu_irq pin); qemu_irq qdev_get_gpio_out_connector(DeviceState *dev, const char *name, int n); qemu_irq qdev_intercept_gpio_out(DeviceState *dev, qemu_irq icpt, const char *name, int n); BusState *qdev_get_child_bus(DeviceState *dev, const char *name); /*** Device API. ***/ /* Register device properties. */ /* GPIO inputs also double as IRQ sinks. */ void qdev_init_gpio_in(DeviceState *dev, qemu_irq_handler handler, int n); void qdev_init_gpio_out(DeviceState *dev, qemu_irq *pins, int n); void qdev_init_gpio_in_named(DeviceState *dev, qemu_irq_handler handler, const char *name, int n); void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq *pins, const char *name, int n); void qdev_pass_gpios(DeviceState *dev, DeviceState *container, const char *name); BusState *qdev_get_parent_bus(DeviceState *dev); /*** BUS API. ***/ DeviceState *qdev_find_recursive(BusState *bus, const char *id); /* Returns 0 to walk children, > 0 to skip walk, < 0 to terminate walk. */ typedef int (qbus_walkerfn)(BusState *bus, void *opaque); typedef int (qdev_walkerfn)(DeviceState *dev, void *opaque); void qbus_create_inplace(void *bus, size_t size, const char *typename, DeviceState *parent, const char *name); BusState *qbus_create(const char *typename, DeviceState *parent, const char *name); /* Returns > 0 if either devfn or busfn skip walk somewhere in cursion, * < 0 if either devfn or busfn terminate walk somewhere in cursion, * 0 otherwise. */ int qbus_walk_children(BusState *bus, qdev_walkerfn *pre_devfn, qbus_walkerfn *pre_busfn, qdev_walkerfn *post_devfn, qbus_walkerfn *post_busfn, void *opaque); int qdev_walk_children(DeviceState *dev, qdev_walkerfn *pre_devfn, qbus_walkerfn *pre_busfn, qdev_walkerfn *post_devfn, qbus_walkerfn *post_busfn, void *opaque); void qdev_reset_all(DeviceState *dev); void qdev_reset_all_fn(void *opaque); /** * @qbus_reset_all: * @bus: Bus to be reset. * * Reset @bus and perform a bus-level ("hard") reset of all devices connected * to it, including recursive processing of all buses below @bus itself. A * hard reset means that qbus_reset_all will reset all state of the device. * For PCI devices, for example, this will include the base address registers * or configuration space. */ void qbus_reset_all(BusState *bus); void qbus_reset_all_fn(void *opaque); /* This should go away once we get rid of the NULL bus hack */ BusState *sysbus_get_default(void); char *qdev_get_fw_dev_path(DeviceState *dev); char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev); /** * @qdev_machine_init * * Initialize platform devices before machine init. This is a hack until full * support for composition is added. */ void qdev_machine_init(void); /** * @device_reset * * Reset a single device (by calling the reset method). */ void device_reset(DeviceState *dev); const struct VMStateDescription *qdev_get_vmsd(DeviceState *dev); const char *qdev_fw_name(DeviceState *dev); Object *qdev_get_machine(void); /* FIXME: make this a link<> */ void qdev_set_parent_bus(DeviceState *dev, BusState *bus); extern # 393 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 393 "//qemu-2.11+dfsg/include/hw/qdev-core.h" qdev_hotplug; extern # 394 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 394 "//qemu-2.11+dfsg/include/hw/qdev-core.h" qdev_hot_removed; char *qdev_get_dev_path(DeviceState *dev); GSList *qdev_build_hotpluggable_device_list(Object *peripheral); void qbus_set_hotplug_handler(BusState *bus, DeviceState *handler, Error **errp); void qbus_set_bus_hotplug_handler(BusState *bus, Error **errp); static inline # 405 "//qemu-2.11+dfsg/include/hw/qdev-core.h" 3 4 _Bool # 405 "//qemu-2.11+dfsg/include/hw/qdev-core.h" qbus_is_hotpluggable(BusState *bus) { return bus->hotplug_handler; } void device_listener_register(DeviceListener *listener); void device_listener_unregister(DeviceListener *listener); # 24 "//qemu-2.11+dfsg/include/qom/cpu.h" 2 # 1 "//qemu-2.11+dfsg/include/disas/bfd.h" 1 /* Interface between the opcode library and its callers. Written by Cygnus Support, 1993. The opcode library (libopcodes.a) provides instruction decoders for a large variety of instruction sets, callable with an identical interface, for making instruction-processing programs more independent of the instruction set being processed. */ # 1 "//qemu-2.11+dfsg/include/qemu/fprintf-fn.h" 1 /* * Typedef for fprintf-alike function pointers. * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ # 13 "//qemu-2.11+dfsg/include/disas/bfd.h" 2 typedef void *PTR; typedef uint64_t bfd_vma; typedef int64_t bfd_signed_vma; typedef uint8_t bfd_byte; enum bfd_flavour { bfd_target_unknown_flavour, bfd_target_aout_flavour, bfd_target_coff_flavour, bfd_target_ecoff_flavour, bfd_target_elf_flavour, bfd_target_ieee_flavour, bfd_target_nlm_flavour, bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, bfd_target_ihex_flavour, bfd_target_som_flavour, bfd_target_os9k_flavour, bfd_target_versados_flavour, bfd_target_msdos_flavour, bfd_target_evax_flavour }; enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; enum bfd_architecture { bfd_arch_unknown, /* File arch not known */ bfd_arch_obscure, /* Arch known, not one of these */ bfd_arch_m68k, /* Motorola 68xxx */ # 67 "//qemu-2.11+dfsg/include/disas/bfd.h" bfd_arch_vax, /* DEC Vax */ bfd_arch_i960, /* Intel 960 */ /* The order of the following is important. lower number indicates a machine type that only accepts a subset of the instructions available to machines with higher numbers. The exception is the "ca", which is incompatible with all other machines except "core". */ # 86 "//qemu-2.11+dfsg/include/disas/bfd.h" bfd_arch_a29k, /* AMD 29000 */ bfd_arch_sparc, /* SPARC */ /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ # 99 "//qemu-2.11+dfsg/include/disas/bfd.h" /* Nonzero if MACH has the v9 instruction set. */ bfd_arch_mips, /* MIPS Rxxxx */ # 118 "//qemu-2.11+dfsg/include/disas/bfd.h" bfd_arch_i386, /* Intel 386 */ bfd_arch_we32k, /* AT&T WE32xxx */ bfd_arch_tahoe, /* CCI/Harris Tahoe */ bfd_arch_i860, /* Intel 860 */ bfd_arch_romp, /* IBM ROMP PC/RT */ bfd_arch_alliant, /* Alliant */ bfd_arch_convex, /* Convex */ bfd_arch_m88k, /* Motorola 88xxx */ bfd_arch_pyramid, /* Pyramid Technology */ bfd_arch_h8300, /* Hitachi H8/300 */ bfd_arch_powerpc, /* PowerPC */ # 156 "//qemu-2.11+dfsg/include/disas/bfd.h" bfd_arch_rs6000, /* IBM RS/6000 */ bfd_arch_hppa, /* HP PA RISC */ bfd_arch_d10v, /* Mitsubishi D10V */ bfd_arch_z8k, /* Zilog Z8000 */ bfd_arch_h8500, /* Hitachi H8/500 */ bfd_arch_sh, /* Hitachi SH */ # 185 "//qemu-2.11+dfsg/include/disas/bfd.h" bfd_arch_alpha, /* Dec Alpha */ bfd_arch_arm, /* Advanced Risc Machines ARM */ # 205 "//qemu-2.11+dfsg/include/disas/bfd.h" bfd_arch_ns32k, /* National Semiconductors ns32000 */ bfd_arch_w65, /* WDC 65816 */ bfd_arch_tic30, /* Texas Instruments TMS320C30 */ bfd_arch_v850, /* NEC V850 */ bfd_arch_arc, /* Argonaut RISC Core */ bfd_arch_m32r, /* Mitsubishi M32R/D */ bfd_arch_mn10200, /* Matsushita MN10200 */ bfd_arch_mn10300, /* Matsushita MN10300 */ bfd_arch_cris, /* Axis CRIS */ bfd_arch_microblaze, /* Xilinx MicroBlaze. */ bfd_arch_moxie, /* The Moxie core. */ bfd_arch_ia64, /* HP/Intel ia64 */ bfd_arch_nios2, /* Nios II */ bfd_arch_lm32, /* Lattice Mico32 */ bfd_arch_last }; typedef struct symbol_cache_entry { const char *name; union { PTR p; bfd_vma i; } udata; } asymbol; enum dis_insn_type { dis_noninsn, /* Not a valid instruction */ dis_nonbranch, /* Not a branch instruction */ dis_branch, /* Unconditional branch */ dis_condbranch, /* Conditional branch */ dis_jsr, /* Jump to subroutine */ dis_condjsr, /* Conditional jump to subroutine */ dis_dref, /* Data reference instruction */ dis_dref2 /* Two data references in instruction */ }; /* This struct is passed into the instruction decoding routine, and is passed back out into each callback. The various fields are used for conveying information from your main routine into your callbacks, for passing information into the instruction decoders (such as the addresses of the callback functions), or for passing information back from the instruction decoders to their callers. It must be initialized before it is first passed; this can be done by hand, or using one of the initialization macros below. */ typedef struct disassemble_info { fprintf_function fprintf_func; FILE *stream; PTR application_data; /* Target description. We could replace this with a pointer to the bfd, but that would require one. There currently isn't any such requirement so to avoid introducing one we record these explicitly. */ /* The bfd_flavour. This can be bfd_target_unknown_flavour. */ enum bfd_flavour flavour; /* The bfd_arch value. */ enum bfd_architecture arch; /* The bfd_mach value. */ unsigned long mach; /* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */ enum bfd_endian endian; /* An array of pointers to symbols either at the location being disassembled or at the start of the function being disassembled. The array is sorted so that the first symbol is intended to be the one used. The others are present for any misc. purposes. This is not set reliably, but if it is not NULL, it is correct. */ asymbol **symbols; /* Number of symbols in array. */ int num_symbols; /* For use by the disassembler. The top 16 bits are reserved for public use (and are documented here). The bottom 16 bits are for the internal use of the disassembler. */ unsigned long flags; PTR private_data; /* Function used to get bytes to disassemble. MEMADDR is the address of the stuff to be disassembled, MYADDR is the address to put the bytes in, and LENGTH is the number of bytes to read. INFO is a pointer to this struct. Returns an errno value or 0 for success. */ int (*read_memory_func) (bfd_vma memaddr, bfd_byte *myaddr, int length, struct disassemble_info *info); /* Function which should be called if we get an error that we can't recover from. STATUS is the errno value from read_memory_func and MEMADDR is the address that we were trying to read. INFO is a pointer to this struct. */ void (*memory_error_func) (int status, bfd_vma memaddr, struct disassemble_info *info); /* Function called to print ADDR. */ void (*print_address_func) (bfd_vma addr, struct disassemble_info *info); /* Function called to print an instruction. The function is architecture * specific. */ int (*print_insn)(bfd_vma addr, struct disassemble_info *info); /* Function called to determine if there is a symbol at the given ADDR. If there is, the function returns 1, otherwise it returns 0. This is used by ports which support an overlay manager where the overlay number is held in the top part of an address. In some circumstances we want to include the overlay number in the address, (normally because there is a symbol associated with that address), but sometimes we want to mask out the overlay bits. */ int (* symbol_at_address_func) (bfd_vma addr, struct disassemble_info * info); /* These are for buffer_read_memory. */ bfd_byte *buffer; bfd_vma buffer_vma; int buffer_length; /* This variable may be set by the instruction decoder. It suggests the number of bytes objdump should display on a single line. If the instruction decoder sets this, it should always set it to the same value in order to get reasonable looking output. */ int bytes_per_line; /* the next two variables control the way objdump displays the raw data */ /* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */ /* output will look like this: 00: 00000000 00000000 with the chunks displayed according to "display_endian". */ int bytes_per_chunk; enum bfd_endian display_endian; /* Results from instruction decoders. Not all decoders yet support this information. This info is set each time an instruction is decoded, and is only valid for the last such instruction. To determine whether this decoder supports this information, set insn_info_valid to 0, decode an instruction, then check it. */ char insn_info_valid; /* Branch info has been set. */ char branch_delay_insns; /* How many sequential insn's will run before a branch takes effect. (0 = normal) */ char data_size; /* Size of data reference in insn, in bytes */ enum dis_insn_type insn_type; /* Type of instruction */ bfd_vma target; /* Target address of branch or dref, if known; zero if unknown. */ bfd_vma target2; /* Second target address for dref2 */ /* Command line options specific to the target disassembler. */ char * disassembler_options; /* Options for Capstone disassembly. */ int cap_arch; int cap_mode; int cap_insn_unit; int cap_insn_split; } disassemble_info; /* Standard disassemblers. Disassemble one instruction at the given target address. Return number of bytes processed. */ typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *); int print_insn_tci(bfd_vma, disassemble_info*); int print_insn_big_mips (bfd_vma, disassemble_info*); int print_insn_little_mips (bfd_vma, disassemble_info*); int print_insn_i386 (bfd_vma, disassemble_info*); int print_insn_m68k (bfd_vma, disassemble_info*); int print_insn_z8001 (bfd_vma, disassemble_info*); int print_insn_z8002 (bfd_vma, disassemble_info*); int print_insn_h8300 (bfd_vma, disassemble_info*); int print_insn_h8300h (bfd_vma, disassemble_info*); int print_insn_h8300s (bfd_vma, disassemble_info*); int print_insn_h8500 (bfd_vma, disassemble_info*); int print_insn_arm_a64 (bfd_vma, disassemble_info*); int print_insn_alpha (bfd_vma, disassemble_info*); disassembler_ftype arc_get_disassembler (int, int); int print_insn_arm (bfd_vma, disassemble_info*); int print_insn_sparc (bfd_vma, disassemble_info*); int print_insn_big_a29k (bfd_vma, disassemble_info*); int print_insn_little_a29k (bfd_vma, disassemble_info*); int print_insn_i960 (bfd_vma, disassemble_info*); int print_insn_sh (bfd_vma, disassemble_info*); int print_insn_shl (bfd_vma, disassemble_info*); int print_insn_hppa (bfd_vma, disassemble_info*); int print_insn_m32r (bfd_vma, disassemble_info*); int print_insn_m88k (bfd_vma, disassemble_info*); int print_insn_mn10200 (bfd_vma, disassemble_info*); int print_insn_mn10300 (bfd_vma, disassemble_info*); int print_insn_moxie (bfd_vma, disassemble_info*); int print_insn_ns32k (bfd_vma, disassemble_info*); int print_insn_big_powerpc (bfd_vma, disassemble_info*); int print_insn_little_powerpc (bfd_vma, disassemble_info*); int print_insn_rs6000 (bfd_vma, disassemble_info*); int print_insn_w65 (bfd_vma, disassemble_info*); int print_insn_d10v (bfd_vma, disassemble_info*); int print_insn_v850 (bfd_vma, disassemble_info*); int print_insn_tic30 (bfd_vma, disassemble_info*); int print_insn_ppc (bfd_vma, disassemble_info*); int print_insn_s390 (bfd_vma, disassemble_info*); int print_insn_crisv32 (bfd_vma, disassemble_info*); int print_insn_crisv10 (bfd_vma, disassemble_info*); int print_insn_microblaze (bfd_vma, disassemble_info*); int print_insn_ia64 (bfd_vma, disassemble_info*); int print_insn_lm32 (bfd_vma, disassemble_info*); int print_insn_big_nios2 (bfd_vma, disassemble_info*); int print_insn_little_nios2 (bfd_vma, disassemble_info*); /* This block of definitions is for particular callers who read instructions into a buffer before calling the instruction decoder. */ /* Here is a function which callers may wish to use for read_memory_func. It gets bytes from a buffer. */ int buffer_read_memory(bfd_vma, bfd_byte *, int, struct disassemble_info *); /* This function goes with buffer_read_memory. It prints a message using info->fprintf_func and info->stream. */ void perror_memory(int, bfd_vma, struct disassemble_info *); /* Just print the address in hex. This is included for completeness even though both GDB and objdump provide their own (to print symbolic addresses). */ void generic_print_address(bfd_vma, struct disassemble_info *); /* Always true. */ int generic_symbol_at_address(bfd_vma, struct disassemble_info *); /* Macro to initialize a disassemble_info struct. This should be called by all applications creating such a struct. */ /* Call this macro to initialize only the internal variables for the disassembler. Architecture dependent things such as byte order, or machine variant are not touched by this macro. This makes things much easier for GDB which must initialize these things separately. */ # 497 "//qemu-2.11+dfsg/include/disas/bfd.h" /* from libbfd */ bfd_vma bfd_getl64 (const bfd_byte *addr); bfd_vma bfd_getl32 (const bfd_byte *addr); bfd_vma bfd_getb32 (const bfd_byte *addr); bfd_vma bfd_getl16 (const bfd_byte *addr); bfd_vma bfd_getb16 (const bfd_byte *addr); typedef # 504 "//qemu-2.11+dfsg/include/disas/bfd.h" 3 4 _Bool # 504 "//qemu-2.11+dfsg/include/disas/bfd.h" bfd_boolean; # 25 "//qemu-2.11+dfsg/include/qom/cpu.h" 2 # 1 "//qemu-2.11+dfsg/include/exec/hwaddr.h" 1 /* Define hwaddr if it exists. */ /* hwaddr is the type of a physical address (its size can be different from 'target_ulong'). */ typedef uint64_t hwaddr; # 26 "//qemu-2.11+dfsg/include/qom/cpu.h" 2 # 1 "//qemu-2.11+dfsg/include/exec/memattrs.h" 1 /* * Memory transaction attributes * * Copyright (c) 2015 Linaro Limited. * * Authors: * Peter Maydell * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * */ /* Every memory transaction has associated with it a set of * attributes. Some of these are generic (such as the ID of * the bus master); some are specific to a particular kind of * bus (such as the ARM Secure/NonSecure bit). We define them * all as non-overlapping bitfields in a single struct to avoid * confusion if different parts of QEMU used the same bit for * different semantics. */ typedef struct MemTxAttrs { /* Bus masters which don't specify any attributes will get this * (via the MEMTXATTRS_UNSPECIFIED constant), so that we can * distinguish "all attributes deliberately clear" from * "didn't specify" if necessary. */ unsigned int unspecified:1; /* ARM/AMBA: TrustZone Secure access * x86: System Management Mode access */ unsigned int secure:1; /* Memory access is usermode (unprivileged) */ unsigned int user:1; /* Requester ID (for MSI for example) */ unsigned int requester_id:16; } MemTxAttrs; /* Bus masters which don't specify any attributes will get this, * which has all attribute bits clear except the topmost one * (so that we can distinguish "all attributes deliberately clear" * from "didn't specify" if necessary). */ /* New-style MMIO accessors can indicate that the transaction failed. * A zero (MEMTX_OK) response means success; anything else is a failure * of some kind. The memory subsystem will bitwise-OR together results * if it is synthesizing an operation from multiple smaller accesses. */ typedef uint32_t MemTxResult; # 27 "//qemu-2.11+dfsg/include/qom/cpu.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/bitmap.h" 1 /* * Bitmap Module * * Copyright (C) 2010 Corentin Chary * * Mostly inspired by (stolen from) linux/bitmap.h and linux/bitops.h * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 28 "//qemu-2.11+dfsg/include/qom/cpu.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/queue.h" 1 /* $NetBSD: queue.h,v 1.52 2009/04/20 09:56:08 mschuett Exp $ */ /* * QEMU version: Copy from netbsd, removed debug code, removed some of * the implementations. Left in singly-linked lists, lists, simple * queues, and tail queues. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ # 29 "//qemu-2.11+dfsg/include/qom/cpu.h" 2 typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size, void *opaque); /** * vaddr: * Type wide enough to contain any #target_ulong virtual address. */ typedef uint64_t vaddr; /** * SECTION:cpu * @section_id: QEMU-cpu * @title: CPU Class * @short_description: Base class for all CPUs */ /* Since this macro is used a lot in hot code paths and in conjunction with * FooCPU *foo_env_get_cpu(), we deviate from usual QOM practice by using * an unchecked cast. */ typedef enum MMUAccessType { MMU_DATA_LOAD = 0, MMU_DATA_STORE = 1, MMU_INST_FETCH = 2 } MMUAccessType; typedef struct CPUWatchpoint CPUWatchpoint; typedef void (*CPUUnassignedAccess)(CPUState *cpu, hwaddr addr, # 73 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 73 "//qemu-2.11+dfsg/include/qom/cpu.h" is_write, # 73 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 73 "//qemu-2.11+dfsg/include/qom/cpu.h" is_exec, int opaque, unsigned size); struct TranslationBlock; /** * CPUClass: * @class_by_name: Callback to map -cpu command line model name to an * instantiatable CPU type. * @parse_features: Callback to parse command line arguments. * @reset: Callback to reset the #CPUState to its initial state. * @reset_dump_flags: #CPUDumpFlags to use for reset logging. * @has_work: Callback for checking if there is work to do. * @do_interrupt: Callback for interrupt handling. * @do_unassigned_access: Callback for unassigned access handling. * (this is deprecated: new targets should use do_transaction_failed instead) * @do_unaligned_access: Callback for unaligned access handling, if * the target defines #ALIGNED_ONLY. * @do_transaction_failed: Callback for handling failed memory transactions * (ie bus faults or external aborts; not MMU faults) * @virtio_is_big_endian: Callback to return %true if a CPU which supports * runtime configurable endianness is currently big-endian. Non-configurable * CPUs can use the default implementation of this method. This method should * not be used by any callers other than the pre-1.0 virtio devices. * @memory_rw_debug: Callback for GDB memory access. * @dump_state: Callback for dumping state. * @dump_statistics: Callback for dumping statistics. * @get_arch_id: Callback for getting architecture-dependent CPU ID. * @get_paging_enabled: Callback for inquiring whether paging is enabled. * @get_memory_mapping: Callback for obtaining the memory mappings. * @set_pc: Callback for setting the Program Counter register. * @synchronize_from_tb: Callback for synchronizing state from a TCG * #TranslationBlock. * @handle_mmu_fault: Callback for handling an MMU fault. * @get_phys_page_debug: Callback for obtaining a physical address. * @get_phys_page_attrs_debug: Callback for obtaining a physical address and the * associated memory transaction attributes to use for the access. * CPUs which use memory transaction attributes should implement this * instead of get_phys_page_debug. * @asidx_from_attrs: Callback to return the CPU AddressSpace to use for * a memory access with the specified memory transaction attributes. * @gdb_read_register: Callback for letting GDB read a register. * @gdb_write_register: Callback for letting GDB write a register. * @debug_check_watchpoint: Callback: return true if the architectural * watchpoint whose address has matched should really fire. * @debug_excp_handler: Callback for handling debug exceptions. * @write_elf64_note: Callback for writing a CPU-specific ELF note to a * 64-bit VM coredump. * @write_elf32_qemunote: Callback for writing a CPU- and QEMU-specific ELF * note to a 32-bit VM coredump. * @write_elf32_note: Callback for writing a CPU-specific ELF note to a * 32-bit VM coredump. * @write_elf32_qemunote: Callback for writing a CPU- and QEMU-specific ELF * note to a 32-bit VM coredump. * @vmsd: State description for migration. * @gdb_num_core_regs: Number of core registers accessible to GDB. * @gdb_core_xml_file: File name for core registers GDB XML description. * @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop * before the insn which triggers a watchpoint rather than after it. * @gdb_arch_name: Optional callback that returns the architecture name known * to GDB. The caller must free the returned string with g_free. * @cpu_exec_enter: Callback for cpu_exec preparation. * @cpu_exec_exit: Callback for cpu_exec cleanup. * @cpu_exec_interrupt: Callback for processing interrupts in cpu_exec. * @disas_set_info: Setup architecture specific components of disassembly info * @adjust_watchpoint_address: Perform a target-specific adjustment to an * address before attempting to match it against watchpoints. * * Represents a CPU family or model. */ typedef struct CPUClass { /*< private >*/ DeviceClass parent_class; /*< public >*/ ObjectClass *(*class_by_name)(const char *cpu_model); void (*parse_features)(const char *typename, char *str, Error **errp); void (*reset)(CPUState *cpu); int reset_dump_flags; # 153 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 153 "//qemu-2.11+dfsg/include/qom/cpu.h" (*has_work)(CPUState *cpu); void (*do_interrupt)(CPUState *cpu); CPUUnassignedAccess do_unassigned_access; void (*do_unaligned_access)(CPUState *cpu, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr); void (*do_transaction_failed)(CPUState *cpu, hwaddr physaddr, vaddr addr, unsigned size, MMUAccessType access_type, int mmu_idx, MemTxAttrs attrs, MemTxResult response, uintptr_t retaddr); # 163 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 163 "//qemu-2.11+dfsg/include/qom/cpu.h" (*virtio_is_big_endian)(CPUState *cpu); int (*memory_rw_debug)(CPUState *cpu, vaddr addr, uint8_t *buf, int len, # 165 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 165 "//qemu-2.11+dfsg/include/qom/cpu.h" is_write); void (*dump_state)(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, int flags); GuestPanicInformation* (*get_crash_info)(CPUState *cpu); void (*dump_statistics)(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, int flags); int64_t (*get_arch_id)(CPUState *cpu); # 172 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 172 "//qemu-2.11+dfsg/include/qom/cpu.h" (*get_paging_enabled)(const CPUState *cpu); void (*get_memory_mapping)(CPUState *cpu, MemoryMappingList *list, Error **errp); void (*set_pc)(CPUState *cpu, vaddr value); void (*synchronize_from_tb)(CPUState *cpu, struct TranslationBlock *tb); int (*handle_mmu_fault)(CPUState *cpu, vaddr address, int rw, int mmu_index); hwaddr (*get_phys_page_debug)(CPUState *cpu, vaddr addr); hwaddr (*get_phys_page_attrs_debug)(CPUState *cpu, vaddr addr, MemTxAttrs *attrs); int (*asidx_from_attrs)(CPUState *cpu, MemTxAttrs attrs); int (*gdb_read_register)(CPUState *cpu, uint8_t *buf, int reg); int (*gdb_write_register)(CPUState *cpu, uint8_t *buf, int reg); # 185 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 185 "//qemu-2.11+dfsg/include/qom/cpu.h" (*debug_check_watchpoint)(CPUState *cpu, CPUWatchpoint *wp); void (*debug_excp_handler)(CPUState *cpu); int (*write_elf64_note)(WriteCoreDumpFunction f, CPUState *cpu, int cpuid, void *opaque); int (*write_elf64_qemunote)(WriteCoreDumpFunction f, CPUState *cpu, void *opaque); int (*write_elf32_note)(WriteCoreDumpFunction f, CPUState *cpu, int cpuid, void *opaque); int (*write_elf32_qemunote)(WriteCoreDumpFunction f, CPUState *cpu, void *opaque); const struct VMStateDescription *vmsd; const char *gdb_core_xml_file; gchar * (*gdb_arch_name)(CPUState *cpu); void (*cpu_exec_enter)(CPUState *cpu); void (*cpu_exec_exit)(CPUState *cpu); # 203 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 203 "//qemu-2.11+dfsg/include/qom/cpu.h" (*cpu_exec_interrupt)(CPUState *cpu, int interrupt_request); void (*disas_set_info)(CPUState *cpu, disassemble_info *info); vaddr (*adjust_watchpoint_address)(CPUState *cpu, vaddr addr, int len); void (*tcg_initialize)(void); /* Keep non-pointer data at the end to minimize holes. */ int gdb_num_core_regs; # 211 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 211 "//qemu-2.11+dfsg/include/qom/cpu.h" gdb_stop_before_watchpoint; } CPUClass; typedef struct icount_decr_u16 { uint16_t low; uint16_t high; } icount_decr_u16; typedef struct CPUBreakpoint { vaddr pc; int flags; /* BP_* */ struct { struct CPUBreakpoint *tqe_next; /* next element */ struct CPUBreakpoint * *tqe_prev; /* address of previous next element */} entry; } CPUBreakpoint; struct CPUWatchpoint { vaddr vaddr; vaddr len; vaddr hitaddr; MemTxAttrs hitattrs; int flags; /* BP_* */ struct { struct CPUWatchpoint *tqe_next; /* next element */ struct CPUWatchpoint * *tqe_prev; /* address of previous next element */} entry; }; struct KVMState; struct kvm_run; struct hax_vcpu_state; /* work queue */ /* The union type allows passing of 64 bit target pointers on 32 bit * hosts in a single parameter */ typedef union { int host_int; unsigned long host_ulong; void *host_ptr; vaddr target_ptr; } run_on_cpu_data; typedef void (*run_on_cpu_func)(CPUState *cpu, run_on_cpu_data data); struct qemu_work_item; /** * CPUState: * @cpu_index: CPU index (informative). * @nr_cores: Number of cores within this CPU package. * @nr_threads: Number of threads within this CPU. * @running: #true if CPU is currently running (lockless). * @has_waiter: #true if a CPU is currently waiting for the cpu_exec_end; * valid under cpu_list_lock. * @created: Indicates whether the CPU thread has been successfully created. * @interrupt_request: Indicates a pending interrupt request. * @halted: Nonzero if the CPU is in suspended state. * @stop: Indicates a pending stop request. * @stopped: Indicates the CPU has been artificially stopped. * @unplug: Indicates a pending CPU unplug request. * @crash_occurred: Indicates the OS reported a crash (panic) for this CPU * @singlestep_enabled: Flags for single-stepping. * @icount_extra: Instructions until next timer event. * @icount_decr: Low 16 bits: number of cycles left, only used in icount mode. * High 16 bits: Set to -1 to force TCG to stop executing linked TBs for this * CPU and return to its top level loop (even in non-icount mode). * This allows a single read-compare-cbranch-write sequence to test * for both decrementer underflow and exceptions. * @can_do_io: Nonzero if memory-mapped IO is safe. Deterministic execution * requires that IO only be performed on the last instruction of a TB * so that interrupts take effect immediately. * @cpu_ases: Pointer to array of CPUAddressSpaces (which define the * AddressSpaces this CPU has) * @num_ases: number of CPUAddressSpaces in @cpu_ases * @as: Pointer to the first AddressSpace, for the convenience of targets which * only have a single AddressSpace * @env_ptr: Pointer to subclass-specific CPUArchState field. * @gdb_regs: Additional GDB registers. * @gdb_num_regs: Number of total registers accessible to GDB. * @gdb_num_g_regs: Number of registers in GDB 'g' packets. * @next_cpu: Next CPU sharing TB cache. * @opaque: User data. * @mem_io_pc: Host Program Counter at which the memory was accessed. * @mem_io_vaddr: Target virtual address at which the memory was accessed. * @kvm_fd: vCPU file descriptor for KVM. * @work_mutex: Lock to prevent multiple access to queued_work_*. * @queued_work_first: First asynchronous work pending. * @trace_dstate_delayed: Delayed changes to trace_dstate (includes all changes * to @trace_dstate). * @trace_dstate: Dynamic tracing state of events for this vCPU (bitmask). * @ignore_memory_transaction_failures: Cached copy of the MachineState * flag of the same name: allows the board to suppress calling of the * CPU do_transaction_failed hook function. * * State of one CPU core or thread. */ struct CPUState { /*< private >*/ DeviceState parent_obj; /*< public >*/ int nr_cores; int nr_threads; struct QemuThread *thread; int thread_id; # 337 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 337 "//qemu-2.11+dfsg/include/qom/cpu.h" running, has_waiter; struct QemuCond *halt_cond; # 339 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 339 "//qemu-2.11+dfsg/include/qom/cpu.h" thread_kicked; # 340 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 340 "//qemu-2.11+dfsg/include/qom/cpu.h" created; # 341 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 341 "//qemu-2.11+dfsg/include/qom/cpu.h" stop; # 342 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 342 "//qemu-2.11+dfsg/include/qom/cpu.h" stopped; # 343 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 343 "//qemu-2.11+dfsg/include/qom/cpu.h" unplug; # 344 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 344 "//qemu-2.11+dfsg/include/qom/cpu.h" crash_occurred; # 345 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 345 "//qemu-2.11+dfsg/include/qom/cpu.h" exit_request; uint32_t cflags_next_tb; /* updates protected by BQL */ uint32_t interrupt_request; int singlestep_enabled; int64_t icount_budget; int64_t icount_extra; sigjmp_buf jmp_env; QemuMutex work_mutex; struct qemu_work_item *queued_work_first, *queued_work_last; CPUAddressSpace *cpu_ases; int num_ases; AddressSpace *as; MemoryRegion *memory; void *env_ptr; /* CPUArchState */ /* Accessed in parallel; all accesses must be atomic */ struct TranslationBlock *tb_jmp_cache[(1 << 12)]; struct GDBRegisterState *gdb_regs; int gdb_num_regs; int gdb_num_g_regs; struct { struct CPUState *tqe_next; /* next element */ struct CPUState * *tqe_prev; /* address of previous next element */} node; /* ice debug support */ struct breakpoints_head { struct CPUBreakpoint *tqh_first; /* first element */ struct CPUBreakpoint * *tqh_last; /* addr of last next element */ } breakpoints; struct watchpoints_head { struct CPUWatchpoint *tqh_first; /* first element */ struct CPUWatchpoint * *tqh_last; /* addr of last next element */ } watchpoints; CPUWatchpoint *watchpoint_hit; void *opaque; /* In order to avoid passing too many arguments to the MMIO helpers, * we store some rarely used information in the CPU context. */ uintptr_t mem_io_pc; vaddr mem_io_vaddr; int kvm_fd; struct KVMState *kvm_state; struct kvm_run *kvm_run; /* Used for events with 'vcpu' and *without* the 'disabled' properties */ unsigned long trace_dstate_delayed[(((32) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; unsigned long trace_dstate[(((32) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; /* TODO Move common fields from CPUArchState here. */ int cpu_index; uint32_t halted; uint32_t can_do_io; int32_t exception_index; /* shared by kvm, hax and hvf */ # 401 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 401 "//qemu-2.11+dfsg/include/qom/cpu.h" vcpu_dirty; /* Used to keep track of an outstanding cpu throttle thread for migration * autoconverge */ # 406 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 406 "//qemu-2.11+dfsg/include/qom/cpu.h" throttle_thread_scheduled; # 408 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 408 "//qemu-2.11+dfsg/include/qom/cpu.h" ignore_memory_transaction_failures; /* Note that this is accessed at the start of every TB via a negative offset from AREG0. Leave this field at the end so as to make the (absolute value) offset as small as possible. This reduces code size, especially for hosts without large memory offsets. */ union { uint32_t u32; icount_decr_u16 u16; } icount_decr; struct hax_vcpu_state *hax_vcpu; /* The pending_tlb_flush flag is set and cleared atomically to * avoid potential races. The aim of the flag is to avoid * unnecessary flushes. */ uint16_t pending_tlb_flush; }; struct CPUTailQ { struct CPUState *tqh_first; /* first element */ struct CPUState * *tqh_last; /* addr of last next element */ }; extern struct CPUTailQ cpus; # 438 "//qemu-2.11+dfsg/include/qom/cpu.h" extern __thread CPUState *current_cpu; static inline void cpu_tb_jmp_cache_clear(CPUState *cpu) { unsigned int i; for (i = 0; i < (1 << 12); i++) { do { _Static_assert(!(sizeof(*&cpu->tb_jmp_cache[i]) > 8), "not expecting: " "sizeof(*&cpu->tb_jmp_cache[i]) > ATOMIC_REG_SIZE"); __atomic_store_n(&cpu->tb_jmp_cache[i], # 445 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 ((void *)0) # 445 "//qemu-2.11+dfsg/include/qom/cpu.h" , 0); } while(0); } } /** * qemu_tcg_mttcg_enabled: * Check whether we are running MultiThread TCG or not. * * Returns: %true if we are in MTTCG mode %false otherwise. */ extern # 455 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 455 "//qemu-2.11+dfsg/include/qom/cpu.h" mttcg_enabled; /** * cpu_paging_enabled: * @cpu: The CPU whose state is to be inspected. * * Returns: %true if paging is enabled, %false otherwise. */ # 464 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 464 "//qemu-2.11+dfsg/include/qom/cpu.h" cpu_paging_enabled(const CPUState *cpu); /** * cpu_get_memory_mapping: * @cpu: The CPU whose memory mappings are to be obtained. * @list: Where to write the memory mappings to. * @errp: Pointer for reporting an #Error. */ void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list, Error **errp); /** * cpu_write_elf64_note: * @f: pointer to a function that writes memory to a file * @cpu: The CPU whose memory is to be dumped * @cpuid: ID number of the CPU * @opaque: pointer to the CPUState struct */ int cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cpu, int cpuid, void *opaque); /** * cpu_write_elf64_qemunote: * @f: pointer to a function that writes memory to a file * @cpu: The CPU whose memory is to be dumped * @cpuid: ID number of the CPU * @opaque: pointer to the CPUState struct */ int cpu_write_elf64_qemunote(WriteCoreDumpFunction f, CPUState *cpu, void *opaque); /** * cpu_write_elf32_note: * @f: pointer to a function that writes memory to a file * @cpu: The CPU whose memory is to be dumped * @cpuid: ID number of the CPU * @opaque: pointer to the CPUState struct */ int cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cpu, int cpuid, void *opaque); /** * cpu_write_elf32_qemunote: * @f: pointer to a function that writes memory to a file * @cpu: The CPU whose memory is to be dumped * @cpuid: ID number of the CPU * @opaque: pointer to the CPUState struct */ int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu, void *opaque); /** * cpu_get_crash_info: * @cpu: The CPU to get crash information for * * Gets the previously saved crash information. * Caller is responsible for freeing the data. */ GuestPanicInformation *cpu_get_crash_info(CPUState *cpu); /** * CPUDumpFlags: * @CPU_DUMP_CODE: * @CPU_DUMP_FPU: dump FPU register state, not just integer * @CPU_DUMP_CCOP: dump info about TCG QEMU's condition code optimization state */ enum CPUDumpFlags { CPU_DUMP_CODE = 0x00010000, CPU_DUMP_FPU = 0x00020000, CPU_DUMP_CCOP = 0x00040000, }; /** * cpu_dump_state: * @cpu: The CPU whose state is to be dumped. * @f: File to dump to. * @cpu_fprintf: Function to dump with. * @flags: Flags what to dump. * * Dumps CPU state. */ void cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, int flags); /** * cpu_dump_statistics: * @cpu: The CPU whose state is to be dumped. * @f: File to dump to. * @cpu_fprintf: Function to dump with. * @flags: Flags what to dump. * * Dumps CPU statistics. */ void cpu_dump_statistics(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, int flags); /** * cpu_get_phys_page_attrs_debug: * @cpu: The CPU to obtain the physical page address for. * @addr: The virtual address. * @attrs: Updated on return with the memory transaction attributes to use * for this access. * * Obtains the physical page corresponding to a virtual one, together * with the corresponding memory transaction attributes to use for the access. * Use it only for debugging because no protection checks are done. * * Returns: Corresponding physical page address or -1 if no page found. */ static inline hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr, MemTxAttrs *attrs) { CPUClass *cc = ((CPUClass *)object_class_dynamic_cast_assert(((ObjectClass *)(object_get_class(((Object *)((cpu)))))), ("cpu"), "//qemu-2.11+dfsg/include/qom/cpu.h", 577, __func__)); if (cc->get_phys_page_attrs_debug) { return cc->get_phys_page_attrs_debug(cpu, addr, attrs); } /* Fallback for CPUs which don't implement the _attrs_ hook */ *attrs = ((MemTxAttrs) { .unspecified = 1 }); return cc->get_phys_page_debug(cpu, addr); } /** * cpu_get_phys_page_debug: * @cpu: The CPU to obtain the physical page address for. * @addr: The virtual address. * * Obtains the physical page corresponding to a virtual one. * Use it only for debugging because no protection checks are done. * * Returns: Corresponding physical page address or -1 if no page found. */ static inline hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr) { MemTxAttrs attrs = {}; return cpu_get_phys_page_attrs_debug(cpu, addr, &attrs); } /** cpu_asidx_from_attrs: * @cpu: CPU * @attrs: memory transaction attributes * * Returns the address space index specifying the CPU AddressSpace * to use for a memory access with the given transaction attributes. */ static inline int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attrs) { CPUClass *cc = ((CPUClass *)object_class_dynamic_cast_assert(((ObjectClass *)(object_get_class(((Object *)((cpu)))))), ("cpu"), "//qemu-2.11+dfsg/include/qom/cpu.h", 613, __func__)); if (cc->asidx_from_attrs) { return cc->asidx_from_attrs(cpu, attrs); } return 0; } /** * cpu_list_add: * @cpu: The CPU to be added to the list of CPUs. */ void cpu_list_add(CPUState *cpu); /** * cpu_list_remove: * @cpu: The CPU to be removed from the list of CPUs. */ void cpu_list_remove(CPUState *cpu); /** * cpu_reset: * @cpu: The CPU whose state is to be reset. */ void cpu_reset(CPUState *cpu); /** * cpu_class_by_name: * @typename: The CPU base type. * @cpu_model: The model string without any parameters. * * Looks up a CPU #ObjectClass matching name @cpu_model. * * Returns: A #CPUClass or %NULL if not matching class is found. */ ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model); /** * cpu_create: * @typename: The CPU type. * * Instantiates a CPU and realizes the CPU. * * Returns: A #CPUState or %NULL if an error occurred. */ CPUState *cpu_create(const char *typename); /** * cpu_parse_cpu_model: * @typename: The CPU base type or CPU type. * @cpu_model: The model string including optional parameters. * * processes optional parameters and registers them as global properties * * Returns: type of CPU to create or prints error and terminates process * if an error occurred. */ const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model); /** * cpu_generic_init: * @typename: The CPU base type. * @cpu_model: The model string including optional parameters. * * Instantiates a CPU, processes optional parameters and realizes the CPU. * * Returns: A #CPUState or %NULL if an error occurred. */ CPUState *cpu_generic_init(const char *typename, const char *cpu_model); /** * cpu_has_work: * @cpu: The vCPU to check. * * Checks whether the CPU has work to do. * * Returns: %true if the CPU has work, %false otherwise. */ static inline # 692 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 692 "//qemu-2.11+dfsg/include/qom/cpu.h" cpu_has_work(CPUState *cpu) { CPUClass *cc = ((CPUClass *)object_class_dynamic_cast_assert(((ObjectClass *)(object_get_class(((Object *)((cpu)))))), ("cpu"), "//qemu-2.11+dfsg/include/qom/cpu.h", 694, __func__)); do { if (cc->has_work) ; else g_assertion_message_expr (((gchar*) 0), "//qemu-2.11+dfsg/include/qom/cpu.h", 696, ((const char*) (__func__)), "cc->has_work"); } while (0); return cc->has_work(cpu); } /** * qemu_cpu_is_self: * @cpu: The vCPU to check against. * * Checks whether the caller is executing on the vCPU thread. * * Returns: %true if called from @cpu's thread, %false otherwise. */ # 708 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 708 "//qemu-2.11+dfsg/include/qom/cpu.h" qemu_cpu_is_self(CPUState *cpu); /** * qemu_cpu_kick: * @cpu: The vCPU to kick. * * Kicks @cpu's thread. */ void qemu_cpu_kick(CPUState *cpu); /** * cpu_is_stopped: * @cpu: The CPU to check. * * Checks whether the CPU is stopped. * * Returns: %true if run state is not running or if artificially stopped; * %false otherwise. */ # 727 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 727 "//qemu-2.11+dfsg/include/qom/cpu.h" cpu_is_stopped(CPUState *cpu); /** * do_run_on_cpu: * @cpu: The vCPU to run on. * @func: The function to be executed. * @data: Data to pass to the function. * @mutex: Mutex to release while waiting for @func to run. * * Used internally in the implementation of run_on_cpu. */ void do_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data, QemuMutex *mutex); /** * run_on_cpu: * @cpu: The vCPU to run on. * @func: The function to be executed. * @data: Data to pass to the function. * * Schedules the function @func for execution on the vCPU @cpu. */ void run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data); /** * async_run_on_cpu: * @cpu: The vCPU to run on. * @func: The function to be executed. * @data: Data to pass to the function. * * Schedules the function @func for execution on the vCPU @cpu asynchronously. */ void async_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data); /** * async_safe_run_on_cpu: * @cpu: The vCPU to run on. * @func: The function to be executed. * @data: Data to pass to the function. * * Schedules the function @func for execution on the vCPU @cpu asynchronously, * while all other vCPUs are sleeping. * * Unlike run_on_cpu and async_run_on_cpu, the function is run outside the * BQL. */ void async_safe_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data); /** * qemu_get_cpu: * @index: The CPUState@cpu_index value of the CPU to obtain. * * Gets a CPU matching @index. * * Returns: The CPU or %NULL if there is no matching CPU. */ CPUState *qemu_get_cpu(int index); /** * cpu_exists: * @id: Guest-exposed CPU ID to lookup. * * Search for CPU with specified ID. * * Returns: %true - CPU is found, %false - CPU isn't found. */ # 793 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 793 "//qemu-2.11+dfsg/include/qom/cpu.h" cpu_exists(int64_t id); /** * cpu_by_arch_id: * @id: Guest-exposed CPU ID of the CPU to obtain. * * Get a CPU with matching @id. * * Returns: The CPU or %NULL if there is no matching CPU. */ CPUState *cpu_by_arch_id(int64_t id); /** * cpu_throttle_set: * @new_throttle_pct: Percent of sleep time. Valid range is 1 to 99. * * Throttles all vcpus by forcing them to sleep for the given percentage of * time. A throttle_percentage of 25 corresponds to a 75% duty cycle roughly. * (example: 10ms sleep for every 30ms awake). * * cpu_throttle_set can be called as needed to adjust new_throttle_pct. * Once the throttling starts, it will remain in effect until cpu_throttle_stop * is called. */ void cpu_throttle_set(int new_throttle_pct); /** * cpu_throttle_stop: * * Stops the vcpu throttling started by cpu_throttle_set. */ void cpu_throttle_stop(void); /** * cpu_throttle_active: * * Returns: %true if the vcpus are currently being throttled, %false otherwise. */ # 831 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 831 "//qemu-2.11+dfsg/include/qom/cpu.h" cpu_throttle_active(void); /** * cpu_throttle_get_percentage: * * Returns the vcpu throttle percentage. See cpu_throttle_set for details. * * Returns: The throttle percentage in range 1 to 99. */ int cpu_throttle_get_percentage(void); typedef void (*CPUInterruptHandler)(CPUState *, int); extern CPUInterruptHandler cpu_interrupt_handler; /** * cpu_interrupt: * @cpu: The CPU to set an interrupt on. * @mask: The interupts to set. * * Invokes the interrupt handler. */ static inline void cpu_interrupt(CPUState *cpu, int mask) { cpu_interrupt_handler(cpu, mask); } # 907 "//qemu-2.11+dfsg/include/qom/cpu.h" /** * cpu_set_pc: * @cpu: The CPU to set the program counter for. * @addr: Program counter value. * * Sets the program counter for a CPU. */ static inline void cpu_set_pc(CPUState *cpu, vaddr addr) { CPUClass *cc = ((CPUClass *)object_class_dynamic_cast_assert(((ObjectClass *)(object_get_class(((Object *)((cpu)))))), ("cpu"), "//qemu-2.11+dfsg/include/qom/cpu.h", 916, __func__)); cc->set_pc(cpu, addr); } /** * cpu_reset_interrupt: * @cpu: The CPU to clear the interrupt on. * @mask: The interrupt mask to clear. * * Resets interrupts on the vCPU @cpu. */ void cpu_reset_interrupt(CPUState *cpu, int mask); /** * cpu_exit: * @cpu: The CPU to exit. * * Requests the CPU @cpu to exit execution. */ void cpu_exit(CPUState *cpu); /** * cpu_resume: * @cpu: The CPU to resume. * * Resumes CPU, i.e. puts CPU into runnable state. */ void cpu_resume(CPUState *cpu); /** * cpu_remove: * @cpu: The CPU to remove. * * Requests the CPU to be removed. */ void cpu_remove(CPUState *cpu); /** * cpu_remove_sync: * @cpu: The CPU to remove. * * Requests the CPU to be removed and waits till it is removed. */ void cpu_remove_sync(CPUState *cpu); /** * process_queued_cpu_work() - process all items on CPU work queue * @cpu: The CPU which work queue to process. */ void process_queued_cpu_work(CPUState *cpu); /** * cpu_exec_start: * @cpu: The CPU for the current thread. * * Record that a CPU has started execution and can be interrupted with * cpu_exit. */ void cpu_exec_start(CPUState *cpu); /** * cpu_exec_end: * @cpu: The CPU for the current thread. * * Record that a CPU has stopped execution and exclusive sections * can be executed without interrupting it. */ void cpu_exec_end(CPUState *cpu); /** * start_exclusive: * * Wait for a concurrent exclusive section to end, and then start * a section of work that is run while other CPUs are not running * between cpu_exec_start and cpu_exec_end. CPUs that are running * cpu_exec are exited immediately. CPUs that call cpu_exec_start * during the exclusive section go to sleep until this CPU calls * end_exclusive. */ void start_exclusive(void); /** * end_exclusive: * * Concludes an exclusive execution section started by start_exclusive. */ void end_exclusive(void); /** * qemu_init_vcpu: * @cpu: The vCPU to initialize. * * Initializes a vCPU. */ void qemu_init_vcpu(CPUState *cpu); /** * cpu_single_step: * @cpu: CPU to the flags for. * @enabled: Flags to enable. * * Enables or disables single-stepping for @cpu. */ void cpu_single_step(CPUState *cpu, int enabled); /* Breakpoint/watchpoint flags */ /* 0x08 currently unused */ int cpu_breakpoint_insert(CPUState *cpu, vaddr pc, int flags, CPUBreakpoint **breakpoint); int cpu_breakpoint_remove(CPUState *cpu, vaddr pc, int flags); void cpu_breakpoint_remove_by_ref(CPUState *cpu, CPUBreakpoint *breakpoint); void cpu_breakpoint_remove_all(CPUState *cpu, int mask); /* Return true if PC matches an installed breakpoint. */ static inline # 1046 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 _Bool # 1046 "//qemu-2.11+dfsg/include/qom/cpu.h" cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask) { CPUBreakpoint *bp; if (__builtin_expect(!!(!((&cpu->breakpoints)->tqh_first == # 1050 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 ((void *)0) # 1050 "//qemu-2.11+dfsg/include/qom/cpu.h" )), 0)) { for ((bp) = ((&cpu->breakpoints)->tqh_first); (bp); (bp) = ((bp)->entry.tqe_next)) { if (bp->pc == pc && (bp->flags & mask)) { return # 1053 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 1 # 1053 "//qemu-2.11+dfsg/include/qom/cpu.h" ; } } } return # 1057 "//qemu-2.11+dfsg/include/qom/cpu.h" 3 4 0 # 1057 "//qemu-2.11+dfsg/include/qom/cpu.h" ; } int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, int flags, CPUWatchpoint **watchpoint); int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, vaddr len, int flags); void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint); void cpu_watchpoint_remove_all(CPUState *cpu, int mask); /** * cpu_get_address_space: * @cpu: CPU to get address space from * @asidx: index identifying which address space to get * * Return the requested address space of this CPU. @asidx * specifies which address space to read. */ AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx); void __attribute__ ((__noreturn__)) cpu_abort(CPUState *cpu, const char *fmt, ...) __attribute__((format(gnu_printf, 2, 3))); extern Property cpu_common_props[]; void cpu_exec_initfn(CPUState *cpu); void cpu_exec_realizefn(CPUState *cpu, Error **errp); void cpu_exec_unrealizefn(CPUState *cpu); # 16 "//qemu-2.11+dfsg/trace/control-internal.h" 2 extern int trace_events_enabled_count; static inline # 21 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 _Bool # 21 "//qemu-2.11+dfsg/trace/control-internal.h" trace_event_is_pattern(const char *str) { # 23 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void) sizeof (( # 23 "//qemu-2.11+dfsg/trace/control-internal.h" str != # 23 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void *)0)) ? 1 : 0), __extension__ ({ if ( # 23 "//qemu-2.11+dfsg/trace/control-internal.h" str != # 23 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void *)0)) ; /* empty */ else __assert_fail ( # 23 "//qemu-2.11+dfsg/trace/control-internal.h" "str != NULL" # 23 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 , "//qemu-2.11+dfsg/trace/control-internal.h", 23, __extension__ __PRETTY_FUNCTION__); })) # 23 "//qemu-2.11+dfsg/trace/control-internal.h" ; return strchr(str, '*') != # 24 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void *)0) # 24 "//qemu-2.11+dfsg/trace/control-internal.h" ; } static inline uint32_t trace_event_get_id(TraceEvent *ev) { # 29 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void) sizeof (( # 29 "//qemu-2.11+dfsg/trace/control-internal.h" ev != # 29 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void *)0)) ? 1 : 0), __extension__ ({ if ( # 29 "//qemu-2.11+dfsg/trace/control-internal.h" ev != # 29 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void *)0)) ; /* empty */ else __assert_fail ( # 29 "//qemu-2.11+dfsg/trace/control-internal.h" "ev != NULL" # 29 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 , "//qemu-2.11+dfsg/trace/control-internal.h", 29, __extension__ __PRETTY_FUNCTION__); })) # 29 "//qemu-2.11+dfsg/trace/control-internal.h" ; return ev->id; } static inline uint32_t trace_event_get_vcpu_id(TraceEvent *ev) { return ev->vcpu_id; } static inline # 38 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 _Bool # 38 "//qemu-2.11+dfsg/trace/control-internal.h" trace_event_is_vcpu(TraceEvent *ev) { return ev->vcpu_id != ((uint32_t)-1); } static inline const char * trace_event_get_name(TraceEvent *ev) { # 45 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void) sizeof (( # 45 "//qemu-2.11+dfsg/trace/control-internal.h" ev != # 45 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void *)0)) ? 1 : 0), __extension__ ({ if ( # 45 "//qemu-2.11+dfsg/trace/control-internal.h" ev != # 45 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void *)0)) ; /* empty */ else __assert_fail ( # 45 "//qemu-2.11+dfsg/trace/control-internal.h" "ev != NULL" # 45 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 , "//qemu-2.11+dfsg/trace/control-internal.h", 45, __extension__ __PRETTY_FUNCTION__); })) # 45 "//qemu-2.11+dfsg/trace/control-internal.h" ; return ev->name; } static inline # 49 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 _Bool # 49 "//qemu-2.11+dfsg/trace/control-internal.h" trace_event_get_state_static(TraceEvent *ev) { # 51 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void) sizeof (( # 51 "//qemu-2.11+dfsg/trace/control-internal.h" ev != # 51 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void *)0)) ? 1 : 0), __extension__ ({ if ( # 51 "//qemu-2.11+dfsg/trace/control-internal.h" ev != # 51 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void *)0)) ; /* empty */ else __assert_fail ( # 51 "//qemu-2.11+dfsg/trace/control-internal.h" "ev != NULL" # 51 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 , "//qemu-2.11+dfsg/trace/control-internal.h", 51, __extension__ __PRETTY_FUNCTION__); })) # 51 "//qemu-2.11+dfsg/trace/control-internal.h" ; return ev->sstate; } /* it's on fast path, avoid consistency checks (asserts) */ static inline # 59 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 _Bool # 59 "//qemu-2.11+dfsg/trace/control-internal.h" trace_event_get_state_dynamic(TraceEvent *ev) { return __builtin_expect(!!(trace_events_enabled_count), 0) && *ev->dstate; } static inline # 64 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 _Bool # 65 "//qemu-2.11+dfsg/trace/control-internal.h" trace_event_get_vcpu_state_dynamic_by_vcpu_id(CPUState *vcpu, uint32_t vcpu_id) { /* it's on fast path, avoid consistency checks (asserts) */ if (__builtin_expect(!!(trace_events_enabled_count), 0)) { return test_bit(vcpu_id, vcpu->trace_dstate); } else { return # 72 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 0 # 72 "//qemu-2.11+dfsg/trace/control-internal.h" ; } } static inline # 76 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 _Bool # 76 "//qemu-2.11+dfsg/trace/control-internal.h" trace_event_get_vcpu_state_dynamic(CPUState *vcpu, TraceEvent *ev) { uint32_t vcpu_id; # 80 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ((void) sizeof (( # 80 "//qemu-2.11+dfsg/trace/control-internal.h" trace_event_is_vcpu(ev) # 80 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 80 "//qemu-2.11+dfsg/trace/control-internal.h" trace_event_is_vcpu(ev) # 80 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 ) ; /* empty */ else __assert_fail ( # 80 "//qemu-2.11+dfsg/trace/control-internal.h" "trace_event_is_vcpu(ev)" # 80 "//qemu-2.11+dfsg/trace/control-internal.h" 3 4 , "//qemu-2.11+dfsg/trace/control-internal.h", 80, __extension__ __PRETTY_FUNCTION__); })) # 80 "//qemu-2.11+dfsg/trace/control-internal.h" ; vcpu_id = trace_event_get_vcpu_id(ev); return trace_event_get_vcpu_state_dynamic_by_vcpu_id(vcpu, vcpu_id); } void trace_event_register_group(TraceEvent **events); # 271 "//qemu-2.11+dfsg/trace/control.h" 2 # 8 "block/trace.h" 2 extern TraceEvent _TRACE_BDRV_OPEN_COMMON_EVENT; extern TraceEvent _TRACE_BDRV_LOCK_MEDIUM_EVENT; extern TraceEvent _TRACE_BLK_CO_PREADV_EVENT; extern TraceEvent _TRACE_BLK_CO_PWRITEV_EVENT; extern TraceEvent _TRACE_BDRV_CO_PREADV_EVENT; extern TraceEvent _TRACE_BDRV_CO_PWRITEV_EVENT; extern TraceEvent _TRACE_BDRV_CO_PWRITE_ZEROES_EVENT; extern TraceEvent _TRACE_BDRV_CO_DO_COPY_ON_READV_EVENT; extern TraceEvent _TRACE_STREAM_ONE_ITERATION_EVENT; extern TraceEvent _TRACE_STREAM_START_EVENT; extern TraceEvent _TRACE_COMMIT_ONE_ITERATION_EVENT; extern TraceEvent _TRACE_COMMIT_START_EVENT; extern TraceEvent _TRACE_MIRROR_START_EVENT; extern TraceEvent _TRACE_MIRROR_RESTART_ITER_EVENT; extern TraceEvent _TRACE_MIRROR_BEFORE_FLUSH_EVENT; extern TraceEvent _TRACE_MIRROR_BEFORE_DRAIN_EVENT; extern TraceEvent _TRACE_MIRROR_BEFORE_SLEEP_EVENT; extern TraceEvent _TRACE_MIRROR_ONE_ITERATION_EVENT; extern TraceEvent _TRACE_MIRROR_ITERATION_DONE_EVENT; extern TraceEvent _TRACE_MIRROR_YIELD_EVENT; extern TraceEvent _TRACE_MIRROR_YIELD_IN_FLIGHT_EVENT; extern TraceEvent _TRACE_BACKUP_DO_COW_ENTER_EVENT; extern TraceEvent _TRACE_BACKUP_DO_COW_RETURN_EVENT; extern TraceEvent _TRACE_BACKUP_DO_COW_SKIP_EVENT; extern TraceEvent _TRACE_BACKUP_DO_COW_PROCESS_EVENT; extern TraceEvent _TRACE_BACKUP_DO_COW_READ_FAIL_EVENT; extern TraceEvent _TRACE_BACKUP_DO_COW_WRITE_FAIL_EVENT; extern TraceEvent _TRACE_QMP_BLOCK_JOB_CANCEL_EVENT; extern TraceEvent _TRACE_QMP_BLOCK_JOB_PAUSE_EVENT; extern TraceEvent _TRACE_QMP_BLOCK_JOB_RESUME_EVENT; extern TraceEvent _TRACE_QMP_BLOCK_JOB_COMPLETE_EVENT; extern TraceEvent _TRACE_QMP_BLOCK_STREAM_EVENT; extern TraceEvent _TRACE_PAIO_SUBMIT_CO_EVENT; extern TraceEvent _TRACE_PAIO_SUBMIT_EVENT; extern TraceEvent _TRACE_QCOW2_WRITEV_START_REQ_EVENT; extern TraceEvent _TRACE_QCOW2_WRITEV_DONE_REQ_EVENT; extern TraceEvent _TRACE_QCOW2_WRITEV_START_PART_EVENT; extern TraceEvent _TRACE_QCOW2_WRITEV_DONE_PART_EVENT; extern TraceEvent _TRACE_QCOW2_WRITEV_DATA_EVENT; extern TraceEvent _TRACE_QCOW2_PWRITE_ZEROES_START_REQ_EVENT; extern TraceEvent _TRACE_QCOW2_PWRITE_ZEROES_EVENT; extern TraceEvent _TRACE_QCOW2_ALLOC_CLUSTERS_OFFSET_EVENT; extern TraceEvent _TRACE_QCOW2_HANDLE_COPIED_EVENT; extern TraceEvent _TRACE_QCOW2_HANDLE_ALLOC_EVENT; extern TraceEvent _TRACE_QCOW2_DO_ALLOC_CLUSTERS_OFFSET_EVENT; extern TraceEvent _TRACE_QCOW2_CLUSTER_ALLOC_PHYS_EVENT; extern TraceEvent _TRACE_QCOW2_CLUSTER_LINK_L2_EVENT; extern TraceEvent _TRACE_QCOW2_L2_ALLOCATE_EVENT; extern TraceEvent _TRACE_QCOW2_L2_ALLOCATE_GET_EMPTY_EVENT; extern TraceEvent _TRACE_QCOW2_L2_ALLOCATE_WRITE_L2_EVENT; extern TraceEvent _TRACE_QCOW2_L2_ALLOCATE_WRITE_L1_EVENT; extern TraceEvent _TRACE_QCOW2_L2_ALLOCATE_DONE_EVENT; extern TraceEvent _TRACE_QCOW2_CACHE_GET_EVENT; extern TraceEvent _TRACE_QCOW2_CACHE_GET_REPLACE_ENTRY_EVENT; extern TraceEvent _TRACE_QCOW2_CACHE_GET_READ_EVENT; extern TraceEvent _TRACE_QCOW2_CACHE_GET_DONE_EVENT; extern TraceEvent _TRACE_QCOW2_CACHE_FLUSH_EVENT; extern TraceEvent _TRACE_QCOW2_CACHE_ENTRY_FLUSH_EVENT; extern TraceEvent _TRACE_QED_ALLOC_L2_CACHE_ENTRY_EVENT; extern TraceEvent _TRACE_QED_UNREF_L2_CACHE_ENTRY_EVENT; extern TraceEvent _TRACE_QED_FIND_L2_CACHE_ENTRY_EVENT; extern TraceEvent _TRACE_QED_READ_TABLE_EVENT; extern TraceEvent _TRACE_QED_READ_TABLE_CB_EVENT; extern TraceEvent _TRACE_QED_WRITE_TABLE_EVENT; extern TraceEvent _TRACE_QED_WRITE_TABLE_CB_EVENT; extern TraceEvent _TRACE_QED_NEED_CHECK_TIMER_CB_EVENT; extern TraceEvent _TRACE_QED_START_NEED_CHECK_TIMER_EVENT; extern TraceEvent _TRACE_QED_CANCEL_NEED_CHECK_TIMER_EVENT; extern TraceEvent _TRACE_QED_AIO_COMPLETE_EVENT; extern TraceEvent _TRACE_QED_AIO_SETUP_EVENT; extern TraceEvent _TRACE_QED_AIO_NEXT_IO_EVENT; extern TraceEvent _TRACE_QED_AIO_READ_DATA_EVENT; extern TraceEvent _TRACE_QED_AIO_WRITE_DATA_EVENT; extern TraceEvent _TRACE_QED_AIO_WRITE_PREFILL_EVENT; extern TraceEvent _TRACE_QED_AIO_WRITE_POSTFILL_EVENT; extern TraceEvent _TRACE_QED_AIO_WRITE_MAIN_EVENT; extern TraceEvent _TRACE_VXHS_IIO_CALLBACK_EVENT; extern TraceEvent _TRACE_VXHS_IIO_CALLBACK_CHNFAIL_EVENT; extern TraceEvent _TRACE_VXHS_IIO_CALLBACK_UNKNWN_EVENT; extern TraceEvent _TRACE_VXHS_AIO_RW_INVALID_EVENT; extern TraceEvent _TRACE_VXHS_AIO_RW_IOERR_EVENT; extern TraceEvent _TRACE_VXHS_GET_VDISK_STAT_ERR_EVENT; extern TraceEvent _TRACE_VXHS_GET_VDISK_STAT_EVENT; extern TraceEvent _TRACE_VXHS_COMPLETE_AIO_EVENT; extern TraceEvent _TRACE_VXHS_PARSE_URI_FILENAME_EVENT; extern TraceEvent _TRACE_VXHS_OPEN_VDISKID_EVENT; extern TraceEvent _TRACE_VXHS_OPEN_HOSTINFO_EVENT; extern TraceEvent _TRACE_VXHS_OPEN_IIO_OPEN_EVENT; extern TraceEvent _TRACE_VXHS_PARSE_URI_HOSTINFO_EVENT; extern TraceEvent _TRACE_VXHS_CLOSE_EVENT; extern TraceEvent _TRACE_VXHS_GET_CREDS_EVENT; extern uint16_t _TRACE_BDRV_OPEN_COMMON_DSTATE; extern uint16_t _TRACE_BDRV_LOCK_MEDIUM_DSTATE; extern uint16_t _TRACE_BLK_CO_PREADV_DSTATE; extern uint16_t _TRACE_BLK_CO_PWRITEV_DSTATE; extern uint16_t _TRACE_BDRV_CO_PREADV_DSTATE; extern uint16_t _TRACE_BDRV_CO_PWRITEV_DSTATE; extern uint16_t _TRACE_BDRV_CO_PWRITE_ZEROES_DSTATE; extern uint16_t _TRACE_BDRV_CO_DO_COPY_ON_READV_DSTATE; extern uint16_t _TRACE_STREAM_ONE_ITERATION_DSTATE; extern uint16_t _TRACE_STREAM_START_DSTATE; extern uint16_t _TRACE_COMMIT_ONE_ITERATION_DSTATE; extern uint16_t _TRACE_COMMIT_START_DSTATE; extern uint16_t _TRACE_MIRROR_START_DSTATE; extern uint16_t _TRACE_MIRROR_RESTART_ITER_DSTATE; extern uint16_t _TRACE_MIRROR_BEFORE_FLUSH_DSTATE; extern uint16_t _TRACE_MIRROR_BEFORE_DRAIN_DSTATE; extern uint16_t _TRACE_MIRROR_BEFORE_SLEEP_DSTATE; extern uint16_t _TRACE_MIRROR_ONE_ITERATION_DSTATE; extern uint16_t _TRACE_MIRROR_ITERATION_DONE_DSTATE; extern uint16_t _TRACE_MIRROR_YIELD_DSTATE; extern uint16_t _TRACE_MIRROR_YIELD_IN_FLIGHT_DSTATE; extern uint16_t _TRACE_BACKUP_DO_COW_ENTER_DSTATE; extern uint16_t _TRACE_BACKUP_DO_COW_RETURN_DSTATE; extern uint16_t _TRACE_BACKUP_DO_COW_SKIP_DSTATE; extern uint16_t _TRACE_BACKUP_DO_COW_PROCESS_DSTATE; extern uint16_t _TRACE_BACKUP_DO_COW_READ_FAIL_DSTATE; extern uint16_t _TRACE_BACKUP_DO_COW_WRITE_FAIL_DSTATE; extern uint16_t _TRACE_QMP_BLOCK_JOB_CANCEL_DSTATE; extern uint16_t _TRACE_QMP_BLOCK_JOB_PAUSE_DSTATE; extern uint16_t _TRACE_QMP_BLOCK_JOB_RESUME_DSTATE; extern uint16_t _TRACE_QMP_BLOCK_JOB_COMPLETE_DSTATE; extern uint16_t _TRACE_QMP_BLOCK_STREAM_DSTATE; extern uint16_t _TRACE_PAIO_SUBMIT_CO_DSTATE; extern uint16_t _TRACE_PAIO_SUBMIT_DSTATE; extern uint16_t _TRACE_QCOW2_WRITEV_START_REQ_DSTATE; extern uint16_t _TRACE_QCOW2_WRITEV_DONE_REQ_DSTATE; extern uint16_t _TRACE_QCOW2_WRITEV_START_PART_DSTATE; extern uint16_t _TRACE_QCOW2_WRITEV_DONE_PART_DSTATE; extern uint16_t _TRACE_QCOW2_WRITEV_DATA_DSTATE; extern uint16_t _TRACE_QCOW2_PWRITE_ZEROES_START_REQ_DSTATE; extern uint16_t _TRACE_QCOW2_PWRITE_ZEROES_DSTATE; extern uint16_t _TRACE_QCOW2_ALLOC_CLUSTERS_OFFSET_DSTATE; extern uint16_t _TRACE_QCOW2_HANDLE_COPIED_DSTATE; extern uint16_t _TRACE_QCOW2_HANDLE_ALLOC_DSTATE; extern uint16_t _TRACE_QCOW2_DO_ALLOC_CLUSTERS_OFFSET_DSTATE; extern uint16_t _TRACE_QCOW2_CLUSTER_ALLOC_PHYS_DSTATE; extern uint16_t _TRACE_QCOW2_CLUSTER_LINK_L2_DSTATE; extern uint16_t _TRACE_QCOW2_L2_ALLOCATE_DSTATE; extern uint16_t _TRACE_QCOW2_L2_ALLOCATE_GET_EMPTY_DSTATE; extern uint16_t _TRACE_QCOW2_L2_ALLOCATE_WRITE_L2_DSTATE; extern uint16_t _TRACE_QCOW2_L2_ALLOCATE_WRITE_L1_DSTATE; extern uint16_t _TRACE_QCOW2_L2_ALLOCATE_DONE_DSTATE; extern uint16_t _TRACE_QCOW2_CACHE_GET_DSTATE; extern uint16_t _TRACE_QCOW2_CACHE_GET_REPLACE_ENTRY_DSTATE; extern uint16_t _TRACE_QCOW2_CACHE_GET_READ_DSTATE; extern uint16_t _TRACE_QCOW2_CACHE_GET_DONE_DSTATE; extern uint16_t _TRACE_QCOW2_CACHE_FLUSH_DSTATE; extern uint16_t _TRACE_QCOW2_CACHE_ENTRY_FLUSH_DSTATE; extern uint16_t _TRACE_QED_ALLOC_L2_CACHE_ENTRY_DSTATE; extern uint16_t _TRACE_QED_UNREF_L2_CACHE_ENTRY_DSTATE; extern uint16_t _TRACE_QED_FIND_L2_CACHE_ENTRY_DSTATE; extern uint16_t _TRACE_QED_READ_TABLE_DSTATE; extern uint16_t _TRACE_QED_READ_TABLE_CB_DSTATE; extern uint16_t _TRACE_QED_WRITE_TABLE_DSTATE; extern uint16_t _TRACE_QED_WRITE_TABLE_CB_DSTATE; extern uint16_t _TRACE_QED_NEED_CHECK_TIMER_CB_DSTATE; extern uint16_t _TRACE_QED_START_NEED_CHECK_TIMER_DSTATE; extern uint16_t _TRACE_QED_CANCEL_NEED_CHECK_TIMER_DSTATE; extern uint16_t _TRACE_QED_AIO_COMPLETE_DSTATE; extern uint16_t _TRACE_QED_AIO_SETUP_DSTATE; extern uint16_t _TRACE_QED_AIO_NEXT_IO_DSTATE; extern uint16_t _TRACE_QED_AIO_READ_DATA_DSTATE; extern uint16_t _TRACE_QED_AIO_WRITE_DATA_DSTATE; extern uint16_t _TRACE_QED_AIO_WRITE_PREFILL_DSTATE; extern uint16_t _TRACE_QED_AIO_WRITE_POSTFILL_DSTATE; extern uint16_t _TRACE_QED_AIO_WRITE_MAIN_DSTATE; extern uint16_t _TRACE_VXHS_IIO_CALLBACK_DSTATE; extern uint16_t _TRACE_VXHS_IIO_CALLBACK_CHNFAIL_DSTATE; extern uint16_t _TRACE_VXHS_IIO_CALLBACK_UNKNWN_DSTATE; extern uint16_t _TRACE_VXHS_AIO_RW_INVALID_DSTATE; extern uint16_t _TRACE_VXHS_AIO_RW_IOERR_DSTATE; extern uint16_t _TRACE_VXHS_GET_VDISK_STAT_ERR_DSTATE; extern uint16_t _TRACE_VXHS_GET_VDISK_STAT_DSTATE; extern uint16_t _TRACE_VXHS_COMPLETE_AIO_DSTATE; extern uint16_t _TRACE_VXHS_PARSE_URI_FILENAME_DSTATE; extern uint16_t _TRACE_VXHS_OPEN_VDISKID_DSTATE; extern uint16_t _TRACE_VXHS_OPEN_HOSTINFO_DSTATE; extern uint16_t _TRACE_VXHS_OPEN_IIO_OPEN_DSTATE; extern uint16_t _TRACE_VXHS_PARSE_URI_HOSTINFO_DSTATE; extern uint16_t _TRACE_VXHS_CLOSE_DSTATE; extern uint16_t _TRACE_VXHS_GET_CREDS_DSTATE; # 282 "block/trace.h" # 1 "//qemu-2.11+dfsg/include/qemu/log.h" 1 /* Private global variables, don't use */ extern FILE *qemu_logfile; extern int qemu_loglevel; /* * The new API: * */ /* Log settings checking macros: */ /* Returns true if qemu_log() will really write somewhere */ static inline # 18 "//qemu-2.11+dfsg/include/qemu/log.h" 3 4 _Bool # 18 "//qemu-2.11+dfsg/include/qemu/log.h" qemu_log_enabled(void) { return qemu_logfile != # 20 "//qemu-2.11+dfsg/include/qemu/log.h" 3 4 ((void *)0) # 20 "//qemu-2.11+dfsg/include/qemu/log.h" ; } /* Returns true if qemu_log() will write somewhere else than stderr */ static inline # 25 "//qemu-2.11+dfsg/include/qemu/log.h" 3 4 _Bool # 25 "//qemu-2.11+dfsg/include/qemu/log.h" qemu_log_separate(void) { return qemu_logfile != # 27 "//qemu-2.11+dfsg/include/qemu/log.h" 3 4 ((void *)0) # 27 "//qemu-2.11+dfsg/include/qemu/log.h" && qemu_logfile != # 27 "//qemu-2.11+dfsg/include/qemu/log.h" 3 4 stderr # 27 "//qemu-2.11+dfsg/include/qemu/log.h" ; } # 47 "//qemu-2.11+dfsg/include/qemu/log.h" /* Returns true if a bit is set in the current loglevel mask */ static inline # 49 "//qemu-2.11+dfsg/include/qemu/log.h" 3 4 _Bool # 49 "//qemu-2.11+dfsg/include/qemu/log.h" qemu_loglevel_mask(int mask) { return (qemu_loglevel & mask) != 0; } /* Lock output for a series of related logs. Since this is not needed * for a single qemu_log / qemu_log_mask / qemu_log_mask_and_addr, we * assume that qemu_loglevel_mask has already been tested, and that * qemu_loglevel is never set when qemu_logfile is unset. */ static inline void qemu_log_lock(void) { qemu_flockfile(qemu_logfile); } static inline void qemu_log_unlock(void) { qemu_funlockfile(qemu_logfile); } /* Logging functions: */ /* main logging function */ int __attribute__((format(gnu_printf, 1, 2))) qemu_log(const char *fmt, ...); /* vfprintf-like logging function */ static inline void __attribute__((format(gnu_printf, 1, 0))) qemu_log_vprintf(const char *fmt, va_list va) { if (qemu_logfile) { vfprintf(qemu_logfile, fmt, va); } } /* log only if a bit is set on the current loglevel mask: * @mask: bit to check in the mask * @fmt: printf-style format string * @args: optional arguments for format string */ /* log only if a bit is set on the current loglevel mask * and we are in the address range we care about: * @mask: bit to check in the mask * @addr: address to check in dfilter * @fmt: printf-style format string * @args: optional arguments for format string */ # 113 "//qemu-2.11+dfsg/include/qemu/log.h" /* Maintenance: */ /* define log items */ typedef struct QEMULogItem { int mask; const char *name; const char *help; } QEMULogItem; extern const QEMULogItem qemu_log_items[]; void qemu_set_log(int log_flags); void qemu_log_needs_buffers(void); void qemu_set_log_filename(const char *filename, Error **errp); void qemu_set_dfilter_ranges(const char *ranges, Error **errp); # 128 "//qemu-2.11+dfsg/include/qemu/log.h" 3 4 _Bool # 128 "//qemu-2.11+dfsg/include/qemu/log.h" qemu_log_in_addr_range(uint64_t addr); int qemu_str_to_log_mask(const char *str); /* Print a usage message listing all the valid logging categories * to the specified FILE*. */ void qemu_print_log_usage(FILE *f); /* fflush() the log file */ void qemu_log_flush(void); /* Close the log file */ void qemu_log_close(void); # 283 "block/trace.h" 2 static inline void _nocheck__trace_bdrv_open_common(void * bs, const char * filename, int flags, const char * format_name) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BDRV_OPEN_COMMON_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 293 "block/trace.h" 3 4 ((void *)0) # 293 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:bdrv_open_common " "bs %p filename \"%s\" flags 0x%x format_name \"%s\"" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, filename, flags, format_name); } } while (0) ; } } static inline void trace_bdrv_open_common(void * bs, const char * filename, int flags, const char * format_name) { if ( # 304 "block/trace.h" 3 4 1 # 304 "block/trace.h" ) { _nocheck__trace_bdrv_open_common(bs, filename, flags, format_name); } } static inline void _nocheck__trace_bdrv_lock_medium(void * bs, # 313 "block/trace.h" 3 4 _Bool # 313 "block/trace.h" locked) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BDRV_LOCK_MEDIUM_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 317 "block/trace.h" 3 4 ((void *)0) # 317 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:bdrv_lock_medium " "bs %p locked %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, locked); } } while (0) ; } } static inline void trace_bdrv_lock_medium(void * bs, # 326 "block/trace.h" 3 4 _Bool # 326 "block/trace.h" locked) { if ( # 328 "block/trace.h" 3 4 1 # 328 "block/trace.h" ) { _nocheck__trace_bdrv_lock_medium(bs, locked); } } static inline void _nocheck__trace_blk_co_preadv(void * blk, void * bs, int64_t offset, unsigned int bytes, int flags) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BLK_CO_PREADV_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 341 "block/trace.h" 3 4 ((void *)0) # 341 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:blk_co_preadv " "blk %p bs %p offset %" # 342 "block/trace.h" 3 4 "l" "d" # 342 "block/trace.h" " bytes %u flags 0x%x" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , blk, bs, offset, bytes, flags); } } while (0) ; } } static inline void trace_blk_co_preadv(void * blk, void * bs, int64_t offset, unsigned int bytes, int flags) { if ( # 352 "block/trace.h" 3 4 1 # 352 "block/trace.h" ) { _nocheck__trace_blk_co_preadv(blk, bs, offset, bytes, flags); } } static inline void _nocheck__trace_blk_co_pwritev(void * blk, void * bs, int64_t offset, unsigned int bytes, int flags) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BLK_CO_PWRITEV_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 365 "block/trace.h" 3 4 ((void *)0) # 365 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:blk_co_pwritev " "blk %p bs %p offset %" # 366 "block/trace.h" 3 4 "l" "d" # 366 "block/trace.h" " bytes %u flags 0x%x" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , blk, bs, offset, bytes, flags); } } while (0) ; } } static inline void trace_blk_co_pwritev(void * blk, void * bs, int64_t offset, unsigned int bytes, int flags) { if ( # 376 "block/trace.h" 3 4 1 # 376 "block/trace.h" ) { _nocheck__trace_blk_co_pwritev(blk, bs, offset, bytes, flags); } } static inline void _nocheck__trace_bdrv_co_preadv(void * bs, int64_t offset, int64_t nbytes, unsigned int flags) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BDRV_CO_PREADV_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 389 "block/trace.h" 3 4 ((void *)0) # 389 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:bdrv_co_preadv " "bs %p offset %" # 390 "block/trace.h" 3 4 "l" "d" # 390 "block/trace.h" " nbytes %" # 390 "block/trace.h" 3 4 "l" "d" # 390 "block/trace.h" " flags 0x%x" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, offset, nbytes, flags); } } while (0) ; } } static inline void trace_bdrv_co_preadv(void * bs, int64_t offset, int64_t nbytes, unsigned int flags) { if ( # 400 "block/trace.h" 3 4 1 # 400 "block/trace.h" ) { _nocheck__trace_bdrv_co_preadv(bs, offset, nbytes, flags); } } static inline void _nocheck__trace_bdrv_co_pwritev(void * bs, int64_t offset, int64_t nbytes, unsigned int flags) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BDRV_CO_PWRITEV_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 413 "block/trace.h" 3 4 ((void *)0) # 413 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:bdrv_co_pwritev " "bs %p offset %" # 414 "block/trace.h" 3 4 "l" "d" # 414 "block/trace.h" " nbytes %" # 414 "block/trace.h" 3 4 "l" "d" # 414 "block/trace.h" " flags 0x%x" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, offset, nbytes, flags); } } while (0) ; } } static inline void trace_bdrv_co_pwritev(void * bs, int64_t offset, int64_t nbytes, unsigned int flags) { if ( # 424 "block/trace.h" 3 4 1 # 424 "block/trace.h" ) { _nocheck__trace_bdrv_co_pwritev(bs, offset, nbytes, flags); } } static inline void _nocheck__trace_bdrv_co_pwrite_zeroes(void * bs, int64_t offset, int count, int flags) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BDRV_CO_PWRITE_ZEROES_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 437 "block/trace.h" 3 4 ((void *)0) # 437 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:bdrv_co_pwrite_zeroes " "bs %p offset %" # 438 "block/trace.h" 3 4 "l" "d" # 438 "block/trace.h" " count %d flags 0x%x" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, offset, count, flags); } } while (0) ; } } static inline void trace_bdrv_co_pwrite_zeroes(void * bs, int64_t offset, int count, int flags) { if ( # 448 "block/trace.h" 3 4 1 # 448 "block/trace.h" ) { _nocheck__trace_bdrv_co_pwrite_zeroes(bs, offset, count, flags); } } static inline void _nocheck__trace_bdrv_co_do_copy_on_readv(void * bs, int64_t offset, unsigned int bytes, int64_t cluster_offset, int64_t cluster_bytes) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BDRV_CO_DO_COPY_ON_READV_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 461 "block/trace.h" 3 4 ((void *)0) # 461 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:bdrv_co_do_copy_on_readv " "bs %p offset %" # 462 "block/trace.h" 3 4 "l" "d" # 462 "block/trace.h" " bytes %u cluster_offset %" # 462 "block/trace.h" 3 4 "l" "d" # 462 "block/trace.h" " cluster_bytes %" # 462 "block/trace.h" 3 4 "l" "d" # 462 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, offset, bytes, cluster_offset, cluster_bytes); } } while (0) ; } } static inline void trace_bdrv_co_do_copy_on_readv(void * bs, int64_t offset, unsigned int bytes, int64_t cluster_offset, int64_t cluster_bytes) { if ( # 472 "block/trace.h" 3 4 1 # 472 "block/trace.h" ) { _nocheck__trace_bdrv_co_do_copy_on_readv(bs, offset, bytes, cluster_offset, cluster_bytes); } } static inline void _nocheck__trace_stream_one_iteration(void * s, int64_t offset, uint64_t bytes, int is_allocated) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_STREAM_ONE_ITERATION_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 485 "block/trace.h" 3 4 ((void *)0) # 485 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:stream_one_iteration " "s %p offset %" # 486 "block/trace.h" 3 4 "l" "d" # 486 "block/trace.h" " bytes %" # 486 "block/trace.h" 3 4 "l" "u" # 486 "block/trace.h" " is_allocated %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, offset, bytes, is_allocated); } } while (0) ; } } static inline void trace_stream_one_iteration(void * s, int64_t offset, uint64_t bytes, int is_allocated) { if ( # 496 "block/trace.h" 3 4 1 # 496 "block/trace.h" ) { _nocheck__trace_stream_one_iteration(s, offset, bytes, is_allocated); } } static inline void _nocheck__trace_stream_start(void * bs, void * base, void * s) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_STREAM_START_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 509 "block/trace.h" 3 4 ((void *)0) # 509 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:stream_start " "bs %p base %p s %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, base, s); } } while (0) ; } } static inline void trace_stream_start(void * bs, void * base, void * s) { if ( # 520 "block/trace.h" 3 4 1 # 520 "block/trace.h" ) { _nocheck__trace_stream_start(bs, base, s); } } static inline void _nocheck__trace_commit_one_iteration(void * s, int64_t offset, uint64_t bytes, int is_allocated) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_COMMIT_ONE_ITERATION_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 533 "block/trace.h" 3 4 ((void *)0) # 533 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:commit_one_iteration " "s %p offset %" # 534 "block/trace.h" 3 4 "l" "d" # 534 "block/trace.h" " bytes %" # 534 "block/trace.h" 3 4 "l" "u" # 534 "block/trace.h" " is_allocated %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, offset, bytes, is_allocated); } } while (0) ; } } static inline void trace_commit_one_iteration(void * s, int64_t offset, uint64_t bytes, int is_allocated) { if ( # 544 "block/trace.h" 3 4 1 # 544 "block/trace.h" ) { _nocheck__trace_commit_one_iteration(s, offset, bytes, is_allocated); } } static inline void _nocheck__trace_commit_start(void * bs, void * base, void * top, void * s) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_COMMIT_START_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 557 "block/trace.h" 3 4 ((void *)0) # 557 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:commit_start " "bs %p base %p top %p s %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, base, top, s); } } while (0) ; } } static inline void trace_commit_start(void * bs, void * base, void * top, void * s) { if ( # 568 "block/trace.h" 3 4 1 # 568 "block/trace.h" ) { _nocheck__trace_commit_start(bs, base, top, s); } } static inline void _nocheck__trace_mirror_start(void * bs, void * s, void * opaque) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_MIRROR_START_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 581 "block/trace.h" 3 4 ((void *)0) # 581 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:mirror_start " "bs %p s %p opaque %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, s, opaque); } } while (0) ; } } static inline void trace_mirror_start(void * bs, void * s, void * opaque) { if ( # 592 "block/trace.h" 3 4 1 # 592 "block/trace.h" ) { _nocheck__trace_mirror_start(bs, s, opaque); } } static inline void _nocheck__trace_mirror_restart_iter(void * s, int64_t cnt) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_MIRROR_RESTART_ITER_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 605 "block/trace.h" 3 4 ((void *)0) # 605 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:mirror_restart_iter " "s %p dirty count %" # 606 "block/trace.h" 3 4 "l" "d" # 606 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, cnt); } } while (0) ; } } static inline void trace_mirror_restart_iter(void * s, int64_t cnt) { if ( # 616 "block/trace.h" 3 4 1 # 616 "block/trace.h" ) { _nocheck__trace_mirror_restart_iter(s, cnt); } } static inline void _nocheck__trace_mirror_before_flush(void * s) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_MIRROR_BEFORE_FLUSH_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 629 "block/trace.h" 3 4 ((void *)0) # 629 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:mirror_before_flush " "s %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s); } } while (0) ; } } static inline void trace_mirror_before_flush(void * s) { if ( # 640 "block/trace.h" 3 4 1 # 640 "block/trace.h" ) { _nocheck__trace_mirror_before_flush(s); } } static inline void _nocheck__trace_mirror_before_drain(void * s, int64_t cnt) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_MIRROR_BEFORE_DRAIN_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 653 "block/trace.h" 3 4 ((void *)0) # 653 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:mirror_before_drain " "s %p dirty count %" # 654 "block/trace.h" 3 4 "l" "d" # 654 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, cnt); } } while (0) ; } } static inline void trace_mirror_before_drain(void * s, int64_t cnt) { if ( # 664 "block/trace.h" 3 4 1 # 664 "block/trace.h" ) { _nocheck__trace_mirror_before_drain(s, cnt); } } static inline void _nocheck__trace_mirror_before_sleep(void * s, int64_t cnt, int synced, uint64_t delay_ns) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_MIRROR_BEFORE_SLEEP_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 677 "block/trace.h" 3 4 ((void *)0) # 677 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:mirror_before_sleep " "s %p dirty count %" # 678 "block/trace.h" 3 4 "l" "d" # 678 "block/trace.h" " synced %d delay %" # 678 "block/trace.h" 3 4 "l" "u" # 678 "block/trace.h" "ns" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, cnt, synced, delay_ns); } } while (0) ; } } static inline void trace_mirror_before_sleep(void * s, int64_t cnt, int synced, uint64_t delay_ns) { if ( # 688 "block/trace.h" 3 4 1 # 688 "block/trace.h" ) { _nocheck__trace_mirror_before_sleep(s, cnt, synced, delay_ns); } } static inline void _nocheck__trace_mirror_one_iteration(void * s, int64_t offset, uint64_t bytes) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_MIRROR_ONE_ITERATION_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 701 "block/trace.h" 3 4 ((void *)0) # 701 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:mirror_one_iteration " "s %p offset %" # 702 "block/trace.h" 3 4 "l" "d" # 702 "block/trace.h" " bytes %" # 702 "block/trace.h" 3 4 "l" "u" # 702 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, offset, bytes); } } while (0) ; } } static inline void trace_mirror_one_iteration(void * s, int64_t offset, uint64_t bytes) { if ( # 712 "block/trace.h" 3 4 1 # 712 "block/trace.h" ) { _nocheck__trace_mirror_one_iteration(s, offset, bytes); } } static inline void _nocheck__trace_mirror_iteration_done(void * s, int64_t offset, uint64_t bytes, int ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_MIRROR_ITERATION_DONE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 725 "block/trace.h" 3 4 ((void *)0) # 725 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:mirror_iteration_done " "s %p offset %" # 726 "block/trace.h" 3 4 "l" "d" # 726 "block/trace.h" " bytes %" # 726 "block/trace.h" 3 4 "l" "u" # 726 "block/trace.h" " ret %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, offset, bytes, ret); } } while (0) ; } } static inline void trace_mirror_iteration_done(void * s, int64_t offset, uint64_t bytes, int ret) { if ( # 736 "block/trace.h" 3 4 1 # 736 "block/trace.h" ) { _nocheck__trace_mirror_iteration_done(s, offset, bytes, ret); } } static inline void _nocheck__trace_mirror_yield(void * s, int64_t cnt, int buf_free_count, int in_flight) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_MIRROR_YIELD_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 749 "block/trace.h" 3 4 ((void *)0) # 749 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:mirror_yield " "s %p dirty count %" # 750 "block/trace.h" 3 4 "l" "d" # 750 "block/trace.h" " free buffers %d in_flight %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, cnt, buf_free_count, in_flight); } } while (0) ; } } static inline void trace_mirror_yield(void * s, int64_t cnt, int buf_free_count, int in_flight) { if ( # 760 "block/trace.h" 3 4 1 # 760 "block/trace.h" ) { _nocheck__trace_mirror_yield(s, cnt, buf_free_count, in_flight); } } static inline void _nocheck__trace_mirror_yield_in_flight(void * s, int64_t offset, int in_flight) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_MIRROR_YIELD_IN_FLIGHT_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 773 "block/trace.h" 3 4 ((void *)0) # 773 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:mirror_yield_in_flight " "s %p offset %" # 774 "block/trace.h" 3 4 "l" "d" # 774 "block/trace.h" " in_flight %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, offset, in_flight); } } while (0) ; } } static inline void trace_mirror_yield_in_flight(void * s, int64_t offset, int in_flight) { if ( # 784 "block/trace.h" 3 4 1 # 784 "block/trace.h" ) { _nocheck__trace_mirror_yield_in_flight(s, offset, in_flight); } } static inline void _nocheck__trace_backup_do_cow_enter(void * job, int64_t start, int64_t offset, uint64_t bytes) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BACKUP_DO_COW_ENTER_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 797 "block/trace.h" 3 4 ((void *)0) # 797 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:backup_do_cow_enter " "job %p start %" # 798 "block/trace.h" 3 4 "l" "d" # 798 "block/trace.h" " offset %" # 798 "block/trace.h" 3 4 "l" "d" # 798 "block/trace.h" " bytes %" # 798 "block/trace.h" 3 4 "l" "u" # 798 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job, start, offset, bytes); } } while (0) ; } } static inline void trace_backup_do_cow_enter(void * job, int64_t start, int64_t offset, uint64_t bytes) { if ( # 808 "block/trace.h" 3 4 1 # 808 "block/trace.h" ) { _nocheck__trace_backup_do_cow_enter(job, start, offset, bytes); } } static inline void _nocheck__trace_backup_do_cow_return(void * job, int64_t offset, uint64_t bytes, int ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BACKUP_DO_COW_RETURN_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 821 "block/trace.h" 3 4 ((void *)0) # 821 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:backup_do_cow_return " "job %p offset %" # 822 "block/trace.h" 3 4 "l" "d" # 822 "block/trace.h" " bytes %" # 822 "block/trace.h" 3 4 "l" "u" # 822 "block/trace.h" " ret %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job, offset, bytes, ret); } } while (0) ; } } static inline void trace_backup_do_cow_return(void * job, int64_t offset, uint64_t bytes, int ret) { if ( # 832 "block/trace.h" 3 4 1 # 832 "block/trace.h" ) { _nocheck__trace_backup_do_cow_return(job, offset, bytes, ret); } } static inline void _nocheck__trace_backup_do_cow_skip(void * job, int64_t start) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BACKUP_DO_COW_SKIP_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 845 "block/trace.h" 3 4 ((void *)0) # 845 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:backup_do_cow_skip " "job %p start %" # 846 "block/trace.h" 3 4 "l" "d" # 846 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job, start); } } while (0) ; } } static inline void trace_backup_do_cow_skip(void * job, int64_t start) { if ( # 856 "block/trace.h" 3 4 1 # 856 "block/trace.h" ) { _nocheck__trace_backup_do_cow_skip(job, start); } } static inline void _nocheck__trace_backup_do_cow_process(void * job, int64_t start) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BACKUP_DO_COW_PROCESS_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 869 "block/trace.h" 3 4 ((void *)0) # 869 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:backup_do_cow_process " "job %p start %" # 870 "block/trace.h" 3 4 "l" "d" # 870 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job, start); } } while (0) ; } } static inline void trace_backup_do_cow_process(void * job, int64_t start) { if ( # 880 "block/trace.h" 3 4 1 # 880 "block/trace.h" ) { _nocheck__trace_backup_do_cow_process(job, start); } } static inline void _nocheck__trace_backup_do_cow_read_fail(void * job, int64_t start, int ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BACKUP_DO_COW_READ_FAIL_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 893 "block/trace.h" 3 4 ((void *)0) # 893 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:backup_do_cow_read_fail " "job %p start %" # 894 "block/trace.h" 3 4 "l" "d" # 894 "block/trace.h" " ret %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job, start, ret); } } while (0) ; } } static inline void trace_backup_do_cow_read_fail(void * job, int64_t start, int ret) { if ( # 904 "block/trace.h" 3 4 1 # 904 "block/trace.h" ) { _nocheck__trace_backup_do_cow_read_fail(job, start, ret); } } static inline void _nocheck__trace_backup_do_cow_write_fail(void * job, int64_t start, int ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_BACKUP_DO_COW_WRITE_FAIL_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 917 "block/trace.h" 3 4 ((void *)0) # 917 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:backup_do_cow_write_fail " "job %p start %" # 918 "block/trace.h" 3 4 "l" "d" # 918 "block/trace.h" " ret %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job, start, ret); } } while (0) ; } } static inline void trace_backup_do_cow_write_fail(void * job, int64_t start, int ret) { if ( # 928 "block/trace.h" 3 4 1 # 928 "block/trace.h" ) { _nocheck__trace_backup_do_cow_write_fail(job, start, ret); } } static inline void _nocheck__trace_qmp_block_job_cancel(void * job) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QMP_BLOCK_JOB_CANCEL_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 941 "block/trace.h" 3 4 ((void *)0) # 941 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qmp_block_job_cancel " "job %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job); } } while (0) ; } } static inline void trace_qmp_block_job_cancel(void * job) { if ( # 952 "block/trace.h" 3 4 1 # 952 "block/trace.h" ) { _nocheck__trace_qmp_block_job_cancel(job); } } static inline void _nocheck__trace_qmp_block_job_pause(void * job) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QMP_BLOCK_JOB_PAUSE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 965 "block/trace.h" 3 4 ((void *)0) # 965 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qmp_block_job_pause " "job %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job); } } while (0) ; } } static inline void trace_qmp_block_job_pause(void * job) { if ( # 976 "block/trace.h" 3 4 1 # 976 "block/trace.h" ) { _nocheck__trace_qmp_block_job_pause(job); } } static inline void _nocheck__trace_qmp_block_job_resume(void * job) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QMP_BLOCK_JOB_RESUME_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 989 "block/trace.h" 3 4 ((void *)0) # 989 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qmp_block_job_resume " "job %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job); } } while (0) ; } } static inline void trace_qmp_block_job_resume(void * job) { if ( # 1000 "block/trace.h" 3 4 1 # 1000 "block/trace.h" ) { _nocheck__trace_qmp_block_job_resume(job); } } static inline void _nocheck__trace_qmp_block_job_complete(void * job) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QMP_BLOCK_JOB_COMPLETE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1013 "block/trace.h" 3 4 ((void *)0) # 1013 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qmp_block_job_complete " "job %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , job); } } while (0) ; } } static inline void trace_qmp_block_job_complete(void * job) { if ( # 1024 "block/trace.h" 3 4 1 # 1024 "block/trace.h" ) { _nocheck__trace_qmp_block_job_complete(job); } } static inline void _nocheck__trace_qmp_block_stream(void * bs, void * job) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QMP_BLOCK_STREAM_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1037 "block/trace.h" 3 4 ((void *)0) # 1037 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qmp_block_stream " "bs %p job %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, job); } } while (0) ; } } static inline void trace_qmp_block_stream(void * bs, void * job) { if ( # 1048 "block/trace.h" 3 4 1 # 1048 "block/trace.h" ) { _nocheck__trace_qmp_block_stream(bs, job); } } static inline void _nocheck__trace_paio_submit_co(int64_t offset, int count, int type) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_PAIO_SUBMIT_CO_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1061 "block/trace.h" 3 4 ((void *)0) # 1061 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:paio_submit_co " "offset %" # 1062 "block/trace.h" 3 4 "l" "d" # 1062 "block/trace.h" " count %d type %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , offset, count, type); } } while (0) ; } } static inline void trace_paio_submit_co(int64_t offset, int count, int type) { if ( # 1072 "block/trace.h" 3 4 1 # 1072 "block/trace.h" ) { _nocheck__trace_paio_submit_co(offset, count, type); } } static inline void _nocheck__trace_paio_submit(void * acb, void * opaque, int64_t offset, int count, int type) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_PAIO_SUBMIT_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1085 "block/trace.h" 3 4 ((void *)0) # 1085 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:paio_submit " "acb %p opaque %p offset %" # 1086 "block/trace.h" 3 4 "l" "d" # 1086 "block/trace.h" " count %d type %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , acb, opaque, offset, count, type); } } while (0) ; } } static inline void trace_paio_submit(void * acb, void * opaque, int64_t offset, int count, int type) { if ( # 1096 "block/trace.h" 3 4 1 # 1096 "block/trace.h" ) { _nocheck__trace_paio_submit(acb, opaque, offset, count, type); } } static inline void _nocheck__trace_qcow2_writev_start_req(void * co, int64_t offset, int bytes) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_WRITEV_START_REQ_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1109 "block/trace.h" 3 4 ((void *)0) # 1109 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_writev_start_req " "co %p offset 0x%" # 1110 "block/trace.h" 3 4 "l" "x" # 1110 "block/trace.h" " bytes %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, offset, bytes); } } while (0) ; } } static inline void trace_qcow2_writev_start_req(void * co, int64_t offset, int bytes) { if ( # 1120 "block/trace.h" 3 4 1 # 1120 "block/trace.h" ) { _nocheck__trace_qcow2_writev_start_req(co, offset, bytes); } } static inline void _nocheck__trace_qcow2_writev_done_req(void * co, int ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_WRITEV_DONE_REQ_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1133 "block/trace.h" 3 4 ((void *)0) # 1133 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_writev_done_req " "co %p ret %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, ret); } } while (0) ; } } static inline void trace_qcow2_writev_done_req(void * co, int ret) { if ( # 1144 "block/trace.h" 3 4 1 # 1144 "block/trace.h" ) { _nocheck__trace_qcow2_writev_done_req(co, ret); } } static inline void _nocheck__trace_qcow2_writev_start_part(void * co) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_WRITEV_START_PART_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1157 "block/trace.h" 3 4 ((void *)0) # 1157 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_writev_start_part " "co %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co); } } while (0) ; } } static inline void trace_qcow2_writev_start_part(void * co) { if ( # 1168 "block/trace.h" 3 4 1 # 1168 "block/trace.h" ) { _nocheck__trace_qcow2_writev_start_part(co); } } static inline void _nocheck__trace_qcow2_writev_done_part(void * co, int cur_bytes) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_WRITEV_DONE_PART_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1181 "block/trace.h" 3 4 ((void *)0) # 1181 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_writev_done_part " "co %p cur_bytes %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, cur_bytes); } } while (0) ; } } static inline void trace_qcow2_writev_done_part(void * co, int cur_bytes) { if ( # 1192 "block/trace.h" 3 4 1 # 1192 "block/trace.h" ) { _nocheck__trace_qcow2_writev_done_part(co, cur_bytes); } } static inline void _nocheck__trace_qcow2_writev_data(void * co, uint64_t offset) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_WRITEV_DATA_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1205 "block/trace.h" 3 4 ((void *)0) # 1205 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_writev_data " "co %p offset 0x%" # 1206 "block/trace.h" 3 4 "l" "x" # 1206 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, offset); } } while (0) ; } } static inline void trace_qcow2_writev_data(void * co, uint64_t offset) { if ( # 1216 "block/trace.h" 3 4 1 # 1216 "block/trace.h" ) { _nocheck__trace_qcow2_writev_data(co, offset); } } static inline void _nocheck__trace_qcow2_pwrite_zeroes_start_req(void * co, int64_t offset, int count) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_PWRITE_ZEROES_START_REQ_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1229 "block/trace.h" 3 4 ((void *)0) # 1229 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_pwrite_zeroes_start_req " "co %p offset 0x%" # 1230 "block/trace.h" 3 4 "l" "x" # 1230 "block/trace.h" " count %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, offset, count); } } while (0) ; } } static inline void trace_qcow2_pwrite_zeroes_start_req(void * co, int64_t offset, int count) { if ( # 1240 "block/trace.h" 3 4 1 # 1240 "block/trace.h" ) { _nocheck__trace_qcow2_pwrite_zeroes_start_req(co, offset, count); } } static inline void _nocheck__trace_qcow2_pwrite_zeroes(void * co, int64_t offset, int count) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_PWRITE_ZEROES_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1253 "block/trace.h" 3 4 ((void *)0) # 1253 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_pwrite_zeroes " "co %p offset 0x%" # 1254 "block/trace.h" 3 4 "l" "x" # 1254 "block/trace.h" " count %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, offset, count); } } while (0) ; } } static inline void trace_qcow2_pwrite_zeroes(void * co, int64_t offset, int count) { if ( # 1264 "block/trace.h" 3 4 1 # 1264 "block/trace.h" ) { _nocheck__trace_qcow2_pwrite_zeroes(co, offset, count); } } static inline void _nocheck__trace_qcow2_alloc_clusters_offset(void * co, uint64_t offset, int bytes) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_ALLOC_CLUSTERS_OFFSET_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1277 "block/trace.h" 3 4 ((void *)0) # 1277 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_alloc_clusters_offset " "co %p offset 0x%" # 1278 "block/trace.h" 3 4 "l" "x" # 1278 "block/trace.h" " bytes %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, offset, bytes); } } while (0) ; } } static inline void trace_qcow2_alloc_clusters_offset(void * co, uint64_t offset, int bytes) { if ( # 1288 "block/trace.h" 3 4 1 # 1288 "block/trace.h" ) { _nocheck__trace_qcow2_alloc_clusters_offset(co, offset, bytes); } } static inline void _nocheck__trace_qcow2_handle_copied(void * co, uint64_t guest_offset, uint64_t host_offset, uint64_t bytes) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_HANDLE_COPIED_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1301 "block/trace.h" 3 4 ((void *)0) # 1301 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_handle_copied " "co %p guest_offset 0x%" # 1302 "block/trace.h" 3 4 "l" "x" # 1302 "block/trace.h" " host_offset 0x%" # 1302 "block/trace.h" 3 4 "l" "x" # 1302 "block/trace.h" " bytes 0x%" # 1302 "block/trace.h" 3 4 "l" "x" # 1302 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, guest_offset, host_offset, bytes); } } while (0) ; } } static inline void trace_qcow2_handle_copied(void * co, uint64_t guest_offset, uint64_t host_offset, uint64_t bytes) { if ( # 1312 "block/trace.h" 3 4 1 # 1312 "block/trace.h" ) { _nocheck__trace_qcow2_handle_copied(co, guest_offset, host_offset, bytes); } } static inline void _nocheck__trace_qcow2_handle_alloc(void * co, uint64_t guest_offset, uint64_t host_offset, uint64_t bytes) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_HANDLE_ALLOC_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1325 "block/trace.h" 3 4 ((void *)0) # 1325 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_handle_alloc " "co %p guest_offset 0x%" # 1326 "block/trace.h" 3 4 "l" "x" # 1326 "block/trace.h" " host_offset 0x%" # 1326 "block/trace.h" 3 4 "l" "x" # 1326 "block/trace.h" " bytes 0x%" # 1326 "block/trace.h" 3 4 "l" "x" # 1326 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, guest_offset, host_offset, bytes); } } while (0) ; } } static inline void trace_qcow2_handle_alloc(void * co, uint64_t guest_offset, uint64_t host_offset, uint64_t bytes) { if ( # 1336 "block/trace.h" 3 4 1 # 1336 "block/trace.h" ) { _nocheck__trace_qcow2_handle_alloc(co, guest_offset, host_offset, bytes); } } static inline void _nocheck__trace_qcow2_do_alloc_clusters_offset(void * co, uint64_t guest_offset, uint64_t host_offset, int nb_clusters) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_DO_ALLOC_CLUSTERS_OFFSET_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1349 "block/trace.h" 3 4 ((void *)0) # 1349 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_do_alloc_clusters_offset " "co %p guest_offset 0x%" # 1350 "block/trace.h" 3 4 "l" "x" # 1350 "block/trace.h" " host_offset 0x%" # 1350 "block/trace.h" 3 4 "l" "x" # 1350 "block/trace.h" " nb_clusters %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, guest_offset, host_offset, nb_clusters); } } while (0) ; } } static inline void trace_qcow2_do_alloc_clusters_offset(void * co, uint64_t guest_offset, uint64_t host_offset, int nb_clusters) { if ( # 1360 "block/trace.h" 3 4 1 # 1360 "block/trace.h" ) { _nocheck__trace_qcow2_do_alloc_clusters_offset(co, guest_offset, host_offset, nb_clusters); } } static inline void _nocheck__trace_qcow2_cluster_alloc_phys(void * co) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_CLUSTER_ALLOC_PHYS_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1373 "block/trace.h" 3 4 ((void *)0) # 1373 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_cluster_alloc_phys " "co %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co); } } while (0) ; } } static inline void trace_qcow2_cluster_alloc_phys(void * co) { if ( # 1384 "block/trace.h" 3 4 1 # 1384 "block/trace.h" ) { _nocheck__trace_qcow2_cluster_alloc_phys(co); } } static inline void _nocheck__trace_qcow2_cluster_link_l2(void * co, int nb_clusters) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_CLUSTER_LINK_L2_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1397 "block/trace.h" 3 4 ((void *)0) # 1397 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_cluster_link_l2 " "co %p nb_clusters %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, nb_clusters); } } while (0) ; } } static inline void trace_qcow2_cluster_link_l2(void * co, int nb_clusters) { if ( # 1408 "block/trace.h" 3 4 1 # 1408 "block/trace.h" ) { _nocheck__trace_qcow2_cluster_link_l2(co, nb_clusters); } } static inline void _nocheck__trace_qcow2_l2_allocate(void * bs, int l1_index) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_L2_ALLOCATE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1421 "block/trace.h" 3 4 ((void *)0) # 1421 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_l2_allocate " "bs %p l1_index %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, l1_index); } } while (0) ; } } static inline void trace_qcow2_l2_allocate(void * bs, int l1_index) { if ( # 1432 "block/trace.h" 3 4 1 # 1432 "block/trace.h" ) { _nocheck__trace_qcow2_l2_allocate(bs, l1_index); } } static inline void _nocheck__trace_qcow2_l2_allocate_get_empty(void * bs, int l1_index) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_L2_ALLOCATE_GET_EMPTY_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1445 "block/trace.h" 3 4 ((void *)0) # 1445 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_l2_allocate_get_empty " "bs %p l1_index %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, l1_index); } } while (0) ; } } static inline void trace_qcow2_l2_allocate_get_empty(void * bs, int l1_index) { if ( # 1456 "block/trace.h" 3 4 1 # 1456 "block/trace.h" ) { _nocheck__trace_qcow2_l2_allocate_get_empty(bs, l1_index); } } static inline void _nocheck__trace_qcow2_l2_allocate_write_l2(void * bs, int l1_index) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_L2_ALLOCATE_WRITE_L2_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1469 "block/trace.h" 3 4 ((void *)0) # 1469 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_l2_allocate_write_l2 " "bs %p l1_index %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, l1_index); } } while (0) ; } } static inline void trace_qcow2_l2_allocate_write_l2(void * bs, int l1_index) { if ( # 1480 "block/trace.h" 3 4 1 # 1480 "block/trace.h" ) { _nocheck__trace_qcow2_l2_allocate_write_l2(bs, l1_index); } } static inline void _nocheck__trace_qcow2_l2_allocate_write_l1(void * bs, int l1_index) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_L2_ALLOCATE_WRITE_L1_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1493 "block/trace.h" 3 4 ((void *)0) # 1493 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_l2_allocate_write_l1 " "bs %p l1_index %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, l1_index); } } while (0) ; } } static inline void trace_qcow2_l2_allocate_write_l1(void * bs, int l1_index) { if ( # 1504 "block/trace.h" 3 4 1 # 1504 "block/trace.h" ) { _nocheck__trace_qcow2_l2_allocate_write_l1(bs, l1_index); } } static inline void _nocheck__trace_qcow2_l2_allocate_done(void * bs, int l1_index, int ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_L2_ALLOCATE_DONE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1517 "block/trace.h" 3 4 ((void *)0) # 1517 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_l2_allocate_done " "bs %p l1_index %d ret %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , bs, l1_index, ret); } } while (0) ; } } static inline void trace_qcow2_l2_allocate_done(void * bs, int l1_index, int ret) { if ( # 1528 "block/trace.h" 3 4 1 # 1528 "block/trace.h" ) { _nocheck__trace_qcow2_l2_allocate_done(bs, l1_index, ret); } } static inline void _nocheck__trace_qcow2_cache_get(void * co, int c, uint64_t offset, # 1537 "block/trace.h" 3 4 _Bool # 1537 "block/trace.h" read_from_disk) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_CACHE_GET_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1541 "block/trace.h" 3 4 ((void *)0) # 1541 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_cache_get " "co %p is_l2_cache %d offset 0x%" # 1542 "block/trace.h" 3 4 "l" "x" # 1542 "block/trace.h" " read_from_disk %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, c, offset, read_from_disk); } } while (0) ; } } static inline void trace_qcow2_cache_get(void * co, int c, uint64_t offset, # 1550 "block/trace.h" 3 4 _Bool # 1550 "block/trace.h" read_from_disk) { if ( # 1552 "block/trace.h" 3 4 1 # 1552 "block/trace.h" ) { _nocheck__trace_qcow2_cache_get(co, c, offset, read_from_disk); } } static inline void _nocheck__trace_qcow2_cache_get_replace_entry(void * co, int c, int i) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_CACHE_GET_REPLACE_ENTRY_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1565 "block/trace.h" 3 4 ((void *)0) # 1565 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_cache_get_replace_entry " "co %p is_l2_cache %d index %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, c, i); } } while (0) ; } } static inline void trace_qcow2_cache_get_replace_entry(void * co, int c, int i) { if ( # 1576 "block/trace.h" 3 4 1 # 1576 "block/trace.h" ) { _nocheck__trace_qcow2_cache_get_replace_entry(co, c, i); } } static inline void _nocheck__trace_qcow2_cache_get_read(void * co, int c, int i) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_CACHE_GET_READ_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1589 "block/trace.h" 3 4 ((void *)0) # 1589 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_cache_get_read " "co %p is_l2_cache %d index %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, c, i); } } while (0) ; } } static inline void trace_qcow2_cache_get_read(void * co, int c, int i) { if ( # 1600 "block/trace.h" 3 4 1 # 1600 "block/trace.h" ) { _nocheck__trace_qcow2_cache_get_read(co, c, i); } } static inline void _nocheck__trace_qcow2_cache_get_done(void * co, int c, int i) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_CACHE_GET_DONE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1613 "block/trace.h" 3 4 ((void *)0) # 1613 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_cache_get_done " "co %p is_l2_cache %d index %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, c, i); } } while (0) ; } } static inline void trace_qcow2_cache_get_done(void * co, int c, int i) { if ( # 1624 "block/trace.h" 3 4 1 # 1624 "block/trace.h" ) { _nocheck__trace_qcow2_cache_get_done(co, c, i); } } static inline void _nocheck__trace_qcow2_cache_flush(void * co, int c) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_CACHE_FLUSH_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1637 "block/trace.h" 3 4 ((void *)0) # 1637 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_cache_flush " "co %p is_l2_cache %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, c); } } while (0) ; } } static inline void trace_qcow2_cache_flush(void * co, int c) { if ( # 1648 "block/trace.h" 3 4 1 # 1648 "block/trace.h" ) { _nocheck__trace_qcow2_cache_flush(co, c); } } static inline void _nocheck__trace_qcow2_cache_entry_flush(void * co, int c, int i) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QCOW2_CACHE_ENTRY_FLUSH_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1661 "block/trace.h" 3 4 ((void *)0) # 1661 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qcow2_cache_entry_flush " "co %p is_l2_cache %d index %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , co, c, i); } } while (0) ; } } static inline void trace_qcow2_cache_entry_flush(void * co, int c, int i) { if ( # 1672 "block/trace.h" 3 4 1 # 1672 "block/trace.h" ) { _nocheck__trace_qcow2_cache_entry_flush(co, c, i); } } static inline void _nocheck__trace_qed_alloc_l2_cache_entry(void * l2_cache, void * entry) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_ALLOC_L2_CACHE_ENTRY_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1685 "block/trace.h" 3 4 ((void *)0) # 1685 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_alloc_l2_cache_entry " "l2_cache %p entry %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , l2_cache, entry); } } while (0) ; } } static inline void trace_qed_alloc_l2_cache_entry(void * l2_cache, void * entry) { if ( # 1696 "block/trace.h" 3 4 1 # 1696 "block/trace.h" ) { _nocheck__trace_qed_alloc_l2_cache_entry(l2_cache, entry); } } static inline void _nocheck__trace_qed_unref_l2_cache_entry(void * entry, int ref) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_UNREF_L2_CACHE_ENTRY_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1709 "block/trace.h" 3 4 ((void *)0) # 1709 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_unref_l2_cache_entry " "entry %p ref %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , entry, ref); } } while (0) ; } } static inline void trace_qed_unref_l2_cache_entry(void * entry, int ref) { if ( # 1720 "block/trace.h" 3 4 1 # 1720 "block/trace.h" ) { _nocheck__trace_qed_unref_l2_cache_entry(entry, ref); } } static inline void _nocheck__trace_qed_find_l2_cache_entry(void * l2_cache, void * entry, uint64_t offset, int ref) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_FIND_L2_CACHE_ENTRY_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1733 "block/trace.h" 3 4 ((void *)0) # 1733 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_find_l2_cache_entry " "l2_cache %p entry %p offset %" # 1734 "block/trace.h" 3 4 "l" "u" # 1734 "block/trace.h" " ref %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , l2_cache, entry, offset, ref); } } while (0) ; } } static inline void trace_qed_find_l2_cache_entry(void * l2_cache, void * entry, uint64_t offset, int ref) { if ( # 1744 "block/trace.h" 3 4 1 # 1744 "block/trace.h" ) { _nocheck__trace_qed_find_l2_cache_entry(l2_cache, entry, offset, ref); } } static inline void _nocheck__trace_qed_read_table(void * s, uint64_t offset, void * table) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_READ_TABLE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1757 "block/trace.h" 3 4 ((void *)0) # 1757 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_read_table " "s %p offset %" # 1758 "block/trace.h" 3 4 "l" "u" # 1758 "block/trace.h" " table %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, offset, table); } } while (0) ; } } static inline void trace_qed_read_table(void * s, uint64_t offset, void * table) { if ( # 1768 "block/trace.h" 3 4 1 # 1768 "block/trace.h" ) { _nocheck__trace_qed_read_table(s, offset, table); } } static inline void _nocheck__trace_qed_read_table_cb(void * s, void * table, int ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_READ_TABLE_CB_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1781 "block/trace.h" 3 4 ((void *)0) # 1781 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_read_table_cb " "s %p table %p ret %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, table, ret); } } while (0) ; } } static inline void trace_qed_read_table_cb(void * s, void * table, int ret) { if ( # 1792 "block/trace.h" 3 4 1 # 1792 "block/trace.h" ) { _nocheck__trace_qed_read_table_cb(s, table, ret); } } static inline void _nocheck__trace_qed_write_table(void * s, uint64_t offset, void * table, unsigned int index, unsigned int n) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_WRITE_TABLE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1805 "block/trace.h" 3 4 ((void *)0) # 1805 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_write_table " "s %p offset %" # 1806 "block/trace.h" 3 4 "l" "u" # 1806 "block/trace.h" " table %p index %u n %u" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, offset, table, index, n); } } while (0) ; } } static inline void trace_qed_write_table(void * s, uint64_t offset, void * table, unsigned int index, unsigned int n) { if ( # 1816 "block/trace.h" 3 4 1 # 1816 "block/trace.h" ) { _nocheck__trace_qed_write_table(s, offset, table, index, n); } } static inline void _nocheck__trace_qed_write_table_cb(void * s, void * table, int flush, int ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_WRITE_TABLE_CB_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1829 "block/trace.h" 3 4 ((void *)0) # 1829 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_write_table_cb " "s %p table %p flush %d ret %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, table, flush, ret); } } while (0) ; } } static inline void trace_qed_write_table_cb(void * s, void * table, int flush, int ret) { if ( # 1840 "block/trace.h" 3 4 1 # 1840 "block/trace.h" ) { _nocheck__trace_qed_write_table_cb(s, table, flush, ret); } } static inline void _nocheck__trace_qed_need_check_timer_cb(void * s) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_NEED_CHECK_TIMER_CB_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1853 "block/trace.h" 3 4 ((void *)0) # 1853 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_need_check_timer_cb " "s %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s); } } while (0) ; } } static inline void trace_qed_need_check_timer_cb(void * s) { if ( # 1864 "block/trace.h" 3 4 1 # 1864 "block/trace.h" ) { _nocheck__trace_qed_need_check_timer_cb(s); } } static inline void _nocheck__trace_qed_start_need_check_timer(void * s) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_START_NEED_CHECK_TIMER_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1877 "block/trace.h" 3 4 ((void *)0) # 1877 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_start_need_check_timer " "s %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s); } } while (0) ; } } static inline void trace_qed_start_need_check_timer(void * s) { if ( # 1888 "block/trace.h" 3 4 1 # 1888 "block/trace.h" ) { _nocheck__trace_qed_start_need_check_timer(s); } } static inline void _nocheck__trace_qed_cancel_need_check_timer(void * s) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_CANCEL_NEED_CHECK_TIMER_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1901 "block/trace.h" 3 4 ((void *)0) # 1901 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_cancel_need_check_timer " "s %p" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s); } } while (0) ; } } static inline void trace_qed_cancel_need_check_timer(void * s) { if ( # 1912 "block/trace.h" 3 4 1 # 1912 "block/trace.h" ) { _nocheck__trace_qed_cancel_need_check_timer(s); } } static inline void _nocheck__trace_qed_aio_complete(void * s, void * acb, int ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_AIO_COMPLETE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1925 "block/trace.h" 3 4 ((void *)0) # 1925 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_aio_complete " "s %p acb %p ret %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, acb, ret); } } while (0) ; } } static inline void trace_qed_aio_complete(void * s, void * acb, int ret) { if ( # 1936 "block/trace.h" 3 4 1 # 1936 "block/trace.h" ) { _nocheck__trace_qed_aio_complete(s, acb, ret); } } static inline void _nocheck__trace_qed_aio_setup(void * s, void * acb, int64_t sector_num, int nb_sectors, void * opaque, int flags) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_AIO_SETUP_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1949 "block/trace.h" 3 4 ((void *)0) # 1949 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_aio_setup " "s %p acb %p sector_num %" # 1950 "block/trace.h" 3 4 "l" "d" # 1950 "block/trace.h" " nb_sectors %d opaque %p flags 0x%x" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, acb, sector_num, nb_sectors, opaque, flags); } } while (0) ; } } static inline void trace_qed_aio_setup(void * s, void * acb, int64_t sector_num, int nb_sectors, void * opaque, int flags) { if ( # 1960 "block/trace.h" 3 4 1 # 1960 "block/trace.h" ) { _nocheck__trace_qed_aio_setup(s, acb, sector_num, nb_sectors, opaque, flags); } } static inline void _nocheck__trace_qed_aio_next_io(void * s, void * acb, int ret, uint64_t cur_pos) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_AIO_NEXT_IO_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1973 "block/trace.h" 3 4 ((void *)0) # 1973 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_aio_next_io " "s %p acb %p ret %d cur_pos %" # 1974 "block/trace.h" 3 4 "l" "u" # 1974 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, acb, ret, cur_pos); } } while (0) ; } } static inline void trace_qed_aio_next_io(void * s, void * acb, int ret, uint64_t cur_pos) { if ( # 1984 "block/trace.h" 3 4 1 # 1984 "block/trace.h" ) { _nocheck__trace_qed_aio_next_io(s, acb, ret, cur_pos); } } static inline void _nocheck__trace_qed_aio_read_data(void * s, void * acb, int ret, uint64_t offset, size_t len) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_AIO_READ_DATA_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 1997 "block/trace.h" 3 4 ((void *)0) # 1997 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_aio_read_data " "s %p acb %p ret %d offset %" # 1998 "block/trace.h" 3 4 "l" "u" # 1998 "block/trace.h" " len %zu" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, acb, ret, offset, len); } } while (0) ; } } static inline void trace_qed_aio_read_data(void * s, void * acb, int ret, uint64_t offset, size_t len) { if ( # 2008 "block/trace.h" 3 4 1 # 2008 "block/trace.h" ) { _nocheck__trace_qed_aio_read_data(s, acb, ret, offset, len); } } static inline void _nocheck__trace_qed_aio_write_data(void * s, void * acb, int ret, uint64_t offset, size_t len) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_AIO_WRITE_DATA_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2021 "block/trace.h" 3 4 ((void *)0) # 2021 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_aio_write_data " "s %p acb %p ret %d offset %" # 2022 "block/trace.h" 3 4 "l" "u" # 2022 "block/trace.h" " len %zu" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, acb, ret, offset, len); } } while (0) ; } } static inline void trace_qed_aio_write_data(void * s, void * acb, int ret, uint64_t offset, size_t len) { if ( # 2032 "block/trace.h" 3 4 1 # 2032 "block/trace.h" ) { _nocheck__trace_qed_aio_write_data(s, acb, ret, offset, len); } } static inline void _nocheck__trace_qed_aio_write_prefill(void * s, void * acb, uint64_t start, size_t len, uint64_t offset) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_AIO_WRITE_PREFILL_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2045 "block/trace.h" 3 4 ((void *)0) # 2045 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_aio_write_prefill " "s %p acb %p start %" # 2046 "block/trace.h" 3 4 "l" "u" # 2046 "block/trace.h" " len %zu offset %" # 2046 "block/trace.h" 3 4 "l" "u" # 2046 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, acb, start, len, offset); } } while (0) ; } } static inline void trace_qed_aio_write_prefill(void * s, void * acb, uint64_t start, size_t len, uint64_t offset) { if ( # 2056 "block/trace.h" 3 4 1 # 2056 "block/trace.h" ) { _nocheck__trace_qed_aio_write_prefill(s, acb, start, len, offset); } } static inline void _nocheck__trace_qed_aio_write_postfill(void * s, void * acb, uint64_t start, size_t len, uint64_t offset) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_AIO_WRITE_POSTFILL_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2069 "block/trace.h" 3 4 ((void *)0) # 2069 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_aio_write_postfill " "s %p acb %p start %" # 2070 "block/trace.h" 3 4 "l" "u" # 2070 "block/trace.h" " len %zu offset %" # 2070 "block/trace.h" 3 4 "l" "u" # 2070 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, acb, start, len, offset); } } while (0) ; } } static inline void trace_qed_aio_write_postfill(void * s, void * acb, uint64_t start, size_t len, uint64_t offset) { if ( # 2080 "block/trace.h" 3 4 1 # 2080 "block/trace.h" ) { _nocheck__trace_qed_aio_write_postfill(s, acb, start, len, offset); } } static inline void _nocheck__trace_qed_aio_write_main(void * s, void * acb, int ret, uint64_t offset, size_t len) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_QED_AIO_WRITE_MAIN_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2093 "block/trace.h" 3 4 ((void *)0) # 2093 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:qed_aio_write_main " "s %p acb %p ret %d offset %" # 2094 "block/trace.h" 3 4 "l" "u" # 2094 "block/trace.h" " len %zu" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , s, acb, ret, offset, len); } } while (0) ; } } static inline void trace_qed_aio_write_main(void * s, void * acb, int ret, uint64_t offset, size_t len) { if ( # 2104 "block/trace.h" 3 4 1 # 2104 "block/trace.h" ) { _nocheck__trace_qed_aio_write_main(s, acb, ret, offset, len); } } static inline void _nocheck__trace_vxhs_iio_callback(int error) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_IIO_CALLBACK_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2117 "block/trace.h" 3 4 ((void *)0) # 2117 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_iio_callback " "ctx is NULL: error %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , error); } } while (0) ; } } static inline void trace_vxhs_iio_callback(int error) { if ( # 2128 "block/trace.h" 3 4 1 # 2128 "block/trace.h" ) { _nocheck__trace_vxhs_iio_callback(error); } } static inline void _nocheck__trace_vxhs_iio_callback_chnfail(int err, int error) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_IIO_CALLBACK_CHNFAIL_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2141 "block/trace.h" 3 4 ((void *)0) # 2141 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_iio_callback_chnfail " "QNIO channel failed, no i/o %d, %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , err, error); } } while (0) ; } } static inline void trace_vxhs_iio_callback_chnfail(int err, int error) { if ( # 2152 "block/trace.h" 3 4 1 # 2152 "block/trace.h" ) { _nocheck__trace_vxhs_iio_callback_chnfail(err, error); } } static inline void _nocheck__trace_vxhs_iio_callback_unknwn(int opcode, int err) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_IIO_CALLBACK_UNKNWN_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2165 "block/trace.h" 3 4 ((void *)0) # 2165 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_iio_callback_unknwn " "unexpected opcode %d, errno %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , opcode, err); } } while (0) ; } } static inline void trace_vxhs_iio_callback_unknwn(int opcode, int err) { if ( # 2176 "block/trace.h" 3 4 1 # 2176 "block/trace.h" ) { _nocheck__trace_vxhs_iio_callback_unknwn(opcode, err); } } static inline void _nocheck__trace_vxhs_aio_rw_invalid(int req) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_AIO_RW_INVALID_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2189 "block/trace.h" 3 4 ((void *)0) # 2189 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_aio_rw_invalid " "Invalid I/O request iodir %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , req); } } while (0) ; } } static inline void trace_vxhs_aio_rw_invalid(int req) { if ( # 2200 "block/trace.h" 3 4 1 # 2200 "block/trace.h" ) { _nocheck__trace_vxhs_aio_rw_invalid(req); } } static inline void _nocheck__trace_vxhs_aio_rw_ioerr(char * guid, int iodir, uint64_t size, uint64_t off, void * acb, int ret, int err) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_AIO_RW_IOERR_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2213 "block/trace.h" 3 4 ((void *)0) # 2213 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_aio_rw_ioerr " "IO ERROR (vDisk %s) FOR : Read/Write = %d size = %" # 2214 "block/trace.h" 3 4 "l" "u" # 2214 "block/trace.h" " offset = %" # 2214 "block/trace.h" 3 4 "l" "u" # 2214 "block/trace.h" " ACB = %p. Error = %d, errno = %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , guid, iodir, size, off, acb, ret, err); } } while (0) ; } } static inline void trace_vxhs_aio_rw_ioerr(char * guid, int iodir, uint64_t size, uint64_t off, void * acb, int ret, int err) { if ( # 2224 "block/trace.h" 3 4 1 # 2224 "block/trace.h" ) { _nocheck__trace_vxhs_aio_rw_ioerr(guid, iodir, size, off, acb, ret, err); } } static inline void _nocheck__trace_vxhs_get_vdisk_stat_err(char * guid, int ret, int err) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_GET_VDISK_STAT_ERR_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2237 "block/trace.h" 3 4 ((void *)0) # 2237 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_get_vdisk_stat_err " "vDisk (%s) stat ioctl failed, ret = %d, errno = %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , guid, ret, err); } } while (0) ; } } static inline void trace_vxhs_get_vdisk_stat_err(char * guid, int ret, int err) { if ( # 2248 "block/trace.h" 3 4 1 # 2248 "block/trace.h" ) { _nocheck__trace_vxhs_get_vdisk_stat_err(guid, ret, err); } } static inline void _nocheck__trace_vxhs_get_vdisk_stat(char * vdisk_guid, uint64_t vdisk_size) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_GET_VDISK_STAT_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2261 "block/trace.h" 3 4 ((void *)0) # 2261 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_get_vdisk_stat " "vDisk %s stat ioctl returned size %" # 2262 "block/trace.h" 3 4 "l" "u" # 2262 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , vdisk_guid, vdisk_size); } } while (0) ; } } static inline void trace_vxhs_get_vdisk_stat(char * vdisk_guid, uint64_t vdisk_size) { if ( # 2272 "block/trace.h" 3 4 1 # 2272 "block/trace.h" ) { _nocheck__trace_vxhs_get_vdisk_stat(vdisk_guid, vdisk_size); } } static inline void _nocheck__trace_vxhs_complete_aio(void * acb, uint64_t ret) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_COMPLETE_AIO_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2285 "block/trace.h" 3 4 ((void *)0) # 2285 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_complete_aio " "aio failed acb %p ret %" # 2286 "block/trace.h" 3 4 "l" "u" # 2286 "block/trace.h" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , acb, ret); } } while (0) ; } } static inline void trace_vxhs_complete_aio(void * acb, uint64_t ret) { if ( # 2296 "block/trace.h" 3 4 1 # 2296 "block/trace.h" ) { _nocheck__trace_vxhs_complete_aio(acb, ret); } } static inline void _nocheck__trace_vxhs_parse_uri_filename(const char * filename) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_PARSE_URI_FILENAME_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2309 "block/trace.h" 3 4 ((void *)0) # 2309 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_parse_uri_filename " "URI passed via bdrv_parse_filename %s" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , filename); } } while (0) ; } } static inline void trace_vxhs_parse_uri_filename(const char * filename) { if ( # 2320 "block/trace.h" 3 4 1 # 2320 "block/trace.h" ) { _nocheck__trace_vxhs_parse_uri_filename(filename); } } static inline void _nocheck__trace_vxhs_open_vdiskid(const char * vdisk_id) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_OPEN_VDISKID_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2333 "block/trace.h" 3 4 ((void *)0) # 2333 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_open_vdiskid " "Opening vdisk-id %s" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , vdisk_id); } } while (0) ; } } static inline void trace_vxhs_open_vdiskid(const char * vdisk_id) { if ( # 2344 "block/trace.h" 3 4 1 # 2344 "block/trace.h" ) { _nocheck__trace_vxhs_open_vdiskid(vdisk_id); } } static inline void _nocheck__trace_vxhs_open_hostinfo(char * of_vsa_addr, int port) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_OPEN_HOSTINFO_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2357 "block/trace.h" 3 4 ((void *)0) # 2357 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_open_hostinfo " "Adding host %s:%d to BDRVVXHSState" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , of_vsa_addr, port); } } while (0) ; } } static inline void trace_vxhs_open_hostinfo(char * of_vsa_addr, int port) { if ( # 2368 "block/trace.h" 3 4 1 # 2368 "block/trace.h" ) { _nocheck__trace_vxhs_open_hostinfo(of_vsa_addr, port); } } static inline void _nocheck__trace_vxhs_open_iio_open(const char * host) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_OPEN_IIO_OPEN_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2381 "block/trace.h" 3 4 ((void *)0) # 2381 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_open_iio_open " "Failed to connect to storage agent on host %s" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , host); } } while (0) ; } } static inline void trace_vxhs_open_iio_open(const char * host) { if ( # 2392 "block/trace.h" 3 4 1 # 2392 "block/trace.h" ) { _nocheck__trace_vxhs_open_iio_open(host); } } static inline void _nocheck__trace_vxhs_parse_uri_hostinfo(char * host, int port) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_PARSE_URI_HOSTINFO_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2405 "block/trace.h" 3 4 ((void *)0) # 2405 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_parse_uri_hostinfo " "Host: IP %s, Port %d" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , host, port); } } while (0) ; } } static inline void trace_vxhs_parse_uri_hostinfo(char * host, int port) { if ( # 2416 "block/trace.h" 3 4 1 # 2416 "block/trace.h" ) { _nocheck__trace_vxhs_parse_uri_hostinfo(host, port); } } static inline void _nocheck__trace_vxhs_close(char * vdisk_guid) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_CLOSE_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2429 "block/trace.h" 3 4 ((void *)0) # 2429 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_close " "Closing vdisk %s" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , vdisk_guid); } } while (0) ; } } static inline void trace_vxhs_close(char * vdisk_guid) { if ( # 2440 "block/trace.h" 3 4 1 # 2440 "block/trace.h" ) { _nocheck__trace_vxhs_close(vdisk_guid); } } static inline void _nocheck__trace_vxhs_get_creds(const char * cacert, const char * client_key, const char * client_cert) { if (((1) && (__builtin_expect(!!(trace_events_enabled_count), 0) && _TRACE_VXHS_GET_CREDS_DSTATE))) { struct timeval _now; gettimeofday(&_now, # 2453 "block/trace.h" 3 4 ((void *)0) # 2453 "block/trace.h" ); do { if (__builtin_expect(!!(qemu_loglevel_mask((1 << 15))), 0)) { qemu_log("%d@%zd.%06zd:vxhs_get_creds " "cacert %s, client_key %s, client_cert %s" "\n", getpid(), (size_t)_now.tv_sec, (size_t)_now.tv_usec , cacert, client_key, client_cert); } } while (0) ; } } static inline void trace_vxhs_get_creds(const char * cacert, const char * client_key, const char * client_cert) { if ( # 2464 "block/trace.h" 3 4 1 # 2464 "block/trace.h" ) { _nocheck__trace_vxhs_get_creds(cacert, client_key, client_cert); } } # 31 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/block/thread-pool.h" 1 /* * QEMU block layer thread pool * * Copyright IBM, Corp. 2008 * Copyright Red Hat, Inc. 2012 * * Authors: * Anthony Liguori * Paolo Bonzini * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * * Contributions after 2012-01-13 are licensed under the terms of the * GNU GPL, version 2 or (at your option) any later version. */ typedef int ThreadPoolFunc(void *opaque); typedef struct ThreadPool ThreadPool; ThreadPool *thread_pool_new(struct AioContext *ctx); void thread_pool_free(ThreadPool *pool); BlockAIOCB *thread_pool_submit_aio(ThreadPool *pool, ThreadPoolFunc *func, void *arg, BlockCompletionFunc *cb, void *opaque); int thread_pool_submit_co(ThreadPool *pool, ThreadPoolFunc *func, void *arg); void thread_pool_submit(ThreadPool *pool, ThreadPoolFunc *func, void *arg); # 32 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/qemu/iov.h" 1 /* * Helpers for using (partial) iovecs. * * Copyright (C) 2010 Red Hat, Inc. * * Author(s): * Amit Shah * Michael Tokarev * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. */ # 33 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/block/raw-aio.h" 1 /* * Declarations for AIO in the raw protocol * * Copyright IBM, Corp. 2008 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * * Contributions after 2012-01-13 are licensed under the terms of the * GNU GPL, version 2 or (at your option) any later version. */ # 1 "//qemu-2.11+dfsg/include/qemu/coroutine.h" 1 /* * QEMU coroutine implementation * * Copyright IBM, Corp. 2011 * * Authors: * Stefan Hajnoczi * Kevin Wolf * * This work is licensed under the terms of the GNU LGPL, version 2 or later. * See the COPYING.LIB file in the top-level directory. * */ # 19 "//qemu-2.11+dfsg/include/block/raw-aio.h" 2 # 1 "//qemu-2.11+dfsg/include/qemu/iov.h" 1 /* * Helpers for using (partial) iovecs. * * Copyright (C) 2010 Red Hat, Inc. * * Author(s): * Amit Shah * Michael Tokarev * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. */ # 20 "//qemu-2.11+dfsg/include/block/raw-aio.h" 2 /* AIO request types */ # 32 "//qemu-2.11+dfsg/include/block/raw-aio.h" /* AIO flags */ /* linux-aio.c - Linux native implementation */ typedef struct LinuxAioState LinuxAioState; LinuxAioState *laio_init(void); void laio_cleanup(LinuxAioState *s); int laio_co_submit(BlockDriverState *bs, LinuxAioState *s, int fd, uint64_t offset, QEMUIOVector *qiov, int type); BlockAIOCB *laio_submit(BlockDriverState *bs, LinuxAioState *s, int fd, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque, int type); void laio_detach_aio_context(LinuxAioState *s, AioContext *old_context); void laio_attach_aio_context(LinuxAioState *s, AioContext *new_context); void laio_io_plug(BlockDriverState *bs, LinuxAioState *s); void laio_io_unplug(BlockDriverState *bs, LinuxAioState *s); # 34 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qstring.h" 1 /* * QString Module * * Copyright (C) 2009 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 1 /* * QEMU Object Model. * * Based on ideas by Avi Kivity * * Copyright (C) 2009, 2015 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * * QObject Reference Counts Terminology * ------------------------------------ * * - Returning references: A function that returns an object may * return it as either a weak or a strong reference. If the reference * is strong, you are responsible for calling QDECREF() on the reference * when you are done. * * If the reference is weak, the owner of the reference may free it at * any time in the future. Before storing the reference anywhere, you * should call QINCREF() to make the reference strong. * * - Transferring ownership: when you transfer ownership of a reference * by calling a function, you are no longer responsible for calling * QDECREF() when the reference is no longer needed. In other words, * when the function returns you must behave as if the reference to the * passed object was weak. */ # 17 "//qemu-2.11+dfsg/include/qapi/qmp/qstring.h" 2 typedef struct QString { QObject base; char *string; size_t length; size_t capacity; } QString; QString *qstring_new(void); QString *qstring_from_str(const char *str); QString *qstring_from_substr(const char *str, int start, int end); size_t qstring_get_length(const QString *qstring); const char *qstring_get_str(const QString *qstring); void qstring_append_int(QString *qstring, int64_t value); void qstring_append(QString *qstring, const char *str); void qstring_append_chr(QString *qstring, int c); QString *qobject_to_qstring(const QObject *obj); # 34 "//qemu-2.11+dfsg/include/qapi/qmp/qstring.h" 3 4 _Bool # 34 "//qemu-2.11+dfsg/include/qapi/qmp/qstring.h" qstring_is_equal(const QObject *x, const QObject *y); void qstring_destroy_obj(QObject *obj); # 35 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/scsi/pr-manager.h" 1 # 1 "//qemu-2.11+dfsg/include/qom/object.h" 1 /* * QEMU Object Model * * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * */ # 5 "//qemu-2.11+dfsg/include/scsi/pr-manager.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 1 /* * QDict Module * * Copyright (C) 2009 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 6 "//qemu-2.11+dfsg/include/scsi/pr-manager.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/visitor.h" 1 /* * Core Definitions for QAPI Visitor Classes * * Copyright (C) 2012-2016 Red Hat, Inc. * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * */ # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qobject.h" 1 /* * QEMU Object Model. * * Based on ideas by Avi Kivity * * Copyright (C) 2009, 2015 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * * QObject Reference Counts Terminology * ------------------------------------ * * - Returning references: A function that returns an object may * return it as either a weak or a strong reference. If the reference * is strong, you are responsible for calling QDECREF() on the reference * when you are done. * * If the reference is weak, the owner of the reference may free it at * any time in the future. Before storing the reference anywhere, you * should call QINCREF() to make the reference strong. * * - Transferring ownership: when you transfer ownership of a reference * by calling a function, you are no longer responsible for calling * QDECREF() when the reference is no longer needed. In other words, * when the function returns you must behave as if the reference to the * passed object was weak. */ # 19 "//qemu-2.11+dfsg/include/qapi/visitor.h" 2 /* * The QAPI schema defines both a set of C data types, and a QMP wire * format. QAPI objects can contain references to other QAPI objects, * resulting in a directed acyclic graph. QAPI also generates visitor * functions to walk these graphs. This file represents the interface * for doing work at each node of a QAPI graph; it can also be used * for a virtual walk, where there is no actual QAPI C struct. * * There are four kinds of visitor classes: input visitors (QObject, * string, and QemuOpts) parse an external representation and build * the corresponding QAPI graph, output visitors (QObject and string) take * a completed QAPI graph and generate an external representation, the * dealloc visitor can take a QAPI graph (possibly partially * constructed) and recursively free its resources, and the clone * visitor performs a deep clone of one QAPI object to another. While * the dealloc and QObject input/output visitors are general, the string, * QemuOpts, and clone visitors have some implementation limitations; * see the documentation for each visitor for more details on what it * supports. Also, see visitor-impl.h for the callback contracts * implemented by each visitor, and docs/devel/qapi-code-gen.txt for more * about the QAPI code generator. * * All of the visitors are created via: * * Visitor *subtype_visitor_new(parameters...); * * A visitor should be used for exactly one top-level visit_type_FOO() * or virtual walk; if that is successful, the caller can optionally * call visit_complete() (for now, useful only for output visits, but * safe to call on all visits). Then, regardless of success or * failure, the user should call visit_free() to clean up resources. * It is okay to free the visitor without completing the visit, if * some other error is detected in the meantime. * * All QAPI types have a corresponding function with a signature * roughly compatible with this: * * void visit_type_FOO(Visitor *v, const char *name, T obj, Error **errp); * * where T is FOO for scalar types, and FOO * otherwise. The scalar * visitors are declared here; the remaining visitors are generated in * qapi-visit.h. * * The @name parameter of visit_type_FOO() describes the relation * between this QAPI value and its parent container. When visiting * the root of a tree, @name is ignored; when visiting a member of an * object, @name is the key associated with the value; when visiting a * member of a list, @name is NULL; and when visiting the member of an * alternate, @name should equal the name used for visiting the * alternate. * * The visit_type_FOO() functions expect a non-null @obj argument; * they allocate *@obj during input visits, leave it unchanged on * output visits, and recursively free any resources during a dealloc * visit. Each function also takes the customary @errp argument (see * qapi/error.h for details), for reporting any errors (such as if a * member @name is not present, or is present but not the specified * type). * * If an error is detected during visit_type_FOO() with an input * visitor, then *@obj will be NULL for pointer types, and left * unchanged for scalar types. Using an output or clone visitor with * an incomplete object has undefined behavior (other than a special * case for visit_type_str() treating NULL like ""), while the dealloc * visitor safely handles incomplete objects. Since input visitors * never produce an incomplete object, such an object is possible only * by manual construction. * * For the QAPI object types (structs, unions, and alternates), there * is an additional generated function in qapi-visit.h compatible * with: * * void visit_type_FOO_members(Visitor *v, FOO *obj, Error **errp); * * for visiting the members of a type without also allocating the QAPI * struct. * * Additionally, in qapi-types.h, all QAPI pointer types (structs, * unions, alternates, and lists) have a generated function compatible * with: * * void qapi_free_FOO(FOO *obj); * * where behaves like free() in that @obj may be NULL. Such objects * may also be used with the following macro, provided alongside the * clone visitor: * * Type *QAPI_CLONE(Type, src); * * in order to perform a deep clone of @src. Because of the generated * qapi_free functions and the QAPI_CLONE() macro, the clone and * dealloc visitor should not be used directly outside of QAPI code. * * QAPI types can also inherit from a base class; when this happens, a * function is generated for easily going from the derived type to the * base type: * * BASE *qapi_CHILD_base(CHILD *obj); * * For a real QAPI struct, typical input usage involves: * * * Foo *f; * Error *err = NULL; * Visitor *v; * * v = FOO_visitor_new(...); * visit_type_Foo(v, NULL, &f, &err); * if (err) { * ...handle error... * } else { * ...use f... * } * visit_free(v); * qapi_free_Foo(f); * * * For a list, it is: * * FooList *l; * Error *err = NULL; * Visitor *v; * * v = FOO_visitor_new(...); * visit_type_FooList(v, NULL, &l, &err); * if (err) { * ...handle error... * } else { * for ( ; l; l = l->next) { * ...use l->value... * } * } * visit_free(v); * qapi_free_FooList(l); * * * Similarly, typical output usage is: * * * Foo *f = ...obtain populated object... * Error *err = NULL; * Visitor *v; * Type *result; * * v = FOO_visitor_new(..., &result); * visit_type_Foo(v, NULL, &f, &err); * if (err) { * ...handle error... * } else { * visit_complete(v, &result); * ...use result... * } * visit_free(v); * * * When visiting a real QAPI struct, this file provides several * helpers that rely on in-tree information to control the walk: * visit_optional() for the 'has_member' field associated with * optional 'member' in the C struct; and visit_next_list() for * advancing through a FooList linked list. Similarly, the * visit_is_input() helper makes it possible to write code that is * visitor-agnostic everywhere except for cleanup. Only the generated * visit_type functions need to use these helpers. * * It is also possible to use the visitors to do a virtual walk, where * no actual QAPI struct is present. In this situation, decisions * about what needs to be walked are made by the calling code, and * structured visits are split between pairs of start and end methods * (where the end method must be called if the start function * succeeded, even if an intermediate visit encounters an error). * Thus, a virtual walk corresponding to '{ "list": [1, 2] }' looks * like: * * * Visitor *v; * Error *err = NULL; * int value; * * v = FOO_visitor_new(...); * visit_start_struct(v, NULL, NULL, 0, &err); * if (err) { * goto out; * } * visit_start_list(v, "list", NULL, 0, &err); * if (err) { * goto outobj; * } * value = 1; * visit_type_int(v, NULL, &value, &err); * if (err) { * goto outlist; * } * value = 2; * visit_type_int(v, NULL, &value, &err); * if (err) { * goto outlist; * } * outlist: * visit_end_list(v, NULL); * if (!err) { * visit_check_struct(v, &err); * } * outobj: * visit_end_struct(v, NULL); * out: * error_propagate(errp, err); * visit_free(v); * */ /*** Useful types ***/ /* This struct is layout-compatible with all other *List structs * created by the QAPI generator. It is used as a typical * singly-linked list. */ typedef struct GenericList { struct GenericList *next; char padding[]; } GenericList; /* This struct is layout-compatible with all Alternate types * created by the QAPI generator. */ typedef struct GenericAlternate { QType type; char padding[]; } GenericAlternate; /*** Visitor cleanup ***/ /* * Complete the visit, collecting any output. * * May only be called only once after a successful top-level * visit_type_FOO() or visit_end_ITEM(), and marks the end of the * visit. The @opaque pointer should match the output parameter * passed to the subtype_visitor_new() used to create an output * visitor, or NULL for any other visitor. Needed for output * visitors, but may also be called with other visitors. */ void visit_complete(Visitor *v, void *opaque); /* * Free @v and any resources it has tied up. * * May be called whether or not the visit has been successfully * completed, but should not be called until a top-level * visit_type_FOO() or visit_start_ITEM() has been performed on the * visitor. Safe if @v is NULL. */ void visit_free(Visitor *v); /*** Visiting structures ***/ /* * Start visiting an object @obj (struct or union). * * @name expresses the relationship of this object to its parent * container; see the general description of @name above. * * @obj must be non-NULL for a real walk, in which case @size * determines how much memory an input or clone visitor will allocate * into *@obj. @obj may also be NULL for a virtual walk, in which * case @size is ignored. * * @errp obeys typical error usage, and reports failures such as a * member @name is not present, or present but not an object. On * error, input visitors set *@obj to NULL. * * After visit_start_struct() succeeds, the caller may visit its * members one after the other, passing the member's name and address * within the struct. Finally, visit_end_struct() needs to be called * with the same @obj to clean up, even if intermediate visits fail. * See the examples above. * * FIXME Should this be named visit_start_object, since it is also * used for QAPI unions, and maps to JSON objects? */ void visit_start_struct(Visitor *v, const char *name, void **obj, size_t size, Error **errp); /* * Prepare for completing an object visit. * * @errp obeys typical error usage, and reports failures such as * unparsed keys remaining in the input stream. * * Should be called prior to visit_end_struct() if all other * intermediate visit steps were successful, to allow the visitor one * last chance to report errors. May be skipped on a cleanup path, * where there is no need to check for further errors. */ void visit_check_struct(Visitor *v, Error **errp); /* * Complete an object visit started earlier. * * @obj must match what was passed to the paired visit_start_struct(). * * Must be called after any successful use of visit_start_struct(), * even if intermediate processing was skipped due to errors, to allow * the backend to release any resources. Destroying the visitor early * with visit_free() behaves as if this was implicitly called. */ void visit_end_struct(Visitor *v, void **obj); /*** Visiting lists ***/ /* * Start visiting a list. * * @name expresses the relationship of this list to its parent * container; see the general description of @name above. * * @list must be non-NULL for a real walk, in which case @size * determines how much memory an input or clone visitor will allocate * into *@list (at least sizeof(GenericList)). Some visitors also * allow @list to be NULL for a virtual walk, in which case @size is * ignored. * * @errp obeys typical error usage, and reports failures such as a * member @name is not present, or present but not a list. On error, * input visitors set *@list to NULL. * * After visit_start_list() succeeds, the caller may visit its members * one after the other. A real visit (where @obj is non-NULL) uses * visit_next_list() for traversing the linked list, while a virtual * visit (where @obj is NULL) uses other means. For each list * element, call the appropriate visit_type_FOO() with name set to * NULL and obj set to the address of the value member of the list * element. Finally, visit_end_list() needs to be called with the * same @list to clean up, even if intermediate visits fail. See the * examples above. */ void visit_start_list(Visitor *v, const char *name, GenericList **list, size_t size, Error **errp); /* * Iterate over a GenericList during a non-virtual list visit. * * @size represents the size of a linked list node (at least * sizeof(GenericList)). * * @tail must not be NULL; on the first call, @tail is the value of * *list after visit_start_list(), and on subsequent calls @tail must * be the previously returned value. Should be called in a loop until * a NULL return or error occurs; for each non-NULL return, the caller * then calls the appropriate visit_type_*() for the element type of * the list, with that function's name parameter set to NULL and obj * set to the address of @tail->value. */ GenericList *visit_next_list(Visitor *v, GenericList *tail, size_t size); /* * Prepare for completing a list visit. * * @errp obeys typical error usage, and reports failures such as * unvisited list tail remaining in the input stream. * * Should be called prior to visit_end_list() if all other * intermediate visit steps were successful, to allow the visitor one * last chance to report errors. May be skipped on a cleanup path, * where there is no need to check for further errors. */ void visit_check_list(Visitor *v, Error **errp); /* * Complete a list visit started earlier. * * @list must match what was passed to the paired visit_start_list(). * * Must be called after any successful use of visit_start_list(), even * if intermediate processing was skipped due to errors, to allow the * backend to release any resources. Destroying the visitor early * with visit_free() behaves as if this was implicitly called. */ void visit_end_list(Visitor *v, void **list); /*** Visiting alternates ***/ /* * Start the visit of an alternate @obj. * * @name expresses the relationship of this alternate to its parent * container; see the general description of @name above. * * @obj must not be NULL. Input and clone visitors use @size to * determine how much memory to allocate into *@obj, then determine * the qtype of the next thing to be visited, stored in (*@obj)->type. * Other visitors will leave @obj unchanged. * * If successful, this must be paired with visit_end_alternate() with * the same @obj to clean up, even if visiting the contents of the * alternate fails. */ void visit_start_alternate(Visitor *v, const char *name, GenericAlternate **obj, size_t size, Error **errp); /* * Finish visiting an alternate type. * * @obj must match what was passed to the paired visit_start_alternate(). * * Must be called after any successful use of visit_start_alternate(), * even if intermediate processing was skipped due to errors, to allow * the backend to release any resources. Destroying the visitor early * with visit_free() behaves as if this was implicitly called. * */ void visit_end_alternate(Visitor *v, void **obj); /*** Other helpers ***/ /* * Does optional struct member @name need visiting? * * @name must not be NULL. This function is only useful between * visit_start_struct() and visit_end_struct(), since only objects * have optional keys. * * @present points to the address of the optional member's has_ flag. * * Input visitors set *@present according to input; other visitors * leave it unchanged. In either case, return *@present for * convenience. */ # 450 "//qemu-2.11+dfsg/include/qapi/visitor.h" 3 4 _Bool # 450 "//qemu-2.11+dfsg/include/qapi/visitor.h" visit_optional(Visitor *v, const char *name, # 450 "//qemu-2.11+dfsg/include/qapi/visitor.h" 3 4 _Bool # 450 "//qemu-2.11+dfsg/include/qapi/visitor.h" *present); /* * Visit an enum value. * * @name expresses the relationship of this enum to its parent * container; see the general description of @name above. * * @obj must be non-NULL. Input visitors parse input and set *@obj to * the enumeration value, leaving @obj unchanged on error; other * visitors use *@obj but leave it unchanged. * * Currently, all input visitors parse text input, and all output * visitors produce text output. The mapping between enumeration * values and strings is done by the visitor core, using @strings; it * should be the ENUM_lookup array from visit-types.h. * * May call visit_type_str() under the hood, and the enum visit may * fail even if the corresponding string visit succeeded; this implies * that visit_type_str() must have no unwelcome side effects. */ void visit_type_enum(Visitor *v, const char *name, int *obj, const QEnumLookup *lookup, Error **errp); /* * Check if visitor is an input visitor. */ # 477 "//qemu-2.11+dfsg/include/qapi/visitor.h" 3 4 _Bool # 477 "//qemu-2.11+dfsg/include/qapi/visitor.h" visit_is_input(Visitor *v); /*** Visiting built-in types ***/ /* * Visit an integer value. * * @name expresses the relationship of this integer to its parent * container; see the general description of @name above. * * @obj must be non-NULL. Input visitors set *@obj to the value; * other visitors will leave *@obj unchanged. */ void visit_type_int(Visitor *v, const char *name, int64_t *obj, Error **errp); /* * Visit a uint8_t value. * Like visit_type_int(), except clamps the value to uint8_t range. */ void visit_type_uint8(Visitor *v, const char *name, uint8_t *obj, Error **errp); /* * Visit a uint16_t value. * Like visit_type_int(), except clamps the value to uint16_t range. */ void visit_type_uint16(Visitor *v, const char *name, uint16_t *obj, Error **errp); /* * Visit a uint32_t value. * Like visit_type_int(), except clamps the value to uint32_t range. */ void visit_type_uint32(Visitor *v, const char *name, uint32_t *obj, Error **errp); /* * Visit a uint64_t value. * Like visit_type_int(), except clamps the value to uint64_t range, * that is, ensures it is unsigned. */ void visit_type_uint64(Visitor *v, const char *name, uint64_t *obj, Error **errp); /* * Visit an int8_t value. * Like visit_type_int(), except clamps the value to int8_t range. */ void visit_type_int8(Visitor *v, const char *name, int8_t *obj, Error **errp); /* * Visit an int16_t value. * Like visit_type_int(), except clamps the value to int16_t range. */ void visit_type_int16(Visitor *v, const char *name, int16_t *obj, Error **errp); /* * Visit an int32_t value. * Like visit_type_int(), except clamps the value to int32_t range. */ void visit_type_int32(Visitor *v, const char *name, int32_t *obj, Error **errp); /* * Visit an int64_t value. * Identical to visit_type_int(). */ void visit_type_int64(Visitor *v, const char *name, int64_t *obj, Error **errp); /* * Visit a uint64_t value. * Like visit_type_uint64(), except that some visitors may choose to * recognize additional syntax, such as suffixes for easily scaling * values. */ void visit_type_size(Visitor *v, const char *name, uint64_t *obj, Error **errp); /* * Visit a boolean value. * * @name expresses the relationship of this boolean to its parent * container; see the general description of @name above. * * @obj must be non-NULL. Input visitors set *@obj to the value; * other visitors will leave *@obj unchanged. */ void visit_type_bool(Visitor *v, const char *name, # 566 "//qemu-2.11+dfsg/include/qapi/visitor.h" 3 4 _Bool # 566 "//qemu-2.11+dfsg/include/qapi/visitor.h" *obj, Error **errp); /* * Visit a string value. * * @name expresses the relationship of this string to its parent * container; see the general description of @name above. * * @obj must be non-NULL. Input and clone visitors set *@obj to the * value (always using "" rather than NULL for an empty string). * Other visitors leave *@obj unchanged, and commonly treat NULL like * "". * * It is safe to cast away const when preparing a (const char *) value * into @obj for use by an output visitor. * * FIXME: Callers that try to output NULL *obj should not be allowed. */ void visit_type_str(Visitor *v, const char *name, char **obj, Error **errp); /* * Visit a number (i.e. double) value. * * @name expresses the relationship of this number to its parent * container; see the general description of @name above. * * @obj must be non-NULL. Input visitors set *@obj to the value; * other visitors will leave *@obj unchanged. Visitors should * document if infinity or NaN are not permitted. */ void visit_type_number(Visitor *v, const char *name, double *obj, Error **errp); /* * Visit an arbitrary value. * * @name expresses the relationship of this value to its parent * container; see the general description of @name above. * * @obj must be non-NULL. Input visitors set *@obj to the value; * other visitors will leave *@obj unchanged. *@obj must be non-NULL * for output visitors. * * Note that some kinds of input can't express arbitrary QObject. * E.g. the visitor returned by qobject_input_visitor_new_keyval() * can't create numbers or booleans, only strings. */ void visit_type_any(Visitor *v, const char *name, QObject **obj, Error **errp); /* * Visit a JSON null value. * * @name expresses the relationship of the null value to its parent * container; see the general description of @name above. * * @obj must be non-NULL. Input visitors set *@obj to the value; * other visitors ignore *@obj. */ void visit_type_null(Visitor *v, const char *name, QNull **obj, Error **errp); # 7 "//qemu-2.11+dfsg/include/scsi/pr-manager.h" 2 # 1 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" 1 # 1 "//qemu-2.11+dfsg/include/qom/object.h" 1 /* * QEMU Object Model * * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. * */ # 5 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/qmp/qdict.h" 1 /* * QDict Module * * Copyright (C) 2009 Red Hat Inc. * * Authors: * Luiz Capitulino * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. */ # 6 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" 2 # 1 "//qemu-2.11+dfsg/include/qapi/visitor.h" 1 /* * Core Definitions for QAPI Visitor Classes * * Copyright (C) 2012-2016 Red Hat, Inc. * Copyright IBM, Corp. 2011 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. * See the COPYING.LIB file in the top-level directory. * */ # 7 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" 2 # 21 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" typedef struct UserCreatable { /* */ Object Parent; } UserCreatable; /** * UserCreatableClass: * @parent_class: the base class * @complete: callback to be called after @obj's properties are set. * @can_be_deleted: callback to be called before an object is removed * to check if @obj can be removed safely. * * Interface is designed to work with -object/object-add/object_add * commands. * Interface is mandatory for objects that are designed to be user * creatable (i.e. -object/object-add/object_add, will accept only * objects that inherit this interface). * * Interface also provides an optional ability to do the second * stage * initialization of the object after its properties were * set. * * For objects created without using -object/object-add/object_add, * @user_creatable_complete() wrapper should be called manually if * object's type implements USER_CREATABLE interface and needs * complete() callback to be called. */ typedef struct UserCreatableClass { /* */ InterfaceClass parent_class; /* */ void (*complete)(UserCreatable *uc, Error **errp); # 54 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" 3 4 _Bool # 54 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" (*can_be_deleted)(UserCreatable *uc); } UserCreatableClass; /** * user_creatable_complete: * @obj: the object whose complete() method is called if defined * @errp: if an error occurs, a pointer to an area to store the error * * Wrapper to call complete() method if one of types it's inherited * from implements USER_CREATABLE interface, otherwise the call does * nothing. */ void user_creatable_complete(Object *obj, Error **errp); /** * user_creatable_can_be_deleted: * @uc: the object whose can_be_deleted() method is called if implemented * * Wrapper to call can_be_deleted() method if one of types it's inherited * from implements USER_CREATABLE interface. */ # 75 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" 3 4 _Bool # 75 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" user_creatable_can_be_deleted(UserCreatable *uc); /** * user_creatable_add_type: * @type: the object type name * @id: the unique ID for the object * @qdict: the object properties * @v: the visitor * @errp: if an error occurs, a pointer to an area to store the error * * Create an instance of the user creatable object @type, placing * it in the object composition tree with name @id, initializing * it with properties from @qdict * * Returns: the newly created object or NULL on error */ Object *user_creatable_add_type(const char *type, const char *id, const QDict *qdict, Visitor *v, Error **errp); /** * user_creatable_add_opts: * @opts: the object definition * @errp: if an error occurs, a pointer to an area to store the error * * Create an instance of the user creatable object whose type * is defined in @opts by the 'qom-type' option, placing it * in the object composition tree with name provided by the * 'id' field. The remaining options in @opts are used to * initialize the object properties. * * Returns: the newly created object or NULL on error */ Object *user_creatable_add_opts(QemuOpts *opts, Error **errp); /** * user_creatable_add_opts_predicate: * @type: the QOM type to be added * * A callback function to determine whether an object * of type @type should be created. Instances of this * callback should be passed to user_creatable_add_opts_foreach */ typedef # 119 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" 3 4 _Bool # 119 "//qemu-2.11+dfsg/include/qom/object_interfaces.h" (*user_creatable_add_opts_predicate)(const char *type); /** * user_creatable_add_opts_foreach: * @opaque: a user_creatable_add_opts_predicate callback or NULL * @opts: options to create * @errp: unused * * An iterator callback to be used in conjunction with * the qemu_opts_foreach() method for creating a list of * objects from a set of QemuOpts * * The @opaque parameter can be passed a user_creatable_add_opts_predicate * callback to filter which types of object are created during iteration. * When it fails, report the error. * * Returns: 0 on success, -1 when an error was reported. */ int user_creatable_add_opts_foreach(void *opaque, QemuOpts *opts, Error **errp); /** * user_creatable_del: * @id: the unique ID for the object * @errp: if an error occurs, a pointer to an area to store the error * * Delete an instance of the user creatable object identified * by @id. */ void user_creatable_del(const char *id, Error **errp); /** * user_creatable_cleanup: * * Delete all user-creatable objects and the user-creatable * objects container. */ void user_creatable_cleanup(void); # 8 "//qemu-2.11+dfsg/include/scsi/pr-manager.h" 2 # 1 "//qemu-2.11+dfsg/include/block/aio.h" 1 /* * QEMU aio implementation * * Copyright IBM, Corp. 2008 * * Authors: * Anthony Liguori * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * */ # 9 "//qemu-2.11+dfsg/include/scsi/pr-manager.h" 2 # 19 "//qemu-2.11+dfsg/include/scsi/pr-manager.h" struct sg_io_hdr; typedef struct PRManager { /* */ Object parent; } PRManager; /** * PRManagerClass: * @parent_class: the base class * @run: callback invoked in thread pool context */ typedef struct PRManagerClass { /* */ ObjectClass parent_class; /* */ int (*run)(PRManager *pr_mgr, int fd, struct sg_io_hdr *hdr); } PRManagerClass; BlockAIOCB *pr_manager_execute(PRManager *pr_mgr, AioContext *ctx, int fd, struct sg_io_hdr *hdr, BlockCompletionFunc *complete, void *opaque); PRManager *pr_manager_lookup(const char *id, Error **errp); # 37 "../block/file-posix.c" 2 # 1 "//qemu-2.11+dfsg/include/scsi/constants.h" 1 /* Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with this library; if not, see . */ /* * This header file contains public constants and structures used by * the scsi code for linux. */ /* * SCSI opcodes */ # 153 "//qemu-2.11+dfsg/include/scsi/constants.h" /* * SERVICE ACTION IN subcodes */ /* * READ POSITION service action codes */ /* * SAM Status codes */ # 184 "//qemu-2.11+dfsg/include/scsi/constants.h" /* * SENSE KEYS */ # 203 "//qemu-2.11+dfsg/include/scsi/constants.h" /* * DEVICE TYPES */ # 226 "//qemu-2.11+dfsg/include/scsi/constants.h" /* Mode page codes for mode sense/set */ # 237 "//qemu-2.11+dfsg/include/scsi/constants.h" /* Not in Mt. Fuji, but in ATAPI 2.6 -- deprecated now in favor * of MODE_PAGE_SENSE_POWER */ /* Event notification classes for GET EVENT STATUS NOTIFICATION */ # 250 "//qemu-2.11+dfsg/include/scsi/constants.h" /* Event codes for MEDIA event status notification */ # 262 "//qemu-2.11+dfsg/include/scsi/constants.h" /* * Based on values from but extending CD_MINS * to the maximum common size allowed by the Orange's Book ATIP * * 90 and 99 min CDs are also available but using them as the * upper limit reduces the effectiveness of the heuristic to * detect DVDs burned to less than 25% of their maximum capacity */ /* Some generally useful CD-ROM information */ /* * The MMC values are not IDE specific and might need to be moved * to a common header if they are also needed for the SCSI emulation */ /* Profile list from MMC-6 revision 1 table 91 */ # 38 "../block/file-posix.c" 2 # 57 "../block/file-posix.c" # 1 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 22 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4 /* Get the list of `ioctl' requests and related constants. */ # 1 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 1 3 4 /* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Use the definitions from the kernel header files. */ # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 1 3 4 # 1 "/usr/include/asm-generic/ioctls.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/linux/ioctl.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/x86_64-linux-gnu/asm/ioctl.h" 1 3 4 # 1 "/usr/include/asm-generic/ioctl.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* ioctl command encoding: 32 bits total, command in lower 16 bits, * size of the parameter structure in the lower 14 bits of the * upper 16 bits. * Encoding the size of the parameter structure in the ioctl request * is useful for catching programs compiled with old versions * and to avoid overwriting user space outside the user buffer area. * The highest 2 bits are reserved for indicating the ``access mode''. * NOTE: This limits the max parameter size to 16kB -1 ! */ /* * The following is for compatibility across the various Linux * platforms. The generic ioctl numbering scheme doesn't really enforce * a type field. De facto, however, the top 8 bits of the lower 16 * bits are indeed used as a type field, so we might just as well make * this explicit here. Please be sure to use the decoding macros * below from now on. */ /* * Let any architecture override either of the following before * including this file. */ # 49 "/usr/include/asm-generic/ioctl.h" 3 4 /* * Direction bits, which any architecture can choose to override * before including this file. * * NOTE: _IOC_WRITE means userland is writing and kernel is * reading. _IOC_READ means userland is reading and kernel is writing. */ # 77 "/usr/include/asm-generic/ioctl.h" 3 4 /* * Used to create numbers. * * NOTE: _IOW means userland is writing and kernel is reading. _IOR * means userland is reading and kernel is writing. */ # 91 "/usr/include/asm-generic/ioctl.h" 3 4 /* used to decode ioctl numbers.. */ /* ...and for the drivers/sound files... */ # 1 "/usr/include/x86_64-linux-gnu/asm/ioctl.h" 2 3 4 # 6 "/usr/include/linux/ioctl.h" 2 3 4 # 6 "/usr/include/asm-generic/ioctls.h" 2 3 4 /* * These are the most common definitions for tty ioctl numbers. * Most of them do not use the recommended _IOC(), but there is * probably some source code out there hardcoding the number, * so we might as well use them for all new platforms. * * The architectures that use different values here typically * try to be compatible with some Unix variants for the same * architecture. */ /* 0x54 is just a magic number to make these relatively unique ('T') */ # 99 "/usr/include/asm-generic/ioctls.h" 3 4 /* * Some arches already define FIOQSIZE due to a historical * conflict with a Hayes modem-specific ioctl value. */ /* Used for packet mode */ # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 2 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 2 3 4 /* Routing table calls. */ /* Socket configuration controls. */ # 74 "/usr/include/x86_64-linux-gnu/bits/ioctls.h" 3 4 /* ARP cache control calls. */ /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ /* RARP cache control calls. */ /* Driver configuration calls */ /* DLCI configuration calls */ /* Device private ioctl calls. */ /* These 16 ioctls are available to devices via the do_ioctl() device vector. Each device should include this file and redefine these names as their own. Because these are device dependent it is a good idea _NOT_ to issue them to random objects and hope. */ /* * These 16 ioctl calls are protocol private */ # 27 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4 /* Define some types used by `ioctl' requests. */ # 1 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 1 3 4 /* Structure types for pre-termios terminal ioctls. Linux version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* Get definition of constants for use with `ioctl'. */ # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 1 3 4 # 1 "/usr/include/asm-generic/ioctls.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/x86_64-linux-gnu/asm/ioctls.h" 2 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 2 3 4 struct winsize { unsigned short int ws_row; unsigned short int ws_col; unsigned short int ws_xpixel; unsigned short int ws_ypixel; }; struct termio { unsigned short int c_iflag; /* input mode flags */ unsigned short int c_oflag; /* output mode flags */ unsigned short int c_cflag; /* control mode flags */ unsigned short int c_lflag; /* local mode flags */ unsigned char c_line; /* line discipline */ unsigned char c_cc[8]; /* control characters */ }; /* modem lines */ # 59 "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h" 3 4 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ /* line disciplines */ # 30 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4 /* On a Unix system, the system probably defines some of the symbols we define in (usually with the same values). The code to generate has omitted these symbols to avoid the conflict, but a Unix program expects to define them, so we must include here. */ # 1 "/usr/include/x86_64-linux-gnu/sys/ttydefaults.h" 1 3 4 /*- * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 */ /* * System wide defaults for terminal state. Linux version. */ /* * Defaults on "first" open. */ /* * Control Character Defaults */ # 82 "/usr/include/x86_64-linux-gnu/sys/ttydefaults.h" 3 4 /* compat */ /* PROTECTED INCLUSION ENDS HERE */ /* * #define TTYDEFCHARS to include an array of default control characters. */ # 37 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 2 3 4 /* Perform the I/O control operation specified by REQUEST on FD. One argument may follow; its presence and type depend on REQUEST. Return value depends on REQUEST. Usually -1 indicates error. */ extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__ , __leaf__)); # 58 "../block/file-posix.c" 2 # 1 "/usr/include/x86_64-linux-gnu/sys/param.h" 1 3 4 /* Compatibility header for old-style Unix parameters and limits. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 24 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ # 26 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h" 1 3 4 /* Copyright (C) 1992-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* This administrivia gets added to the beginning of limits.h if the system has its own version of limits.h. */ /* We use _GCC_LIMITS_H_ because we want this not to match any macros that the system's limits.h uses for its own purposes. */ # 27 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4 # 1 "/usr/include/endian.h" 1 3 4 /* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 28 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4 # 1 "/usr/include/signal.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.14 Signal handling */ # 29 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4 /* This file defines some things in system-specific ways. */ # 1 "/usr/include/x86_64-linux-gnu/bits/param.h" 1 3 4 /* Old-style Unix parameters and limits. Linux version. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 27 "/usr/include/x86_64-linux-gnu/bits/param.h" 3 4 # 1 "/usr/include/linux/limits.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 28 "/usr/include/x86_64-linux-gnu/bits/param.h" 2 3 4 # 1 "/usr/include/linux/param.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/x86_64-linux-gnu/asm/param.h" 1 3 4 # 1 "/usr/include/asm-generic/param.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/x86_64-linux-gnu/asm/param.h" 2 3 4 # 6 "/usr/include/linux/param.h" 2 3 4 # 29 "/usr/include/x86_64-linux-gnu/bits/param.h" 2 3 4 /* The kernel headers define ARG_MAX. The value is wrong, though. */ /* The following are not really correct but it is a value we used for a long time and which seems to be usable. People should not use NOFILE and NCARGS anyway. */ # 32 "/usr/include/x86_64-linux-gnu/sys/param.h" 2 3 4 /* BSD names for some values. */ # 67 "/usr/include/x86_64-linux-gnu/sys/param.h" 3 4 /* Magical constants. */ # 76 "/usr/include/x86_64-linux-gnu/sys/param.h" 3 4 /* Unit of `st_blocks'. */ /* Bit map related macros. */ /* Macros for counting and rounding. */ # 101 "/usr/include/x86_64-linux-gnu/sys/param.h" 3 4 /* Macros for min/max. */ # 59 "../block/file-posix.c" 2 # 1 "/usr/include/linux/cdrom.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * -- * General header file for linux CD-ROM drivers * Copyright (C) 1992 David Giller, rafetmad@oxy.edu * 1994, 1995 Eberhard Mönkeberg, emoenke@gwdg.de * 1996 David van Leeuwen, david@tm.tno.nl * 1997, 1998 Erik Andersen, andersee@debian.org * 1998-2002 Jens Axboe, axboe@suse.de */ # 1 "/usr/include/linux/types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/x86_64-linux-gnu/asm/types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 */ # 1 "/usr/include/asm-generic/types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * int-ll64 is used everywhere now. */ # 1 "/usr/include/asm-generic/int-ll64.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * asm-generic/int-ll64.h * * Integer declarations for architectures which use "long long" * for 64-bit types. */ # 1 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 11 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 3 4 # 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * There seems to be no way of detecting this automatically from user * space, so 64 bit architectures should override this in their * bitsperlong.h. In particular, an architecture that supports * both 32 and 64 bit user space must not rely on CONFIG_64BIT * to decide it, but rather check a compiler provided macro. */ # 12 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 2 3 4 # 13 "/usr/include/asm-generic/int-ll64.h" 2 3 4 /* * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the * header files exported to user space */ typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; __extension__ typedef __signed__ long long __s64; __extension__ typedef unsigned long long __u64; # 8 "/usr/include/asm-generic/types.h" 2 3 4 # 6 "/usr/include/x86_64-linux-gnu/asm/types.h" 2 3 4 # 6 "/usr/include/linux/types.h" 2 3 4 # 1 "/usr/include/linux/posix_types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/linux/stddef.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 6 "/usr/include/linux/posix_types.h" 2 3 4 /* * This allows for 1024 file descriptors: if NR_OPEN is ever grown * beyond that you'll have to change this too. But 1024 fd's seem to be * enough even for such "real" unices like OSF/1, so hopefully this is * one limit that doesn't have to be changed [again]. * * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in * (and thus ) - but this is a more logical * place for them. Solved by having dummy defines in . */ /* * This macro may have been defined in . But we always * use the one here. */ typedef struct { unsigned long fds_bits[1024 / (8 * sizeof(long))]; } __kernel_fd_set; /* Type of a signal handler. */ typedef void (*__kernel_sighandler_t)(int); /* Type of a SYSV IPC key. */ typedef int __kernel_key_t; typedef int __kernel_mqd_t; # 1 "/usr/include/x86_64-linux-gnu/asm/posix_types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. Also, we cannot * assume GCC is being used. */ typedef unsigned short __kernel_old_uid_t; typedef unsigned short __kernel_old_gid_t; typedef unsigned long __kernel_old_dev_t; # 1 "/usr/include/asm-generic/posix_types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/x86_64-linux-gnu/asm/bitsperlong.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 6 "/usr/include/asm-generic/posix_types.h" 2 3 4 /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. * * First the types that are often defined in different ways across * architectures, so that you can override them. */ typedef long __kernel_long_t; typedef unsigned long __kernel_ulong_t; typedef __kernel_ulong_t __kernel_ino_t; typedef unsigned int __kernel_mode_t; typedef int __kernel_pid_t; typedef int __kernel_ipc_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef __kernel_long_t __kernel_suseconds_t; typedef int __kernel_daddr_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; # 62 "/usr/include/asm-generic/posix_types.h" 3 4 /* * Most 32 bit architectures use "unsigned int" size_t, * and all 64 bit architectures use "unsigned long" size_t. */ typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_long_t __kernel_ssize_t; typedef __kernel_long_t __kernel_ptrdiff_t; typedef struct { int val[2]; } __kernel_fsid_t; /* * anything below here should be completely generic */ typedef __kernel_long_t __kernel_off_t; typedef long long __kernel_loff_t; typedef __kernel_long_t __kernel_time_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; # 19 "/usr/include/x86_64-linux-gnu/asm/posix_types_64.h" 2 3 4 # 8 "/usr/include/x86_64-linux-gnu/asm/posix_types.h" 2 3 4 # 37 "/usr/include/linux/posix_types.h" 2 3 4 # 10 "/usr/include/linux/types.h" 2 3 4 /* * Below are truly Linux-specific types that should never collide with * any application/library that wants linux/types.h. */ # 24 "/usr/include/linux/types.h" 3 4 typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; typedef __u16 __sum16; typedef __u32 __wsum; /* * aligned_u64 should be used in defining kernel<->userspace ABIs to avoid * common 32/64-bit compat problems. * 64-bit values align to 4-byte boundaries on x86_32 (and possibly other * architectures) and to 8-byte boundaries on 64-bit architectures. The new * aligned_64 type enforces 8-byte alignment so that structs containing * aligned_64 values have the same alignment on 32-bit and 64-bit architectures. * No conversions are necessary between 32-bit user-space and a 64-bit kernel. */ # 16 "/usr/include/linux/cdrom.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/byteorder.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 */ # 1 "/usr/include/linux/byteorder/little_endian.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 12 "/usr/include/linux/byteorder/little_endian.h" 3 4 # 1 "/usr/include/linux/types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 13 "/usr/include/linux/byteorder/little_endian.h" 2 3 4 # 1 "/usr/include/linux/swab.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/linux/types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 6 "/usr/include/linux/swab.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/swab.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/linux/types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 6 "/usr/include/x86_64-linux-gnu/asm/swab.h" 2 3 4 static __inline__ __u32 __arch_swab32(__u32 val) { __asm__("bswapl %0" : "=r" (val) : "0" (val)); return val; } static __inline__ __u64 __arch_swab64(__u64 val) { # 31 "/usr/include/x86_64-linux-gnu/asm/swab.h" 3 4 __asm__("bswapq %0" : "=r" (val) : "0" (val)); return val; } # 8 "/usr/include/linux/swab.h" 2 3 4 /* * casts are necessary for constants, because we never know how for sure * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. */ # 41 "/usr/include/linux/swab.h" 3 4 /* * Implement the following as inlines, but define the interface using * macros to allow constant folding when possible: * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32 */ static __inline__ __u16 __fswab16(__u16 val) { return ((__u16)( (((__u16)(val) & (__u16)0x00ffU) << 8) | (((__u16)(val) & (__u16)0xff00U) >> 8))); } static __inline__ __u32 __fswab32(__u32 val) { return __arch_swab32(val); } static __inline__ __u64 __fswab64(__u64 val) { return __arch_swab64(val); } static __inline__ __u32 __fswahw32(__u32 val) { return ((__u32)( (((__u32)(val) & (__u32)0x0000ffffUL) << 16) | (((__u32)(val) & (__u32)0xffff0000UL) >> 16))); } static __inline__ __u32 __fswahb32(__u32 val) { return ((__u32)( (((__u32)(val) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(val) & (__u32)0xff00ff00UL) >> 8))); } /** * __swab16 - return a byteswapped 16-bit value * @x: value to byteswap */ # 109 "/usr/include/linux/swab.h" 3 4 /** * __swab32 - return a byteswapped 32-bit value * @x: value to byteswap */ # 122 "/usr/include/linux/swab.h" 3 4 /** * __swab64 - return a byteswapped 64-bit value * @x: value to byteswap */ # 135 "/usr/include/linux/swab.h" 3 4 /** * __swahw32 - return a word-swapped 32-bit value * @x: value to wordswap * * __swahw32(0x12340000) is 0x00001234 */ /** * __swahb32 - return a high and low byte-swapped 32-bit value * @x: value to byteswap * * __swahb32(0x12345678) is 0x34127856 */ /** * __swab16p - return a byteswapped 16-bit value from a pointer * @p: pointer to a naturally-aligned 16-bit value */ static __inline __attribute__ ((__always_inline__)) __u16 __swab16p(const __u16 *p) { return (__builtin_constant_p((__u16)(*p)) ? ((__u16)( (((__u16)(*p) & (__u16)0x00ffU) << 8) | (((__u16)(*p) & (__u16)0xff00U) >> 8))) : __fswab16(*p)); } /** * __swab32p - return a byteswapped 32-bit value from a pointer * @p: pointer to a naturally-aligned 32-bit value */ static __inline __attribute__ ((__always_inline__)) __u32 __swab32p(const __u32 *p) { return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x000000ffUL) << 24) | (((__u32)(*p) & (__u32)0x0000ff00UL) << 8) | (((__u32)(*p) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(*p) & (__u32)0xff000000UL) >> 24))) : __fswab32(*p)); } /** * __swab64p - return a byteswapped 64-bit value from a pointer * @p: pointer to a naturally-aligned 64-bit value */ static __inline __attribute__ ((__always_inline__)) __u64 __swab64p(const __u64 *p) { return (__builtin_constant_p((__u64)(*p)) ? ((__u64)( (((__u64)(*p) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(*p) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(*p) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(*p) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(*p) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(*p) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(*p) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(*p) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(*p)); } /** * __swahw32p - return a wordswapped 32-bit value from a pointer * @p: pointer to a naturally-aligned 32-bit value * * See __swahw32() for details of wordswapping. */ static __inline__ __u32 __swahw32p(const __u32 *p) { return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x0000ffffUL) << 16) | (((__u32)(*p) & (__u32)0xffff0000UL) >> 16))) : __fswahw32(*p)); } /** * __swahb32p - return a high and low byteswapped 32-bit value from a pointer * @p: pointer to a naturally-aligned 32-bit value * * See __swahb32() for details of high/low byteswapping. */ static __inline__ __u32 __swahb32p(const __u32 *p) { return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(*p) & (__u32)0xff00ff00UL) >> 8))) : __fswahb32(*p)); } /** * __swab16s - byteswap a 16-bit value in-place * @p: pointer to a naturally-aligned 16-bit value */ static __inline__ void __swab16s(__u16 *p) { *p = __swab16p(p); } /** * __swab32s - byteswap a 32-bit value in-place * @p: pointer to a naturally-aligned 32-bit value */ static __inline __attribute__ ((__always_inline__)) void __swab32s(__u32 *p) { *p = __swab32p(p); } /** * __swab64s - byteswap a 64-bit value in-place * @p: pointer to a naturally-aligned 64-bit value */ static __inline __attribute__ ((__always_inline__)) void __swab64s(__u64 *p) { *p = __swab64p(p); } /** * __swahw32s - wordswap a 32-bit value in-place * @p: pointer to a naturally-aligned 32-bit value * * See __swahw32() for details of wordswapping */ static __inline__ void __swahw32s(__u32 *p) { *p = __swahw32p(p); } /** * __swahb32s - high and low byteswap a 32-bit value in-place * @p: pointer to a naturally-aligned 32-bit value * * See __swahb32() for details of high and low byte swapping */ static __inline__ void __swahb32s(__u32 *p) { *p = __swahb32p(p); } # 14 "/usr/include/linux/byteorder/little_endian.h" 2 3 4 # 44 "/usr/include/linux/byteorder/little_endian.h" 3 4 static __inline __attribute__ ((__always_inline__)) __le64 __cpu_to_le64p(const __u64 *p) { return (__le64)*p; } static __inline __attribute__ ((__always_inline__)) __u64 __le64_to_cpup(const __le64 *p) { return (__u64)*p; } static __inline __attribute__ ((__always_inline__)) __le32 __cpu_to_le32p(const __u32 *p) { return (__le32)*p; } static __inline __attribute__ ((__always_inline__)) __u32 __le32_to_cpup(const __le32 *p) { return (__u32)*p; } static __inline __attribute__ ((__always_inline__)) __le16 __cpu_to_le16p(const __u16 *p) { return (__le16)*p; } static __inline __attribute__ ((__always_inline__)) __u16 __le16_to_cpup(const __le16 *p) { return (__u16)*p; } static __inline __attribute__ ((__always_inline__)) __be64 __cpu_to_be64p(const __u64 *p) { return (__be64)__swab64p(p); } static __inline __attribute__ ((__always_inline__)) __u64 __be64_to_cpup(const __be64 *p) { return __swab64p((__u64 *)p); } static __inline __attribute__ ((__always_inline__)) __be32 __cpu_to_be32p(const __u32 *p) { return (__be32)__swab32p(p); } static __inline __attribute__ ((__always_inline__)) __u32 __be32_to_cpup(const __be32 *p) { return __swab32p((__u32 *)p); } static __inline __attribute__ ((__always_inline__)) __be16 __cpu_to_be16p(const __u16 *p) { return (__be16)__swab16p(p); } static __inline __attribute__ ((__always_inline__)) __u16 __be16_to_cpup(const __be16 *p) { return __swab16p((__u16 *)p); } # 6 "/usr/include/x86_64-linux-gnu/asm/byteorder.h" 2 3 4 # 17 "/usr/include/linux/cdrom.h" 2 3 4 /******************************************************* * As of Linux 2.1.x, all Linux CD-ROM application programs will use this * (and only this) include file. It is my hope to provide Linux with * a uniform interface between software accessing CD-ROMs and the various * device drivers that actually talk to the drives. There may still be * 23 different kinds of strange CD-ROM drives, but at least there will * now be one, and only one, Linux CD-ROM interface. * * Additionally, as of Linux 2.1.x, all Linux application programs * should use the O_NONBLOCK option when opening a CD-ROM device * for subsequent ioctl commands. This allows for neat system errors * like "No medium found" or "Wrong medium type" upon attempting to * mount or play an empty slot, mount an audio disc, or play a data disc. * Generally, changing an application program to support O_NONBLOCK * is as easy as the following: * - drive = open("/dev/cdrom", O_RDONLY); * + drive = open("/dev/cdrom", O_RDONLY | O_NONBLOCK); * It is worth the small change. * * Patches for many common CD programs (provided by David A. van Leeuwen) * can be found at: ftp://ftp.gwdg.de/pub/linux/cdrom/drivers/cm206/ * *******************************************************/ /* When a driver supports a certain function, but the cdrom drive we are * using doesn't, we will return the error EDRIVE_CANT_DO_THIS. We will * borrow the "Operation not supported" error from the network folks to * accomplish this. Maybe someday we will get a more targeted error code, * but this will do for now... */ /******************************************************* * The CD-ROM IOCTL commands -- these should be supported by * all the various cdrom drivers. For the CD-ROM ioctls, we * will commandeer byte 0x53, or 'S'. *******************************************************/ # 88 "/usr/include/linux/cdrom.h" 3 4 /* * These ioctls are used only used in aztcd.c and optcd.c */ /* * This ioctl is only used by the scsi-cd driver. It is for playing audio in logical block addressing mode. */ /* * These ioctls are only used in optcd.c */ /* * These ioctls are (now) only in ide-cd.c for controlling * drive spindown time. They should be implemented in the * Uniform driver, via generic packet commands, GPCMD_MODE_SELECT_10, * GPCMD_MODE_SENSE_10 and the GPMODE_POWER_PAGE... * -Erik */ /* * These ioctls are implemented through the uniform CD-ROM driver * They _will_ be adopted by all CD-ROM drivers, when all the CD-ROM * drivers are eventually ported to the uniform CD-ROM driver interface. */ # 133 "/usr/include/linux/cdrom.h" 3 4 /* Note that scsi/scsi_ioctl.h also uses 0x5382 - 0x5386. * Future CDROM ioctls should be kept below 0x537F */ /* This ioctl is only used by sbpcd at the moment */ /* conflict with SCSI_IOCTL_GET_IDLUN */ /* DVD-ROM Specific ioctls */ # 150 "/usr/include/linux/cdrom.h" 3 4 /******************************************************* * CDROM IOCTL structures *******************************************************/ /* Address in MSF format */ struct cdrom_msf0 { __u8 minute; __u8 second; __u8 frame; }; /* Address in either MSF or logical format */ union cdrom_addr { struct cdrom_msf0 msf; int lba; }; /* This struct is used by the CDROMPLAYMSF ioctl */ struct cdrom_msf { __u8 cdmsf_min0; /* start minute */ __u8 cdmsf_sec0; /* start second */ __u8 cdmsf_frame0; /* start frame */ __u8 cdmsf_min1; /* end minute */ __u8 cdmsf_sec1; /* end second */ __u8 cdmsf_frame1; /* end frame */ }; /* This struct is used by the CDROMPLAYTRKIND ioctl */ struct cdrom_ti { __u8 cdti_trk0; /* start track */ __u8 cdti_ind0; /* start index */ __u8 cdti_trk1; /* end track */ __u8 cdti_ind1; /* end index */ }; /* This struct is used by the CDROMREADTOCHDR ioctl */ struct cdrom_tochdr { __u8 cdth_trk0; /* start track */ __u8 cdth_trk1; /* end track */ }; /* This struct is used by the CDROMVOLCTRL and CDROMVOLREAD ioctls */ struct cdrom_volctrl { __u8 channel0; __u8 channel1; __u8 channel2; __u8 channel3; }; /* This struct is used by the CDROMSUBCHNL ioctl */ struct cdrom_subchnl { __u8 cdsc_format; __u8 cdsc_audiostatus; __u8 cdsc_adr: 4; __u8 cdsc_ctrl: 4; __u8 cdsc_trk; __u8 cdsc_ind; union cdrom_addr cdsc_absaddr; union cdrom_addr cdsc_reladdr; }; /* This struct is used by the CDROMREADTOCENTRY ioctl */ struct cdrom_tocentry { __u8 cdte_track; __u8 cdte_adr :4; __u8 cdte_ctrl :4; __u8 cdte_format; union cdrom_addr cdte_addr; __u8 cdte_datamode; }; /* This struct is used by the CDROMREADMODE1, and CDROMREADMODE2 ioctls */ struct cdrom_read { int cdread_lba; char *cdread_bufaddr; int cdread_buflen; }; /* This struct is used by the CDROMREADAUDIO ioctl */ struct cdrom_read_audio { union cdrom_addr addr; /* frame address */ __u8 addr_format; /* CDROM_LBA or CDROM_MSF */ int nframes; /* number of 2352-byte-frames to read at once */ __u8 *buf; /* frame buffer (size: nframes*2352 bytes) */ }; /* This struct is used with the CDROMMULTISESSION ioctl */ struct cdrom_multisession { union cdrom_addr addr; /* frame address: start-of-last-session (not the new "frame 16"!). Only valid if the "xa_flag" is true. */ __u8 xa_flag; /* 1: "is XA disk" */ __u8 addr_format; /* CDROM_LBA or CDROM_MSF */ }; /* This struct is used with the CDROM_GET_MCN ioctl. * Very few audio discs actually have Universal Product Code information, * which should just be the Medium Catalog Number on the box. Also note * that the way the codeis written on CD is _not_ uniform across all discs! */ struct cdrom_mcn { __u8 medium_catalog_number[14]; /* 13 ASCII digits, null-terminated */ }; /* This is used by the CDROMPLAYBLK ioctl */ struct cdrom_blk { unsigned from; unsigned short len; }; # 281 "/usr/include/linux/cdrom.h" 3 4 /* for CDROM_PACKET_COMMAND ioctl */ struct cdrom_generic_command { unsigned char cmd[12]; unsigned char *buffer; unsigned int buflen; int stat; struct request_sense *sense; unsigned char data_direction; int quiet; int timeout; void *reserved[1]; /* unused, actually */ }; /* * A CD-ROM physical sector size is 2048, 2052, 2056, 2324, 2332, 2336, * 2340, or 2352 bytes long. * Sector types of the standard CD-ROM data formats: * * format sector type user data size (bytes) * ----------------------------------------------------------------------------- * 1 (Red Book) CD-DA 2352 (CD_FRAMESIZE_RAW) * 2 (Yellow Book) Mode1 Form1 2048 (CD_FRAMESIZE) * 3 (Yellow Book) Mode1 Form2 2336 (CD_FRAMESIZE_RAW0) * 4 (Green Book) Mode2 Form1 2048 (CD_FRAMESIZE) * 5 (Green Book) Mode2 Form2 2328 (2324+4 spare bytes) * * * The layout of the standard CD-ROM data formats: * ----------------------------------------------------------------------------- * - audio (red): | audio_sample_bytes | * | 2352 | * * - data (yellow, mode1): | sync - head - data - EDC - zero - ECC | * | 12 - 4 - 2048 - 4 - 8 - 276 | * * - data (yellow, mode2): | sync - head - data | * | 12 - 4 - 2336 | * * - XA data (green, mode2 form1): | sync - head - sub - data - EDC - ECC | * | 12 - 4 - 8 - 2048 - 4 - 276 | * * - XA data (green, mode2 form2): | sync - head - sub - data - Spare | * | 12 - 4 - 8 - 2324 - 4 | * */ /* Some generally useful CD-ROM information -- mostly based on the above */ # 346 "/usr/include/linux/cdrom.h" 3 4 /* most drives don't deliver everything: */ /* CD-ROM address types (cdrom_tocentry.cdte_format) */ /* bit to tell whether track is data or audio (cdrom_tocentry.cdte_ctrl) */ /* The leadout track is always 0xAA, regardless of # of tracks on disc */ /* audio states (from SCSI-2, but seen with other drives, too) */ /* capability flags used with the uniform CD-ROM driver */ # 395 "/usr/include/linux/cdrom.h" 3 4 /* drive status possibilities returned by CDROM_DRIVE_STATUS ioctl */ /* return values for the CDROM_DISC_STATUS ioctl */ /* can also return CDS_NO_[INFO|DISC], from above */ /* User-configurable behavior options for the uniform CD-ROM driver */ /* Special codes used when specifying changer slots. */ /* For partition based multisession access. IDE can handle 64 partitions * per drive - SCSI CD-ROM's use minors to differentiate between the * various drives, so we can't do multisessions the same way there. * Use the -o session=x option to mount on them. */ /********************************************************************* * Generic Packet commands, MMC commands, and such *********************************************************************/ /* The generic packet command opcodes for CD/DVD Logical Units, * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */ # 489 "/usr/include/linux/cdrom.h" 3 4 /* This is listed as optional in ATAPI 2.6, but is (curiously) * missing from Mt. Fuji, Table 57. It _is_ mentioned in Mt. Fuji * Table 377 as an MMC command for SCSi devices though... Most ATAPI * drives support it. */ /* This seems to be a SCSI specific CD-ROM opcode * to play data at track/index */ /* * From MS Media Status Notification Support Specification. For * older drives only. */ /* Mode page codes for mode sense/set */ # 514 "/usr/include/linux/cdrom.h" 3 4 /* Not in Mt. Fuji, but in ATAPI 2.6 -- deprecated now in favor * of MODE_SENSE_POWER_PAGE */ /* DVD struct types */ struct dvd_layer { __u8 book_version : 4; __u8 book_type : 4; __u8 min_rate : 4; __u8 disc_size : 4; __u8 layer_type : 4; __u8 track_path : 1; __u8 nlayers : 2; __u8 track_density : 4; __u8 linear_density : 4; __u8 bca : 1; __u32 start_sector; __u32 end_sector; __u32 end_sector_l0; }; struct dvd_physical { __u8 type; __u8 layer_num; struct dvd_layer layer[4]; }; struct dvd_copyright { __u8 type; __u8 layer_num; __u8 cpst; __u8 rmi; }; struct dvd_disckey { __u8 type; unsigned agid : 2; __u8 value[2048]; }; struct dvd_bca { __u8 type; int len; __u8 value[188]; }; struct dvd_manufact { __u8 type; __u8 layer_num; int len; __u8 value[2048]; }; typedef union { __u8 type; struct dvd_physical physical; struct dvd_copyright copyright; struct dvd_disckey disckey; struct dvd_bca bca; struct dvd_manufact manufact; } dvd_struct; /* * DVD authentication ioctl */ /* Authentication states */ /* Termination states */ /* Other functions */ /* State data */ typedef __u8 dvd_key[5]; /* 40-bit value, MSB is first elem. */ typedef __u8 dvd_challenge[10]; /* 80-bit value, MSB is first elem. */ struct dvd_lu_send_agid { __u8 type; unsigned agid : 2; }; struct dvd_host_send_challenge { __u8 type; unsigned agid : 2; dvd_challenge chal; }; struct dvd_send_key { __u8 type; unsigned agid : 2; dvd_key key; }; struct dvd_lu_send_challenge { __u8 type; unsigned agid : 2; dvd_challenge chal; }; # 653 "/usr/include/linux/cdrom.h" 3 4 struct dvd_lu_send_title_key { __u8 type; unsigned agid : 2; dvd_key title_key; int lba; unsigned cpm : 1; unsigned cp_sec : 1; unsigned cgms : 2; }; struct dvd_lu_send_asf { __u8 type; unsigned agid : 2; unsigned asf : 1; }; struct dvd_host_send_rpcstate { __u8 type; __u8 pdrc; }; struct dvd_lu_send_rpcstate { __u8 type : 2; __u8 vra : 3; __u8 ucca : 3; __u8 region_mask; __u8 rpc_scheme; }; typedef union { __u8 type; struct dvd_lu_send_agid lsa; struct dvd_host_send_challenge hsc; struct dvd_send_key lsk; struct dvd_lu_send_challenge lsc; struct dvd_send_key hsk; struct dvd_lu_send_title_key lstk; struct dvd_lu_send_asf lsasf; struct dvd_host_send_rpcstate hrpcs; struct dvd_lu_send_rpcstate lrpcs; } dvd_authinfo; struct request_sense { __u8 error_code : 7; __u8 valid : 1; __u8 segment_number; __u8 sense_key : 4; __u8 reserved2 : 1; __u8 ili : 1; __u8 reserved1 : 2; __u8 information[4]; __u8 add_sense_len; __u8 command_info[4]; __u8 asc; __u8 ascq; __u8 fruc; __u8 sks[3]; __u8 asb[46]; }; /* * feature profile */ /* * media status bits */ /* * mrw address spaces */ /* * mrw mode pages (first is deprecated) -- probed at init time and * cdi->mrw_mode_page is set */ struct mrw_feature_desc { __be16 feature_code; __u8 curr : 1; __u8 persistent : 1; __u8 feature_version : 4; __u8 reserved1 : 2; __u8 add_len; __u8 write : 1; __u8 reserved2 : 7; __u8 reserved3; __u8 reserved4; __u8 reserved5; }; /* cf. mmc4r02g.pdf 5.3.10 Random Writable Feature (0020h) pg 197 of 635 */ struct rwrt_feature_desc { __be16 feature_code; __u8 curr : 1; __u8 persistent : 1; __u8 feature_version : 4; __u8 reserved1 : 2; __u8 add_len; __u32 last_lba; __u32 block_size; __u16 blocking; __u8 page_present : 1; __u8 reserved2 : 7; __u8 reserved3; }; typedef struct { __be16 disc_information_length; __u8 disc_status : 2; __u8 border_status : 2; __u8 erasable : 1; __u8 reserved1 : 3; __u8 n_first_track; __u8 n_sessions_lsb; __u8 first_track_lsb; __u8 last_track_lsb; # 837 "/usr/include/linux/cdrom.h" 3 4 __u8 mrw_status : 2; __u8 dbit : 1; __u8 reserved2 : 2; __u8 uru : 1; __u8 dbc_v : 1; __u8 did_v : 1; __u8 disc_type; __u8 n_sessions_msb; __u8 first_track_msb; __u8 last_track_msb; __u32 disc_id; __u32 lead_in; __u32 lead_out; __u8 disc_bar_code[8]; __u8 reserved3; __u8 n_opc; } disc_information; typedef struct { __be16 track_information_length; __u8 track_lsb; __u8 session_lsb; __u8 reserved1; # 875 "/usr/include/linux/cdrom.h" 3 4 __u8 track_mode : 4; __u8 copy : 1; __u8 damage : 1; __u8 reserved2 : 2; __u8 data_mode : 4; __u8 fp : 1; __u8 packet : 1; __u8 blank : 1; __u8 rt : 1; __u8 nwa_v : 1; __u8 lra_v : 1; __u8 reserved3 : 6; __be32 track_start; __be32 next_writable; __be32 free_blocks; __be32 fixed_packet_size; __be32 track_size; __be32 last_rec_address; } track_information; struct feature_header { __u32 data_len; __u8 reserved1; __u8 reserved2; __u16 curr_profile; }; struct mode_page_header { __be16 mode_data_length; __u8 medium_type; __u8 reserved1; __u8 reserved2; __u8 reserved3; __be16 desc_length; }; /* removable medium feature descriptor */ struct rm_feature_desc { __be16 feature_code; __u8 curr:1; __u8 persistent:1; __u8 feature_version:4; __u8 reserved1:2; __u8 add_len; # 935 "/usr/include/linux/cdrom.h" 3 4 __u8 lock:1; __u8 dbml:1; __u8 pvnt_jmpr:1; __u8 eject:1; __u8 load:1; __u8 mech_type:3; __u8 reserved2; __u8 reserved3; __u8 reserved4; }; # 60 "../block/file-posix.c" 2 # 1 "/usr/include/linux/fd.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/linux/ioctl.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 6 "/usr/include/linux/fd.h" 2 3 4 /* New file layout: Now the ioctl definitions immediately follow the * definitions of the structures that they use */ /* * Geometry */ struct floppy_struct { unsigned int size, /* nr of sectors total */ sect, /* sectors per track */ head, /* nr of heads */ track, /* nr of tracks */ stretch; /* bit 0 !=0 means double track steps */ /* bit 1 != 0 means swap sides */ /* bits 2..9 give the first sector */ /* number (the LSB is flipped) */ unsigned char gap, /* gap1 size */ rate, /* data rate. |= 0x40 for perpendicular */ spec1, /* stepping rate, head unload time */ fmt_gap; /* gap2 size */ const char * name; /* used only for predefined formats */ }; /* commands needing write access have 0x40 set */ /* commands needing super user access have 0x80 set */ /* clear user-defined parameters */ /* set user-defined parameters for current media */ /* set/get disk parameters */ /* issue/don't issue kernel messages on media type change */ /* * Formatting (obsolete) */ struct format_descr { unsigned int device,head,track; }; /* begin formatting a disk */ /* format the specified track */ /* end formatting a disk */ /* * Error thresholds */ struct floppy_max_errors { unsigned int abort, /* number of errors to be reached before aborting */ read_track, /* maximal number of errors permitted to read an * entire track at once */ reset, /* maximal number of errors before a reset is tried */ recal, /* maximal number of errors before a recalibrate is * tried */ /* * Threshold for reporting FDC errors to the console. * Setting this to zero may flood your screen when using * ultra cheap floppies ;-) */ reporting; }; /* set fdc error reporting threshold */ /* flush buffers for media; either for verifying media, or for * handling a media change without closing the file descriptor */ /* set/get abortion and read_track threshold. See also floppy_drive_params * structure */ typedef char floppy_drive_name[16]; /* get drive type: 5 1/4 or 3 1/2 */ /* * Drive parameters (user modifiable) */ struct floppy_drive_params { signed char cmos; /* CMOS type */ /* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms * etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA). */ unsigned long max_dtr; /* Step rate, usec */ unsigned long hlt; /* Head load/settle time, msec */ unsigned long hut; /* Head unload time (remnant of * 8" drives) */ unsigned long srt; /* Step rate, usec */ unsigned long spinup; /* time needed for spinup (expressed * in jiffies) */ unsigned long spindown; /* timeout needed for spindown */ unsigned char spindown_offset; /* decides in which position the disk * will stop */ unsigned char select_delay; /* delay to wait after select */ unsigned char rps; /* rotations per second */ unsigned char tracks; /* maximum number of tracks */ unsigned long timeout; /* timeout for interrupt requests */ unsigned char interleave_sect; /* if there are more sectors, use * interleave */ struct floppy_max_errors max_errors; char flags; /* various flags, including ftd_msg */ /* * Announce successful media type detection and media information loss after * disk changes. * Also used to enable/disable printing of overrun warnings. */ # 168 "/usr/include/linux/fd.h" 3 4 char read_track; /* use readtrack during probing? */ /* * Auto-detection. Each drive type has eight formats which are * used in succession to try to read the disk. If the FDC cannot lock onto * the disk, the next format is tried. This uses the variable 'probing'. */ short autodetect[8]; /* autodetected formats */ int checkfreq; /* how often should the drive be checked for disk * changes */ int native_format; /* native format of this drive */ }; enum { FD_NEED_TWADDLE_BIT, /* more magic */ FD_VERIFY_BIT, /* inquire for write protection */ FD_DISK_NEWCHANGE_BIT, /* change detected, and no action undertaken yet * to clear media change status */ FD_UNUSED_BIT, FD_DISK_CHANGED_BIT, /* disk has been changed since last i/o */ FD_DISK_WRITABLE_BIT, /* disk is writable */ FD_OPEN_SHOULD_FAIL_BIT }; /* set/get drive parameters */ /* * Current drive state (not directly modifiable by user, readonly) */ struct floppy_drive_struct { unsigned long flags; /* values for these flags */ unsigned long spinup_date; unsigned long select_date; unsigned long first_read_date; short probed_format; short track; /* current track */ short maxblock; /* id of highest block read */ short maxtrack; /* id of highest half track read */ int generation; /* how many diskchanges? */ /* * (User-provided) media information is _not_ discarded after a media change * if the corresponding keep_data flag is non-zero. Positive values are * decremented after each probe. */ int keep_data; /* Prevent "aliased" accesses. */ int fd_ref; int fd_device; unsigned long last_checked; /* when was the drive last checked for a disk * change? */ char *dmabuf; int bufblocks; }; /* get drive state: GET returns the cached state, POLL polls for new state */ /* * reset FDC */ enum reset_mode { FD_RESET_IF_NEEDED, /* reset only if the reset flags is set */ FD_RESET_IF_RAWCMD, /* obsolete */ FD_RESET_ALWAYS /* reset always */ }; /* * FDC state */ struct floppy_fdc_state { int spec1; /* spec1 value last used */ int spec2; /* spec2 value last used */ int dtr; unsigned char version; /* FDC version code */ unsigned char dor; unsigned long address; /* io address */ unsigned int rawcmd:2; unsigned int reset:1; unsigned int need_configure:1; unsigned int perp_mode:2; unsigned int has_fifo:1; unsigned int driver_version; /* version code for floppy driver */ /* user programs using the floppy API should use floppy_fdc_state to * get the version number of the floppy driver that they are running * on. If this version number is bigger than the one compiled into the * user program (the FD_DRIVER_VERSION define), it should be prepared * to bigger structures */ unsigned char track[4]; /* Position of the heads of the 4 units attached to this FDC, * as stored on the FDC. In the future, the position as stored * on the FDC might not agree with the actual physical * position of these drive heads. By allowing such * disagreement, it will be possible to reset the FDC without * incurring the expensive cost of repositioning all heads. * Right now, these positions are hard wired to 0. */ }; /* * Asynchronous Write error tracking */ struct floppy_write_errors { /* Write error logging. * * These fields can be cleared with the FDWERRORCLR ioctl. * Only writes that were attempted but failed due to a physical media * error are logged. write(2) calls that fail and return an error code * to the user process are not counted. */ unsigned int write_errors; /* number of physical write errors * encountered */ /* position of first and last write errors */ unsigned long first_error_sector; int first_error_generation; unsigned long last_error_sector; int last_error_generation; unsigned int badness; /* highest retry count for a read or write * operation */ }; /* clear write error and badness information */ /* get write error and badness information */ /* * Raw commands */ /* new interface flag: now we can do them in batches */ struct floppy_raw_cmd { unsigned int flags; # 340 "/usr/include/linux/fd.h" 3 4 /* more "in" flags */ /* more "out" flags */ void *data; char *kernel_data; /* location of data buffer in the kernel */ struct floppy_raw_cmd *next; /* used for chaining of raw cmd's * within the kernel */ long length; /* in: length of dma transfer. out: remaining bytes */ long phys_length; /* physical length, if different from dma length */ int buffer_length; /* length of allocated buffer */ unsigned char rate; unsigned char cmd_count; unsigned char cmd[16]; unsigned char reply_count; unsigned char reply[16]; int track; int resultcode; int reserved1; int reserved2; }; /* send a raw command to the fdc. Structure size not included, because of * batches */ /* flicker motor-on bit before reading a sector. Experimental */ /* eject the disk */ # 61 "../block/file-posix.c" 2 # 1 "/usr/include/linux/fs.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * This file has definitions for some important file table structures * and constants and structures used by various generic file system * ioctl's. Please do not make any changes in this file before * sending patches for review to linux-fsdevel@vger.kernel.org and * linux-api@vger.kernel.org. */ # 1 "/usr/include/linux/limits.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 14 "/usr/include/linux/fs.h" 2 3 4 # 1 "/usr/include/linux/ioctl.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 15 "/usr/include/linux/fs.h" 2 3 4 # 1 "/usr/include/linux/types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 16 "/usr/include/linux/fs.h" 2 3 4 /* * It's silly to have NR_OPEN bigger than NR_FILE, but you can change * the file limit at runtime and only root can increase the per-process * nr_file rlimit, so it's safe to set up a ridiculously high absolute * upper limit on files-per-process. * * Some programs (notably those using select()) may have to be * recompiled to take full advantage of the new limits.. */ /* Fixed constants first: */ # 46 "/usr/include/linux/fs.h" 3 4 struct file_clone_range { __s64 src_fd; __u64 src_offset; __u64 src_length; __u64 dest_offset; }; struct fstrim_range { __u64 start; __u64 len; __u64 minlen; }; /* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */ /* from struct btrfs_ioctl_file_extent_same_info */ struct file_dedupe_range_info { __s64 dest_fd; /* in - destination file */ __u64 dest_offset; /* in - start of extent in destination */ __u64 bytes_deduped; /* out - total # of bytes we were able * to dedupe from this file. */ /* status of this dedupe operation: * < 0 for error * == FILE_DEDUPE_RANGE_SAME if dedupe succeeds * == FILE_DEDUPE_RANGE_DIFFERS if data differs */ __s32 status; /* out - see above description */ __u32 reserved; /* must be zero */ }; /* from struct btrfs_ioctl_file_extent_same_args */ struct file_dedupe_range { __u64 src_offset; /* in - start of extent in source */ __u64 src_length; /* in - length of extent */ __u16 dest_count; /* in - total elements in info array */ __u16 reserved1; /* must be zero */ __u32 reserved2; /* must be zero */ struct file_dedupe_range_info info[0]; }; /* And dynamically-tunable limits and defaults: */ struct files_stat_struct { unsigned long nr_files; /* read only */ unsigned long nr_free_files; /* read only */ unsigned long max_files; /* tunable */ }; struct inodes_stat_t { long nr_inodes; long nr_unused; long dummy[5]; /* padding for sysctl ABI compatibility */ }; /* * These are the fs-independent mount-flags: up to 32 flags are supported */ # 135 "/usr/include/linux/fs.h" 3 4 /* These sb flags are internal to the kernel */ /* * Superblock flags that can be altered by MS_REMOUNT */ /* * Old magic mount flag and mask */ /* * Structure for FS_IOC_FSGETXATTR[A] and FS_IOC_FSSETXATTR. */ struct fsxattr { __u32 fsx_xflags; /* xflags field value (get/set) */ __u32 fsx_extsize; /* extsize field value (get/set)*/ __u32 fsx_nextents; /* nextents field value (get) */ __u32 fsx_projid; /* project identifier (get/set) */ __u32 fsx_cowextsize; /* CoW extsize field value (get/set)*/ unsigned char fsx_pad[8]; }; /* * Flags for the fsx_xflags field */ # 188 "/usr/include/linux/fs.h" 3 4 /* the read-only stuff doesn't really belong here, but any other place is probably as bad and I don't want to create yet another include file. */ # 213 "/usr/include/linux/fs.h" 3 4 /* A jump here: 108-111 have been used for various private purposes. */ # 230 "/usr/include/linux/fs.h" 3 4 /* * A jump here: 130-131 are reserved for zoned block devices * (see uapi/linux/blkzoned.h) */ # 257 "/usr/include/linux/fs.h" 3 4 /* * File system encryption support */ /* Policy provided via an ioctl on the topmost directory */ # 270 "/usr/include/linux/fs.h" 3 4 /* Encryption algorithms */ # 279 "/usr/include/linux/fs.h" 3 4 struct fscrypt_policy { __u8 version; __u8 contents_encryption_mode; __u8 filenames_encryption_mode; __u8 flags; __u8 master_key_descriptor[8]; }; /* Parameters for passing an encryption key into the kernel keyring */ /* Structure that userspace passes to the kernel keyring */ struct fscrypt_key { __u32 mode; __u8 raw[64]; __u32 size; }; /* * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) * * Note: for historical reasons, these flags were originally used and * defined for use by ext2/ext3, and then other file systems started * using these flags so they wouldn't need to write their own version * of chattr/lsattr (which was shipped as part of e2fsprogs). You * should think twice before trying to use these flags in new * contexts, or trying to assign these flags, since they are used both * as the UAPI and the on-disk encoding for ext2/3/4. Also, we are * almost out of 32-bit flags. :-) * * We have recently hoisted FS_IOC_FSGETXATTR / FS_IOC_FSSETXATTR from * XFS to the generic FS level interface. This uses a structure that * has padding and hence has more room to grow, so it may be more * appropriate for many new use cases. * * Please do not change these flags or interfaces before checking with * linux-fsdevel@vger.kernel.org and linux-api@vger.kernel.org. */ # 332 "/usr/include/linux/fs.h" 3 4 /* Reserved for compression usage... */ /* End compression flags --- maybe not all used */ # 362 "/usr/include/linux/fs.h" 3 4 /* * Flags for preadv2/pwritev2: */ typedef int __kernel_rwf_t; /* high priority request, poll if possible */ /* per-IO O_DSYNC */ /* per-IO O_SYNC */ /* per-IO, return -EAGAIN if operation would block */ /* mask of flags supported by the kernel */ # 62 "../block/file-posix.c" 2 # 1 "/usr/include/linux/hdreg.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 1 "/usr/include/linux/types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 6 "/usr/include/linux/hdreg.h" 2 3 4 /* * Command Header sizes for IOCTL commands */ # 22 "/usr/include/linux/hdreg.h" 3 4 /* * Define standard taskfile in/out register */ typedef unsigned char task_ioreg_t; typedef unsigned long sata_ioreg_t; typedef union ide_reg_valid_s { unsigned all : 16; struct { unsigned data : 1; unsigned error_feature : 1; unsigned sector : 1; unsigned nsector : 1; unsigned lcyl : 1; unsigned hcyl : 1; unsigned select : 1; unsigned status_command : 1; unsigned data_hob : 1; unsigned error_feature_hob : 1; unsigned sector_hob : 1; unsigned nsector_hob : 1; unsigned lcyl_hob : 1; unsigned hcyl_hob : 1; unsigned select_hob : 1; unsigned control_hob : 1; } b; } ide_reg_valid_t; typedef struct ide_task_request_s { __u8 io_ports[8]; __u8 hob_ports[8]; /* bytes 6 and 7 are unused */ ide_reg_valid_t out_flags; ide_reg_valid_t in_flags; int data_phase; int req_cmd; unsigned long out_size; unsigned long in_size; } ide_task_request_t; typedef struct ide_ioctl_request_s { ide_task_request_t *task_request; unsigned char *out_buffer; unsigned char *in_buffer; } ide_ioctl_request_t; struct hd_drive_cmd_hdr { __u8 command; __u8 sector_number; __u8 feature; __u8 sector_count; }; typedef struct hd_drive_task_hdr { __u8 data; __u8 feature; __u8 sector_count; __u8 sector_number; __u8 low_cylinder; __u8 high_cylinder; __u8 device_head; __u8 command; } task_struct_t; typedef struct hd_drive_hob_hdr { __u8 data; __u8 feature; __u8 sector_count; __u8 sector_number; __u8 low_cylinder; __u8 high_cylinder; __u8 device_head; __u8 control; } hob_struct_t; # 125 "/usr/include/linux/hdreg.h" 3 4 /* ATA/ATAPI Commands pre T13 Spec */ /* * 0x01->0x02 Reserved */ /* * 0x04->0x07 Reserved */ /* * 0x09->0x0F Reserved */ /* * 0x10->0x1F Reserved */ # 152 "/usr/include/linux/hdreg.h" 3 4 /* * 0x28 */ /* * 0x2A->0x2F Reserved */ # 169 "/usr/include/linux/hdreg.h" 3 4 /* * 0x3A->0x3B Reserved */ /* * 0x3D->0x3F Reserved */ /* * 0x43->0x4F Reserved */ /* * 0x51->0x5F Reserved */ /* * 0x61->0x5F Reserved */ # 201 "/usr/include/linux/hdreg.h" 3 4 /* * 0x9A VENDOR */ # 235 "/usr/include/linux/hdreg.h" 3 4 /* SET_FEATURES 0x22 or 0xDD */ # 252 "/usr/include/linux/hdreg.h" 3 4 /* WIN_SMART sub-commands */ # 267 "/usr/include/linux/hdreg.h" 3 4 /* Password used in TF4 & TF5 executing SMART commands */ /* WIN_SETFEATURES sub-commands */ # 305 "/usr/include/linux/hdreg.h" 3 4 /* WIN_SECURITY sub-commands */ # 314 "/usr/include/linux/hdreg.h" 3 4 struct hd_geometry { unsigned char heads; unsigned char sectors; unsigned short cylinders; unsigned long start; }; /* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */ # 348 "/usr/include/linux/hdreg.h" 3 4 /* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */ # 365 "/usr/include/linux/hdreg.h" 3 4 /* bus states */ enum { BUSSTATE_OFF = 0, BUSSTATE_ON, BUSSTATE_TRISTATE }; /* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x033n/0x033n */ /* 0x330 is reserved - used to be HDIO_GETGEO_BIG */ /* 0x331 is reserved - used to be HDIO_GETGEO_BIG_RAW */ /* 0x338 is reserved - used to be HDIO_SET_IDE_SCSI */ /* 0x339 is reserved - used to be HDIO_SET_SCSI_IDE */ /* * Structure returned by HDIO_GET_IDENTITY, as per ANSI NCITS ATA6 rev.1b spec. * * If you change something here, please remember to update fix_driveid() in * ide/probe.c. */ struct hd_driveid { unsigned short config; /* lots of obsolete bit flags */ unsigned short cyls; /* Obsolete, "physical" cyls */ unsigned short reserved2; /* reserved (word 2) */ unsigned short heads; /* Obsolete, "physical" heads */ unsigned short track_bytes; /* unformatted bytes per track */ unsigned short sector_bytes; /* unformatted bytes per sector */ unsigned short sectors; /* Obsolete, "physical" sectors per track */ unsigned short vendor0; /* vendor unique */ unsigned short vendor1; /* vendor unique */ unsigned short vendor2; /* Retired vendor unique */ unsigned char serial_no[20]; /* 0 = not_specified */ unsigned short buf_type; /* Retired */ unsigned short buf_size; /* Retired, 512 byte increments * 0 = not_specified */ unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */ unsigned char fw_rev[8]; /* 0 = not_specified */ unsigned char model[40]; /* 0 = not_specified */ unsigned char max_multsect; /* 0=not_implemented */ unsigned char vendor3; /* vendor unique */ unsigned short dword_io; /* 0=not_implemented; 1=implemented */ unsigned char vendor4; /* vendor unique */ unsigned char capability; /* (upper byte of word 49) * 3: IORDYsup * 2: IORDYsw * 1: LBA * 0: DMA */ unsigned short reserved50; /* reserved (word 50) */ unsigned char vendor5; /* Obsolete, vendor unique */ unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */ unsigned char vendor6; /* Obsolete, vendor unique */ unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */ unsigned short field_valid; /* (word 53) * 2: ultra_ok word 88 * 1: eide_ok words 64-70 * 0: cur_ok words 54-58 */ unsigned short cur_cyls; /* Obsolete, logical cylinders */ unsigned short cur_heads; /* Obsolete, l heads */ unsigned short cur_sectors; /* Obsolete, l sectors per track */ unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */ unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */ unsigned char multsect; /* current multiple sector count */ unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ unsigned int lba_capacity; /* Obsolete, total number of sectors */ unsigned short dma_1word; /* Obsolete, single-word dma info */ unsigned short dma_mword; /* multiple-word dma info */ unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ unsigned short eide_dma_min; /* min mword dma cycle time (ns) */ unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */ unsigned short eide_pio; /* min cycle time (ns), no IORDY */ unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */ unsigned short words69_70[2]; /* reserved words 69-70 * future command overlap and queuing */ unsigned short words71_74[4]; /* reserved words 71-74 * for IDENTIFY PACKET DEVICE command */ unsigned short queue_depth; /* (word 75) * 15:5 reserved * 4:0 Maximum queue depth -1 */ unsigned short words76_79[4]; /* reserved words 76-79 */ unsigned short major_rev_num; /* (word 80) */ unsigned short minor_rev_num; /* (word 81) */ unsigned short command_set_1; /* (word 82) supported * 15: Obsolete * 14: NOP command * 13: READ_BUFFER * 12: WRITE_BUFFER * 11: Obsolete * 10: Host Protected Area * 9: DEVICE Reset * 8: SERVICE Interrupt * 7: Release Interrupt * 6: look-ahead * 5: write cache * 4: PACKET Command * 3: Power Management Feature Set * 2: Removable Feature Set * 1: Security Feature Set * 0: SMART Feature Set */ unsigned short command_set_2; /* (word 83) * 15: Shall be ZERO * 14: Shall be ONE * 13: FLUSH CACHE EXT * 12: FLUSH CACHE * 11: Device Configuration Overlay * 10: 48-bit Address Feature Set * 9: Automatic Acoustic Management * 8: SET MAX security * 7: reserved 1407DT PARTIES * 6: SetF sub-command Power-Up * 5: Power-Up in Standby Feature Set * 4: Removable Media Notification * 3: APM Feature Set * 2: CFA Feature Set * 1: READ/WRITE DMA QUEUED * 0: Download MicroCode */ unsigned short cfsse; /* (word 84) * cmd set-feature supported extensions * 15: Shall be ZERO * 14: Shall be ONE * 13:6 reserved * 5: General Purpose Logging * 4: Streaming Feature Set * 3: Media Card Pass Through * 2: Media Serial Number Valid * 1: SMART selt-test supported * 0: SMART error logging */ unsigned short cfs_enable_1; /* (word 85) * command set-feature enabled * 15: Obsolete * 14: NOP command * 13: READ_BUFFER * 12: WRITE_BUFFER * 11: Obsolete * 10: Host Protected Area * 9: DEVICE Reset * 8: SERVICE Interrupt * 7: Release Interrupt * 6: look-ahead * 5: write cache * 4: PACKET Command * 3: Power Management Feature Set * 2: Removable Feature Set * 1: Security Feature Set * 0: SMART Feature Set */ unsigned short cfs_enable_2; /* (word 86) * command set-feature enabled * 15: Shall be ZERO * 14: Shall be ONE * 13: FLUSH CACHE EXT * 12: FLUSH CACHE * 11: Device Configuration Overlay * 10: 48-bit Address Feature Set * 9: Automatic Acoustic Management * 8: SET MAX security * 7: reserved 1407DT PARTIES * 6: SetF sub-command Power-Up * 5: Power-Up in Standby Feature Set * 4: Removable Media Notification * 3: APM Feature Set * 2: CFA Feature Set * 1: READ/WRITE DMA QUEUED * 0: Download MicroCode */ unsigned short csf_default; /* (word 87) * command set-feature default * 15: Shall be ZERO * 14: Shall be ONE * 13:6 reserved * 5: General Purpose Logging enabled * 4: Valid CONFIGURE STREAM executed * 3: Media Card Pass Through enabled * 2: Media Serial Number Valid * 1: SMART selt-test supported * 0: SMART error logging */ unsigned short dma_ultra; /* (word 88) */ unsigned short trseuc; /* time required for security erase */ unsigned short trsEuc; /* time required for enhanced erase */ unsigned short CurAPMvalues; /* current APM values */ unsigned short mprc; /* master password revision code */ unsigned short hw_config; /* hardware config (word 93) * 15: Shall be ZERO * 14: Shall be ONE * 13: * 12: * 11: * 10: * 9: * 8: * 7: * 6: * 5: * 4: * 3: * 2: * 1: * 0: Shall be ONE */ unsigned short acoustic; /* (word 94) * 15:8 Vendor's recommended value * 7:0 current value */ unsigned short msrqs; /* min stream request size */ unsigned short sxfert; /* stream transfer time */ unsigned short sal; /* stream access latency */ unsigned int spg; /* stream performance granularity */ unsigned long long lba_capacity_2;/* 48-bit total number of sectors */ unsigned short words104_125[22];/* reserved words 104-125 */ unsigned short last_lun; /* (word 126) */ unsigned short word127; /* (word 127) Feature Set * Removable Media Notification * 15:2 reserved * 1:0 00 = not supported * 01 = supported * 10 = reserved * 11 = reserved */ unsigned short dlf; /* (word 128) * device lock function * 15:9 reserved * 8 security level 1:max 0:high * 7:6 reserved * 5 enhanced erase * 4 expire * 3 frozen * 2 locked * 1 en/disabled * 0 capability */ unsigned short csfo; /* (word 129) * current set features options * 15:4 reserved * 3: auto reassign * 2: reverting * 1: read-look-ahead * 0: write cache */ unsigned short words130_155[26];/* reserved vendor words 130-155 */ unsigned short word156; /* reserved vendor word 156 */ unsigned short words157_159[3];/* reserved vendor words 157-159 */ unsigned short cfa_power; /* (word 160) CFA Power Mode * 15 word 160 supported * 14 reserved * 13 * 12 * 11:0 */ unsigned short words161_175[15];/* Reserved for CFA */ unsigned short words176_205[30];/* Current Media Serial Number */ unsigned short words206_254[49];/* reserved words 206-254 */ unsigned short integrity_word; /* (word 255) * 15:8 Checksum * 7:0 Signature */ }; /* * IDE "nice" flags. These are used on a per drive basis to determine * when to be nice and give more bandwidth to the other devices which * share the same IDE bus. */ # 63 "../block/file-posix.c" 2 # 1 "/usr/include/scsi/sg.h" 1 3 4 /* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* History: Started: Aug 9 by Lawrence Foard (entropy@world.std.com), to allow user process control of SCSI devices. Development Sponsored by Killy Corp. NY NY */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 29 "/usr/include/scsi/sg.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define the symbols that indicate this file's entire job has been done. */ # 46 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* This avoids lossage on SunOS but only if stdtypes.h comes first. There's no way to win with the other order! Sun lossage. */ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are defined if the corresponding type is *not* defined. FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_. NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */ # 92 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way. Just ignore it. */ /* On VxWorks, may have defined macros like _TYPE_size_t which will typedef size_t. fixincludes patched the vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is not defined, and so that defining this macro defines _GCC_SIZE_T. If we find that the macros are still defined at this point, we must invoke them so that the type is defined as expected. */ # 117 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In case nobody has defined these types, but we aren't running under GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and __WCHAR_TYPE__ have reasonable values. This can happen if the parts of GCC is compiled by an older compiler, that actually include gstddef.h, such as collect2. */ /* Signed type of difference of two pointers. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 160 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* If this symbol has done its job, get rid of it. */ /* Unsigned type of `sizeof' something. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 242 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Wide character type. Locale-writers should change this as necessary to be big enough to hold unique values not between 0 and 127, and not (wchar_t) -1, for each defined multibyte character. */ /* Define this type if we are doing the whole job, or if we want this type in particular. */ # 362 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. are already defined. */ /* BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. */ /* NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. */ # 398 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* A null pointer constant. */ # 416 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 /* Offset of member MEMBER in a struct of type TYPE. */ # 31 "/usr/include/scsi/sg.h" 2 3 4 /* New interface introduced in the 3.x SG drivers follows */ /* Same structure as used by readv() Linux system call. It defines one scatter-gather element. */ typedef struct sg_iovec { void * iov_base; /* Starting address */ size_t iov_len; /* Length in bytes */ } sg_iovec_t; typedef struct sg_io_hdr { int interface_id; /* [i] 'S' for SCSI generic (required) */ int dxfer_direction; /* [i] data transfer direction */ unsigned char cmd_len; /* [i] SCSI command length ( <= 16 bytes) */ unsigned char mx_sb_len; /* [i] max length to write to sbp */ unsigned short int iovec_count; /* [i] 0 implies no scatter gather */ unsigned int dxfer_len; /* [i] byte count of data transfer */ void * dxferp; /* [i], [*io] points to data transfer memory or scatter gather list */ unsigned char * cmdp; /* [i], [*i] points to command to perform */ unsigned char * sbp; /* [i], [*o] points to sense_buffer memory */ unsigned int timeout; /* [i] MAX_UINT->no timeout (unit: millisec) */ unsigned int flags; /* [i] 0 -> default, see SG_FLAG... */ int pack_id; /* [i->o] unused internally (normally) */ void * usr_ptr; /* [i->o] unused internally */ unsigned char status; /* [o] scsi status */ unsigned char masked_status;/* [o] shifted, masked scsi status */ unsigned char msg_status; /* [o] messaging level data (optional) */ unsigned char sb_len_wr; /* [o] byte count actually written to sbp */ unsigned short int host_status; /* [o] errors from host adapter */ unsigned short int driver_status;/* [o] errors from software driver */ int resid; /* [o] dxfer_len - actual_transferred */ unsigned int duration; /* [o] time taken by cmd (unit: millisec) */ unsigned int info; /* [o] auxiliary information */ } sg_io_hdr_t; /* Use negative values to flag difference from original sg_header structure. */ # 82 "/usr/include/scsi/sg.h" 3 4 /* following flag values can be "or"-ed together */ /* the 2nd byte of SCSI command */ /* user space (debug indirect IO) */ /* The following 'info' values are "or"-ed together. */ # 100 "/usr/include/scsi/sg.h" 3 4 /* Request information about a specific SG device, used by SG_GET_SCSI_ID ioctl (). */ struct sg_scsi_id { /* Host number as in "scsi" where 'n' is one of 0, 1, 2 etc. */ int host_no; int channel; /* SCSI id of target device. */ int scsi_id; int lun; /* TYPE_... defined in . */ int scsi_type; /* Host (adapter) maximum commands per lun. */ short int h_cmd_per_lun; /* Device (or adapter) maximum queue length. */ short int d_queue_depth; /* Unused, set to 0 for now. */ int unused[2]; }; /* Used by SG_GET_REQUEST_TABLE ioctl(). */ typedef struct sg_req_info { char req_state; /* 0 -> not used, 1 -> written, 2 -> ready to read */ char orphan; /* 0 -> normal request, 1 -> from interruped SG_IO */ char sg_io_owned; /* 0 -> complete with read(), 1 -> owned by SG_IO */ char problem; /* 0 -> no problem detected, 1 -> error to report */ int pack_id; /* pack_id associated with request */ void * usr_ptr; /* user provided pointer (in new interface) */ unsigned int duration; /* millisecs elapsed since written (req_state==1) or request duration (req_state==2) */ int unused; } sg_req_info_t; /* IOCTLs: Those ioctls that are relevant to the SG 3.x drivers follow. [Those that only apply to the SG 2.x drivers are at the end of the file.] (_GET_s yield result via 'int *' 3rd argument unless otherwise indicated) */ /* Used to configure SCSI command transformation layer for ATAPI devices */ /* Only supported by the ide-scsi driver */ /* 3rd arg = 0 to disable transform, 1 to enable it */ /* The following ioctl has a 'sg_scsi_id_t *' object as its 3rd argument. */ /* SCSI id information can also be obtained from SCSI_IOCTL_GET_IDLUN */ /* Override host setting and always DMA using low memory ( <16MB on i386) */ /* When SG_SET_FORCE_PACK_ID set to 1, pack_id is input to read() which tries to fetch a packet with a matching pack_id, waits, or returns EAGAIN. If pack_id is -1 then read oldest waiting. When ...FORCE_PACK_ID set to 0 then pack_id ignored by read() and oldest readable fetched. */ /* Yields max scatter gather tablesize allowed by current host adapter */ /* Returns -EBUSY if occupied. 3rd argument pointer to int (see next) */ /* Associated values that can be given to SG_SCSI_RESET follow */ /* synchronous SCSI command ioctl, (only in version 3 interface) */ /* How to treat EINTR during SG_IO ioctl(), only in SG 3.x series */ /* Largest size (in bytes) a single scatter-gather list element can have. The value must be a power of 2 and <= (PAGE_SIZE * 32) [131072 bytes on i386]. The minimum value is PAGE_SIZE. If scatter-gather not supported by adapter then this value is the largest data block that can be read/written by a single scsi command. The user can find the value of PAGE_SIZE by calling getpagesize() defined in unistd.h . */ /* Defaults, commented if they differ from original sg driver */ /* maximum outstanding requests, write() yields EDOM if exceeded */ /* Alternate style type names, "..._t" variants preferred */ typedef struct sg_io_hdr Sg_io_hdr; typedef struct sg_io_vec Sg_io_vec; typedef struct sg_scsi_id Sg_scsi_id; typedef struct sg_req_info Sg_req_info; /* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv */ /* The older SG interface based on the 'sg_header' structure follows. */ /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */ struct sg_header { /* Length of incoming packet (including header). */ int pack_len; /* Maximal length of expected reply. */ int reply_len; /* Id number of packet. */ int pack_id; /* 0==ok, otherwise error number. */ int result; /* Force 12 byte command length for group 6 & 7 commands. */ unsigned int twelve_byte:1; /* SCSI status from target. */ unsigned int target_status:5; /* Host status (see "DID" codes). */ unsigned int host_status:8; /* Driver status+suggestion. */ unsigned int driver_status:8; /* Unused. */ unsigned int other_flags:10; /* Output in 3 cases: when target_status is CHECK_CONDITION or when target_status is COMMAND_TERMINATED or when (driver_status & DRIVER_SENSE) is true. */ unsigned char sense_buffer[16 /* this only applies to the sg_header interface */]; }; /* IOCTLs: The following are not required (or ignored) when the sg_io_hdr_t interface is used. They are kept for backward compatibility with the original and version 2 drivers. */ /* Get/set command queuing state per fd (default is SG_DEF_COMMAND_Q). */ /* Turn on error sense trace (1..8), dump this device to log/console (9) or dump all sg device states ( >9 ) to log/console. */ /* Defaults, commented if they differ from original sg driver */ # 64 "../block/file-posix.c" 2 # 72 "../block/file-posix.c" # 1 "/usr/include/linux/falloc.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 73 "../block/file-posix.c" 2 # 98 "../block/file-posix.c" # 1 "/usr/include/xfs/xfs.h" 1 3 4 /* * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2.1 of the GNU Lesser General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * Further, this software is distributed without any warranty that it is * free of the rightful claim of any third person regarding infringement * or the like. Any license provided herein, whether implied or * otherwise, applies only to this software file. Patent licenses, if * any, provided herein do not apply to combinations of this program with * other software, or any other product whatsoever. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, * USA. * * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, * Mountain View, CA 94043, or: * * http://www.sgi.com * * For further information regarding this notice, see: * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ # 1 "/usr/include/xfs/linux.h" 1 3 4 /* * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. * * This program 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. * * This program is distributed in the hope that it would 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 License * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ # 1 "/usr/include/uuid/uuid.h" 1 3 4 /* * Public include file for the UUID library * * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ # 39 "/usr/include/uuid/uuid.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/time.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 41 "/usr/include/uuid/uuid.h" 2 3 4 # 1 "/usr/include/time.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ # 43 "/usr/include/uuid/uuid.h" 2 3 4 typedef unsigned char uuid_t[16]; /* UUID Variant definitions */ # 55 "/usr/include/uuid/uuid.h" 3 4 /* UUID Type definitions */ # 67 "/usr/include/uuid/uuid.h" 3 4 /* Allow UUID constants to be defined */ # 80 "/usr/include/uuid/uuid.h" 3 4 /* clear.c */ extern void uuid_clear(uuid_t uu); /* compare.c */ extern int uuid_compare(const uuid_t uu1, const uuid_t uu2); /* copy.c */ extern void uuid_copy(uuid_t dst, const uuid_t src); /* gen_uuid.c */ extern void uuid_generate(uuid_t out); extern void uuid_generate_random(uuid_t out); extern void uuid_generate_time(uuid_t out); extern int uuid_generate_time_safe(uuid_t out); extern void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len); extern void uuid_generate_sha1(uuid_t out, const uuid_t ns, const char *name, size_t len); /* isnull.c */ extern int uuid_is_null(const uuid_t uu); /* parse.c */ extern int uuid_parse(const char *in, uuid_t uu); /* unparse.c */ extern void uuid_unparse(const uuid_t uu, char *out); extern void uuid_unparse_lower(const uuid_t uu, char *out); extern void uuid_unparse_upper(const uuid_t uu, char *out); /* uuid_time.c */ extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); extern int uuid_type(const uuid_t uu); extern int uuid_variant(const uuid_t uu); /* predefined.c */ extern const uuid_t *uuid_get_template(const char *alias); # 21 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/vfs.h" 1 3 4 /* Other systems declare `struct statfs' et al in , so we have this file to be compatible with programs expecting it. */ # 1 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 1 3 4 /* Definitions for getting information about a filesystem. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 2 3 4 /* Get the system-specific definition of `struct statfs'. */ # 1 "/usr/include/x86_64-linux-gnu/bits/statfs.h" 1 3 4 /* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ # 23 "/usr/include/x86_64-linux-gnu/bits/statfs.h" 2 3 4 struct statfs { __fsword_t f_type; __fsword_t f_bsize; __fsblkcnt_t f_blocks; __fsblkcnt_t f_bfree; __fsblkcnt_t f_bavail; __fsfilcnt_t f_files; __fsfilcnt_t f_ffree; __fsid_t f_fsid; __fsword_t f_namelen; __fsword_t f_frsize; __fsword_t f_flags; __fsword_t f_spare[4]; }; struct statfs64 { __fsword_t f_type; __fsword_t f_bsize; __fsblkcnt64_t f_blocks; __fsblkcnt64_t f_bfree; __fsblkcnt64_t f_bavail; __fsfilcnt64_t f_files; __fsfilcnt64_t f_ffree; __fsid_t f_fsid; __fsword_t f_namelen; __fsword_t f_frsize; __fsword_t f_flags; __fsword_t f_spare[4]; }; /* Tell code we have these members. */ # 26 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 2 3 4 /* Return information about the filesystem on which FILE resides. */ extern int statfs (const char *__file, struct statfs *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); # 43 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 3 4 extern int statfs64 (const char *__file, struct statfs64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); /* Return information about the filesystem containing the file FILDES refers to. */ extern int fstatfs (int __fildes, struct statfs *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); # 61 "/usr/include/x86_64-linux-gnu/sys/statfs.h" 3 4 extern int fstatfs64 (int __fildes, struct statfs64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); # 4 "/usr/include/x86_64-linux-gnu/sys/vfs.h" 2 3 4 # 22 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/ioctl.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/param.h" 1 3 4 /* Compatibility header for old-style Unix parameters and limits. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 24 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4 /* Definitions of macros to access `dev_t' values. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 25 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/stat.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 5.6 File Characteristics */ # 26 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/inttypes.h" 1 3 4 /* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99: 7.8 Format conversion of integer types */ # 27 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/malloc.h" 1 3 4 /* Prototypes and definition for malloc implementation. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/malloc.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 /* Copyright (C) 1989-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.17 Common definitions */ # 24 "/usr/include/malloc.h" 2 3 4 # 1 "/usr/include/stdio.h" 1 3 4 /* Define ISO C stdio on top of C++ iostreams. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.19 Input/output */ # 25 "/usr/include/malloc.h" 2 3 4 # 35 "/usr/include/malloc.h" 3 4 /* Allocate SIZE bytes of memory. */ extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) /* Ignore */; /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) /* Ignore */; /* Re-allocate the previously allocated block in __ptr, making the new block SIZE bytes long. */ /* __attribute_malloc__ is not used, because if realloc returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); /* Re-allocate the previously allocated block in PTR, making the new block large enough for NMEMB elements of SIZE bytes each. */ /* __attribute_malloc__ is not used, because if reallocarray returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); /* Free a block allocated by `malloc', `realloc' or `calloc'. */ extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); /* Allocate SIZE bytes allocated to ALIGNMENT bytes. */ extern void *memalign (size_t __alignment, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) /* Ignore */; /* Allocate SIZE bytes on a page boundary. */ extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) /* Ignore */; /* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up __size to nearest pagesize. */ extern void *pvalloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) /* Ignore */; /* Underlying allocation function; successive calls should return contiguous pieces of memory. */ extern void *(*__morecore) (ptrdiff_t __size); /* Default value of `__morecore'. */ extern void *__default_morecore (ptrdiff_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)); /* SVID2/XPG mallinfo structure */ struct mallinfo { int arena; /* non-mmapped space allocated from system */ int ordblks; /* number of free chunks */ int smblks; /* number of fastbin blocks */ int hblks; /* number of mmapped regions */ int hblkhd; /* space in mmapped regions */ int usmblks; /* always 0, preserved for backwards compatibility */ int fsmblks; /* space available in freed fastbin blocks */ int uordblks; /* total allocated space */ int fordblks; /* total free space */ int keepcost; /* top-most, releasable (via malloc_trim) space */ }; /* Returns a copy of the updated current mallinfo. */ extern struct mallinfo mallinfo (void) __attribute__ ((__nothrow__ , __leaf__)); /* SVID2/XPG mallopt options */ # 115 "/usr/include/malloc.h" 3 4 /* mallopt options that actually do something */ # 125 "/usr/include/malloc.h" 3 4 /* General SVID/XPG interface to tunable parameters. */ extern int mallopt (int __param, int __val) __attribute__ ((__nothrow__ , __leaf__)); /* Release all but __pad bytes of freed top-most memory back to the system. Return 1 if successful, else 0. */ extern int malloc_trim (size_t __pad) __attribute__ ((__nothrow__ , __leaf__)); /* Report the number of usable allocated bytes associated with allocated chunk __ptr. */ extern size_t malloc_usable_size (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); /* Prints brief summary statistics on stderr. */ extern void malloc_stats (void) __attribute__ ((__nothrow__ , __leaf__)); /* Output information about state of allocator to stream FP. */ extern int malloc_info (int __options, FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); /* Hooks for debugging and user-defined versions. */ extern void (*volatile __free_hook) (void *__ptr, const void *) __attribute__ ((__deprecated__)); extern void *(*volatile __malloc_hook)(size_t __size, const void *) __attribute__ ((__deprecated__)); extern void *(*volatile __realloc_hook)(void *__ptr, size_t __size, const void *) __attribute__ ((__deprecated__)); extern void *(*volatile __memalign_hook)(size_t __alignment, size_t __size, const void *) __attribute__ ((__deprecated__)); extern void (*volatile __after_morecore_hook) (void); /* Activate a standard set of debugging hooks. */ extern void __malloc_check_init (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); # 28 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/getopt.h" 1 3 4 /* Declarations for getopt. Copyright (C) 1989-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Unlike the bulk of the getopt implementation, this file is NOT part of gnulib; gnulib also has a getopt.h but it is different. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 25 "/usr/include/getopt.h" 2 3 4 /* The type of the 'argv' argument to getopt_long and getopt_long_only is properly 'char **', since both functions may write to the array (in order to move all the options to the beginning). However, for compatibility with old versions of LSB, glibc has to use 'char *const *' instead. */ # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_core.h" 1 3 4 /* Declarations for getopt (basic, portable features only). Copyright (C) 1989-2018 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 36 "/usr/include/getopt.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/getopt_ext.h" 1 3 4 /* Declarations for getopt (GNU extensions). Copyright (C) 1989-2018 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* This header should not be used directly; include getopt.h instead. Unlike most bits headers, it does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed. */ /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of 'struct option' terminated by an element containing a name which is zero. The field 'has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field 'flag' is not NULL, it points to a variable that is set to the value given in the field 'val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an 'int' to a compiled-in constant, such as set a value from 'optarg', set the option's 'flag' field to zero and its 'val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero 'flag' field, 'getopt' returns the contents of the 'val' field. */ struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the 'has_arg' field of 'struct option'. */ extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); # 37 "/usr/include/getopt.h" 2 3 4 # 29 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/errno.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.5 Errors */ # 30 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/endian.h" 1 3 4 /* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 31 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdbool.h" 1 3 4 /* Copyright (C) 1998-2017 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC 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 General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ /* * ISO C Standard: 7.16 Boolean type and values */ # 32 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/stdio.h" 1 3 4 /* Define ISO C stdio on top of C++ iostreams. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.19 Input/output */ # 33 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/types.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 */ # 34 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/mntent.h" 1 3 4 /* Utilities for reading/writing fstab, mtab, etc. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 License along with the GNU C Library; if not, see . */ # 23 "/usr/include/mntent.h" 2 3 4 # 1 "/usr/include/paths.h" 1 3 4 /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)paths.h 8.1 (Berkeley) 6/2/93 */ /* Default search path. */ /* All standard utilities path. */ # 68 "/usr/include/paths.h" 3 4 /* Provide trailing slash, since mostly used for building pathnames. */ # 24 "/usr/include/mntent.h" 2 3 4 /* File listing canonical interesting mount points. */ /* File listing currently active mount points. */ /* General filesystem types. */ /* Generic mount options. */ # 48 "/usr/include/mntent.h" 3 4 /* Structure describing a mount table entry. */ struct mntent { char *mnt_fsname; /* Device or server for filesystem. */ char *mnt_dir; /* Directory mounted on. */ char *mnt_type; /* Type of filesystem: ufs, nfs, etc. */ char *mnt_opts; /* Comma-separated options for fs. */ int mnt_freq; /* Dump frequency (in days). */ int mnt_passno; /* Pass number for `fsck'. */ }; /* Prepare to begin reading and/or writing mount table entries from the beginning of FILE. MODE is as for `fopen'. */ extern FILE *setmntent (const char *__file, const char *__mode) __attribute__ ((__nothrow__ , __leaf__)); /* Read one mount table entry from STREAM. Returns a pointer to storage reused on the next call, or null for EOF or error (use feof/ferror to check). */ extern struct mntent *getmntent (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); /* Reentrant version of the above function. */ extern struct mntent *getmntent_r (FILE *__restrict __stream, struct mntent *__restrict __result, char *__restrict __buffer, int __bufsize) __attribute__ ((__nothrow__ , __leaf__)); /* Write the mount table entry described by MNT to STREAM. Return zero on success, nonzero on failure. */ extern int addmntent (FILE *__restrict __stream, const struct mntent *__restrict __mnt) __attribute__ ((__nothrow__ , __leaf__)); /* Close a stream opened with `setmntent'. */ extern int endmntent (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); /* Search MNT->mnt_opts for an option matching OPT. Returns the address of the substring, or null if none found. */ extern char *hasmntopt (const struct mntent *__mnt, const char *__opt) __attribute__ ((__nothrow__ , __leaf__)); # 35 "/usr/include/xfs/linux.h" 2 3 4 # 1 "/usr/include/linux/fs.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ # 39 "/usr/include/xfs/linux.h" 2 3 4 static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p) { return ioctl(fd, cmd, p); } /* * platform_test_xfs_*() implies that xfsctl will succeed on the file; * on Linux, at least, special files don't get xfs file ops, * so return 0 for those */ static __inline__ int platform_test_xfs_fd(int fd) { struct statfs statfsbuf; struct stat statbuf; if (fstatfs(fd, &statfsbuf) < 0) return 0; if (fstat(fd, &statbuf) < 0) return 0; if (!((((statbuf.st_mode)) & 0170000 /* These bits determine file type. */) == (0100000 /* Regular file. */)) && !((((statbuf.st_mode)) & 0170000 /* These bits determine file type. */) == (0040000 /* Directory. */))) return 0; return (statfsbuf.f_type == 0x58465342); /* XFSB */ } static __inline__ int platform_test_xfs_path(const char *path) { struct statfs statfsbuf; struct stat statbuf; if (statfs(path, &statfsbuf) < 0) return 0; if (stat(path, &statbuf) < 0) return 0; if (!((((statbuf.st_mode)) & 0170000 /* These bits determine file type. */) == (0100000 /* Regular file. */)) && !((((statbuf.st_mode)) & 0170000 /* These bits determine file type. */) == (0040000 /* Directory. */))) return 0; return (statfsbuf.f_type == 0x58465342); /* XFSB */ } static __inline__ int platform_fstatfs(int fd, struct statfs *buf) { return fstatfs(fd, buf); } static __inline__ void platform_getoptreset(void) { extern int optind; optind = 0; } static __inline__ int platform_uuid_compare(uuid_t *uu1, uuid_t *uu2) { return uuid_compare(*uu1, *uu2); } static __inline__ void platform_uuid_unparse(uuid_t *uu, char *buffer) { uuid_unparse(*uu, buffer); } static __inline__ int platform_uuid_parse(char *buffer, uuid_t *uu) { return uuid_parse(buffer, *uu); } static __inline__ int platform_uuid_is_null(uuid_t *uu) { return uuid_is_null(*uu); } static __inline__ void platform_uuid_generate(uuid_t *uu) { uuid_generate(*uu); } static __inline__ void platform_uuid_clear(uuid_t *uu) { uuid_clear(*uu); } static __inline__ void platform_uuid_copy(uuid_t *dst, uuid_t *src) { uuid_copy(*dst, *src); } static __inline__ int platform_discard_blocks(int fd, uint64_t start, uint64_t len) { __uint64_t range[2] = { start, len }; if (ioctl(fd, (((0U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((119)) << 0) | ((0) << ((0 +8)+8))), &range) < 0) return (*__errno_location ()); return 0; } typedef off_t xfs_off_t; typedef __uint64_t xfs_ino_t; typedef __uint32_t xfs_dev_t; typedef __int64_t xfs_daddr_t; typedef __u32 xfs_nlink_t; /** * Abstraction of mountpoints. */ struct mntent_cursor { FILE *mtabp; }; static inline int platform_mntent_open(struct mntent_cursor * cursor, char *mtab) { cursor->mtabp = setmntent(mtab, "r"); if (!cursor->mtabp) { fprintf(stderr, "Error: cannot read %s\n", mtab); return 1; } return 0; } static inline struct mntent * platform_mntent_next(struct mntent_cursor * cursor) { return getmntent(cursor->mtabp); } static inline void platform_mntent_close(struct mntent_cursor * cursor) { endmntent(cursor->mtabp); } /* * Check whether we have to define FS_IOC_FS[GS]ETXATTR ourselves. These * are a copy of the definitions moved to linux/uapi/fs.h in the 4.5 kernel, * so this is purely for supporting builds against old kernel headers. */ # 38 "/usr/include/xfs/xfs.h" 2 3 4 # 50 "/usr/include/xfs/xfs.h" 3 4 /* * make sure that any user of the xfs headers has a 64bit off_t type */ extern int xfs_assert_largefile[sizeof(off_t)-8]; /* * sparse kernel source annotations */ /* * kernel struct packing shortcut */ # 1 "/usr/include/xfs/xfs_types.h" 1 3 4 /* * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ typedef __uint32_t prid_t; /* project ID */ typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */ typedef __uint32_t xfs_agino_t; /* inode # within allocation grp */ typedef __uint32_t xfs_extlen_t; /* extent length in blocks */ typedef __uint32_t xfs_agnumber_t; /* allocation group number */ typedef __int32_t xfs_extnum_t; /* # of extents in a file */ typedef __int16_t xfs_aextnum_t; /* # extents in an attribute fork */ typedef __int64_t xfs_fsize_t; /* bytes in a file */ typedef __uint64_t xfs_ufsize_t; /* unsigned bytes in a file */ typedef __int32_t xfs_suminfo_t; /* type of bitmap summary info */ typedef __int32_t xfs_rtword_t; /* word type for bitmap manipulations */ typedef __int64_t xfs_lsn_t; /* log sequence number */ typedef __int32_t xfs_tid_t; /* transaction identifier */ typedef __uint32_t xfs_dablk_t; /* dir/attr block number (in file) */ typedef __uint32_t xfs_dahash_t; /* dir/attr hash value */ typedef __uint64_t xfs_fsblock_t; /* blockno in filesystem (agno|agbno) */ typedef __uint64_t xfs_rfsblock_t; /* blockno in filesystem (raw) */ typedef __uint64_t xfs_rtblock_t; /* extent (block) in realtime area */ typedef __uint64_t xfs_fileoff_t; /* block number in a file */ typedef __uint64_t xfs_filblks_t; /* number of blocks in a file */ typedef __int64_t xfs_srtblock_t; /* signed version of xfs_rtblock_t */ typedef __int64_t xfs_sfiloff_t; /* signed block number in a file */ /* * Null values for the types. */ # 67 "/usr/include/xfs/xfs_types.h" 3 4 /* * Max values for extlen, extnum, aextnum. */ /* * Minimum and maximum blocksize and sectorsize. * The blocksize upper limit is pretty much arbitrary. * The sectorsize upper limit is due to sizeof(sb_sectsize). * CRC enable filesystems use 512 byte inodes, meaning 512 byte block sizes * cannot be used. */ # 91 "/usr/include/xfs/xfs_types.h" 3 4 /* * Inode fork identifiers. */ /* * Min numbers of data/attr fork btree root pointers. */ /* * MAXNAMELEN is the length (including the terminating null) of * the longest permissible file (component) name. */ typedef enum { XFS_LOOKUP_EQi, XFS_LOOKUP_LEi, XFS_LOOKUP_GEi } xfs_lookup_t; typedef enum { XFS_BTNUM_BNOi, XFS_BTNUM_CNTi, XFS_BTNUM_RMAPi, XFS_BTNUM_BMAPi, XFS_BTNUM_INOi, XFS_BTNUM_FINOi, XFS_BTNUM_REFCi, XFS_BTNUM_MAX } xfs_btnum_t; struct xfs_name { const unsigned char *name; int len; int type; }; /* * uid_t and gid_t are hard-coded to 32 bits in the inode. * Hence, an 'id' in a dquot is 32 bits.. */ typedef __uint32_t xfs_dqid_t; /* * Constants for bit manipulations. */ # 70 "/usr/include/xfs/xfs.h" 2 3 4 # 1 "/usr/include/xfs/xfs_fs.h" 1 3 4 /* * Copyright (c) 1995-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program 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. * * This program is distributed in the hope that it would 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 License * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * SGI's XFS filesystem's major stuff (constants, structures) */ /* * Direct I/O attribute record used with XFS_IOC_DIOINFO * d_miniosz is the min xfer size, xfer size multiple and file seek offset * alignment. */ struct dioattr { __u32 d_mem; /* data buffer memory alignment */ __u32 d_miniosz; /* min xfer size */ __u32 d_maxiosz; /* max xfer size */ }; /* * Flags for the bs_xflags/fsx_xflags field in XFS_IOC_FS[GS]ETXATTR[A] * These are for backwards compatibility only. New code should * use the kernel [4.5 onwards] defined FS_XFLAG_* definitions directly. */ # 62 "/usr/include/xfs/xfs_fs.h" 3 4 /* * Structure for XFS_IOC_GETBMAP. * On input, fill in bmv_offset and bmv_length of the first structure * to indicate the area of interest in the file, and bmv_entries with * the number of array elements given back. The first structure is * updated on return to give the offset and length for the next call. */ struct getbmap { __s64 bmv_offset; /* file offset of segment in blocks */ __s64 bmv_block; /* starting block (64-bit daddr_t) */ __s64 bmv_length; /* length of segment, blocks */ __s32 bmv_count; /* # of entries in array incl. 1st */ __s32 bmv_entries; /* # of entries filled in (output) */ }; /* * Structure for XFS_IOC_GETBMAPX. Fields bmv_offset through bmv_entries * are used exactly as in the getbmap structure. The getbmapx structure * has additional bmv_iflags and bmv_oflags fields. The bmv_iflags field * is only used for the first structure. It contains input flags * specifying XFS_IOC_GETBMAPX actions. The bmv_oflags field is filled * in by the XFS_IOC_GETBMAPX command for each returned structure after * the first. */ struct getbmapx { __s64 bmv_offset; /* file offset of segment in blocks */ __s64 bmv_block; /* starting block (64-bit daddr_t) */ __s64 bmv_length; /* length of segment, blocks */ __s32 bmv_count; /* # of entries in array incl. 1st */ __s32 bmv_entries; /* # of entries filled in (output). */ __s32 bmv_iflags; /* input flags (1st structure) */ __s32 bmv_oflags; /* output flags (after 1st structure)*/ __s32 bmv_unused1; /* future use */ __s32 bmv_unused2; /* future use */ }; /* bmv_iflags values - set by XFS_IOC_GETBMAPX caller. */ # 113 "/usr/include/xfs/xfs_fs.h" 3 4 /* bmv_oflags values - returned for each non-header segment */ /* * Structure for XFS_IOC_FSSETDM. * For use by backup and restore programs to set the XFS on-disk inode * fields di_dmevmask and di_dmstate. These must be set to exactly and * only values previously obtained via xfs_bulkstat! (Specifically the * xfs_bstat_t fields bs_dmevmask and bs_dmstate.) */ struct fsdmidata { __u32 fsd_dmevmask; /* corresponds to di_dmevmask */ __u16 fsd_padding; __u16 fsd_dmstate; /* corresponds to di_dmstate */ }; /* * File segment locking set data type for 64 bit access. * Also used for all the RESV/FREE interfaces. */ typedef struct xfs_flock64 { __s16 l_type; __s16 l_whence; __s64 l_start; __s64 l_len; /* len == 0 means until end of file */ __s32 l_sysid; __u32 l_pid; __s32 l_pad[4]; /* reserve area */ } xfs_flock64_t; /* * Output for XFS_IOC_FSGEOMETRY_V1 */ typedef struct xfs_fsop_geom_v1 { __u32 blocksize; /* filesystem (data) block size */ __u32 rtextsize; /* realtime extent size */ __u32 agblocks; /* fsblocks in an AG */ __u32 agcount; /* number of allocation groups */ __u32 logblocks; /* fsblocks in the log */ __u32 sectsize; /* (data) sector size, bytes */ __u32 inodesize; /* inode size in bytes */ __u32 imaxpct; /* max allowed inode space(%) */ __u64 datablocks; /* fsblocks in data subvolume */ __u64 rtblocks; /* fsblocks in realtime subvol */ __u64 rtextents; /* rt extents in realtime subvol*/ __u64 logstart; /* starting fsblock of the log */ unsigned char uuid[16]; /* unique id of the filesystem */ __u32 sunit; /* stripe unit, fsblocks */ __u32 swidth; /* stripe width, fsblocks */ __s32 version; /* structure version */ __u32 flags; /* superblock version flags */ __u32 logsectsize; /* log sector size, bytes */ __u32 rtsectsize; /* realtime sector size, bytes */ __u32 dirblocksize; /* directory block size, bytes */ } xfs_fsop_geom_v1_t; /* * Output for XFS_IOC_FSGEOMETRY */ typedef struct xfs_fsop_geom { __u32 blocksize; /* filesystem (data) block size */ __u32 rtextsize; /* realtime extent size */ __u32 agblocks; /* fsblocks in an AG */ __u32 agcount; /* number of allocation groups */ __u32 logblocks; /* fsblocks in the log */ __u32 sectsize; /* (data) sector size, bytes */ __u32 inodesize; /* inode size in bytes */ __u32 imaxpct; /* max allowed inode space(%) */ __u64 datablocks; /* fsblocks in data subvolume */ __u64 rtblocks; /* fsblocks in realtime subvol */ __u64 rtextents; /* rt extents in realtime subvol*/ __u64 logstart; /* starting fsblock of the log */ unsigned char uuid[16]; /* unique id of the filesystem */ __u32 sunit; /* stripe unit, fsblocks */ __u32 swidth; /* stripe width, fsblocks */ __s32 version; /* structure version */ __u32 flags; /* superblock version flags */ __u32 logsectsize; /* log sector size, bytes */ __u32 rtsectsize; /* realtime sector size, bytes */ __u32 dirblocksize; /* directory block size, bytes */ __u32 logsunit; /* log stripe unit, bytes */ } xfs_fsop_geom_t; /* Output for XFS_FS_COUNTS */ typedef struct xfs_fsop_counts { __u64 freedata; /* free data section blocks */ __u64 freertx; /* free rt extents */ __u64 freeino; /* free inodes */ __u64 allocino; /* total allocated inodes */ } xfs_fsop_counts_t; /* Input/Output for XFS_GET_RESBLKS and XFS_SET_RESBLKS */ typedef struct xfs_fsop_resblks { __u64 resblks; __u64 resblks_avail; } xfs_fsop_resblks_t; # 238 "/usr/include/xfs/xfs_fs.h" 3 4 /* * Minimum and maximum sizes need for growth checks. * * Block counts are in units of filesystem blocks, not basic blocks. */ /* keep the maximum size under 2^31 by a small amount */ /* Used for sanity checks on superblock */ /* * Structures for XFS_IOC_FSGROWFSDATA, XFS_IOC_FSGROWFSLOG & XFS_IOC_FSGROWFSRT */ typedef struct xfs_growfs_data { __u64 newblocks; /* new data subvol size, fsblocks */ __u32 imaxpct; /* new inode space percentage limit */ } xfs_growfs_data_t; typedef struct xfs_growfs_log { __u32 newblocks; /* new log size, fsblocks */ __u32 isint; /* 1 if new log is internal */ } xfs_growfs_log_t; typedef struct xfs_growfs_rt { __u64 newblocks; /* new realtime size, fsblocks */ __u32 extsize; /* new realtime extent size, fsblocks */ } xfs_growfs_rt_t; /* * Structures returned from ioctl XFS_IOC_FSBULKSTAT & XFS_IOC_FSBULKSTAT_SINGLE */ typedef struct xfs_bstime { time_t tv_sec; /* seconds */ __s32 tv_nsec; /* and nanoseconds */ } xfs_bstime_t; typedef struct xfs_bstat { __u64 bs_ino; /* inode number */ __u16 bs_mode; /* type and mode */ __u16 bs_nlink; /* number of links */ __u32 bs_uid; /* user id */ __u32 bs_gid; /* group id */ __u32 bs_rdev; /* device value */ __s32 bs_blksize; /* block size */ __s64 bs_size; /* file size */ xfs_bstime_t bs_atime; /* access time */ xfs_bstime_t bs_mtime; /* modify time */ xfs_bstime_t bs_ctime; /* inode change time */ int64_t bs_blocks; /* number of blocks */ __u32 bs_xflags; /* extended flags */ __s32 bs_extsize; /* extent size */ __s32 bs_extents; /* number of extents */ __u32 bs_gen; /* generation count */ __u16 bs_projid_lo; /* lower part of project id */ __u16 bs_forkoff; /* inode fork offset in bytes */ __u16 bs_projid_hi; /* higher part of project id */ unsigned char bs_pad[6]; /* pad space, unused */ __u32 bs_cowextsize; /* cow extent size */ __u32 bs_dmevmask; /* DMIG event mask */ __u16 bs_dmstate; /* DMIG state info */ __u16 bs_aextents; /* attribute number of extents */ } xfs_bstat_t; /* * Project quota id helpers (previously projid was 16bit only * and using two 16bit values to hold new 32bit projid was choosen * to retain compatibility with "old" filesystems). */ static inline __uint32_t bstat_get_projid(struct xfs_bstat *bs) { return (__uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo; } /* * The user-level BulkStat Request interface structure. */ typedef struct xfs_fsop_bulkreq { __u64 *lastip; /* last inode # pointer */ __s32 icount; /* count of entries in buffer */ void *ubuffer;/* user buffer for inode desc. */ __s32 *ocount; /* output count pointer */ } xfs_fsop_bulkreq_t; /* * Structures returned from xfs_inumbers routine (XFS_IOC_FSINUMBERS). */ typedef struct xfs_inogrp { __u64 xi_startino; /* starting inode number */ __s32 xi_alloccount; /* # bits set in allocmask */ __u64 xi_allocmask; /* mask of allocated inodes */ } xfs_inogrp_t; /* * Error injection. */ typedef struct xfs_error_injection { __s32 fd; __s32 errtag; } xfs_error_injection_t; /* * Speculative preallocation trimming. */ struct xfs_fs_eofblocks { __u32 eof_version; __u32 eof_flags; uid_t eof_uid; gid_t eof_gid; prid_t eof_prid; __u32 pad32; __u64 eof_min_file_size; __u64 pad64[12]; }; /* eof_flags values */ # 385 "/usr/include/xfs/xfs_fs.h" 3 4 /* * The user-level Handle Request interface structure. */ typedef struct xfs_fsop_handlereq { __u32 fd; /* fd for FD_TO_HANDLE */ void *path; /* user pathname */ __u32 oflags; /* open flags */ void *ihandle;/* user supplied handle */ __u32 ihandlen; /* user supplied length */ void *ohandle;/* user buffer for handle */ __u32 *ohandlen;/* user buffer length */ } xfs_fsop_handlereq_t; /* * Compound structures for passing args through Handle Request interfaces * xfs_fssetdm_by_handle, xfs_attrlist_by_handle, xfs_attrmulti_by_handle * - ioctls: XFS_IOC_FSSETDM_BY_HANDLE, XFS_IOC_ATTRLIST_BY_HANDLE, and * XFS_IOC_ATTRMULTI_BY_HANDLE */ typedef struct xfs_fsop_setdm_handlereq { struct xfs_fsop_handlereq hreq; /* handle information */ struct fsdmidata *data; /* DMAPI data */ } xfs_fsop_setdm_handlereq_t; typedef struct xfs_attrlist_cursor { __u32 opaque[4]; } xfs_attrlist_cursor_t; typedef struct xfs_fsop_attrlist_handlereq { struct xfs_fsop_handlereq hreq; /* handle interface structure */ struct xfs_attrlist_cursor pos; /* opaque cookie, list offset */ __u32 flags; /* which namespace to use */ __u32 buflen; /* length of buffer supplied */ void *buffer; /* returned names */ } xfs_fsop_attrlist_handlereq_t; typedef struct xfs_attr_multiop { __u32 am_opcode; __s32 am_error; void *am_attrname; void *am_attrvalue; __u32 am_length; __u32 am_flags; } xfs_attr_multiop_t; typedef struct xfs_fsop_attrmulti_handlereq { struct xfs_fsop_handlereq hreq; /* handle interface structure */ __u32 opcount;/* count of following multiop */ struct xfs_attr_multiop *ops; /* attr_multi data */ } xfs_fsop_attrmulti_handlereq_t; /* * per machine unique filesystem identifier types. */ typedef struct { __u32 val[2]; } xfs_fsid_t; /* file system id type */ typedef struct xfs_fid { __u16 fid_len; /* length of remainder */ __u16 fid_pad; __u32 fid_gen; /* generation number */ __u64 fid_ino; /* 64 bits inode number */ } xfs_fid_t; typedef struct xfs_handle { union { __s64 align; /* force alignment of ha_fid */ xfs_fsid_t _ha_fsid; /* unique file system identifier */ } ha_u; xfs_fid_t ha_fid; /* file system specific file ID */ } xfs_handle_t; /* * Structure passed to XFS_IOC_SWAPEXT */ typedef struct xfs_swapext { __int64_t sx_version; /* version */ __int64_t sx_fdtarget; /* fd of target file */ __int64_t sx_fdtmp; /* fd of tmp file */ xfs_off_t sx_offset; /* offset into file */ xfs_off_t sx_length; /* leng from offset */ char sx_pad[16]; /* pad space, unused */ xfs_bstat_t sx_stat; /* stat of target b4 copy */ } xfs_swapext_t; /* * Flags for going down operation */ /* * ioctl limits */ /* * ioctl commands that are used by Linux filesystems */ /* * ioctl commands that replace IRIX fcntl()'s * For 'documentation' purposed more than anything else, * the "cmd #" field reflects the IRIX fcntl number. */ # 521 "/usr/include/xfs/xfs_fs.h" 3 4 /* XFS_IOC_SETBIOSIZE ---- deprecated 46 */ /* XFS_IOC_GETBIOSIZE ---- deprecated 47 */ /* * ioctl commands that replace IRIX syssgi()'s */ # 548 "/usr/include/xfs/xfs_fs.h" 3 4 /* XFS_IOC_ATTRCTL_BY_HANDLE -- deprecated 118 */ # 558 "/usr/include/xfs/xfs_fs.h" 3 4 /* XFS_IOC_GETFSUUID ---------- deprecated 140 */ /* reflink ioctls; these MUST match the btrfs ioctl definitions */ /* from struct btrfs_ioctl_clone_range_args */ struct xfs_clone_args { __s64 src_fd; __u64 src_offset; __u64 src_length; __u64 dest_offset; }; /* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */ /* from struct btrfs_ioctl_file_extent_same_info */ struct xfs_extent_data_info { __s64 fd; /* in - destination file */ __u64 logical_offset; /* in - start of extent in destination */ __u64 bytes_deduped; /* out - total # of bytes we were able * to dedupe from this file */ /* status of this dedupe operation: * < 0 for error * == XFS_EXTENT_DATA_SAME if dedupe succeeds * == XFS_EXTENT_DATA_DIFFERS if data differs */ __s32 status; /* out - see above description */ __u32 reserved; }; /* from struct btrfs_ioctl_file_extent_same_args */ struct xfs_extent_data { __u64 logical_offset; /* in - start of extent in source */ __u64 length; /* in - length of extent */ __u16 dest_count; /* in - total elements in info array */ __u16 reserved1; __u32 reserved2; struct xfs_extent_data_info info[0]; }; /* * Block I/O parameterization. A basic block (BB) is the lowest size of * filesystem allocation, and must equal 512. Length units given to bio * routines are in BB's. */ # 71 "/usr/include/xfs/xfs.h" 2 3 4 # 99 "../block/file-posix.c" 2 # 101 "../block/file-posix.c" //#define DEBUG_BLOCK # 115 "../block/file-posix.c" /* OS X does not have O_DSYNC */ # 124 "../block/file-posix.c" /* Approximate O_DIRECT with O_DSYNC if O_DIRECT isn't available */ # 134 "../block/file-posix.c" /* Posix file locking bytes. Libvirt takes byte 0, we start from higher bytes, * leaving a few more bytes for its future use. */ typedef struct BDRVRawState { int fd; int lock_fd; # 142 "../block/file-posix.c" 3 4 _Bool # 142 "../block/file-posix.c" use_lock; int type; int open_flags; size_t buf_align; /* The current permissions. */ uint64_t perm; uint64_t shared_perm; # 152 "../block/file-posix.c" 3 4 _Bool # 152 "../block/file-posix.c" is_xfs:1; # 154 "../block/file-posix.c" 3 4 _Bool # 154 "../block/file-posix.c" has_discard:1; # 155 "../block/file-posix.c" 3 4 _Bool # 155 "../block/file-posix.c" has_write_zeroes:1; # 156 "../block/file-posix.c" 3 4 _Bool # 156 "../block/file-posix.c" discard_zeroes:1; # 157 "../block/file-posix.c" 3 4 _Bool # 157 "../block/file-posix.c" use_linux_aio:1; # 158 "../block/file-posix.c" 3 4 _Bool # 158 "../block/file-posix.c" page_cache_inconsistent:1; # 159 "../block/file-posix.c" 3 4 _Bool # 159 "../block/file-posix.c" has_fallocate; # 160 "../block/file-posix.c" 3 4 _Bool # 160 "../block/file-posix.c" needs_alignment; PRManager *pr_mgr; } BDRVRawState; typedef struct BDRVRawReopenState { int fd; int open_flags; } BDRVRawReopenState; static int fd_open(BlockDriverState *bs); static int64_t raw_getlength(BlockDriverState *bs); typedef struct RawPosixAIOData { BlockDriverState *bs; int aio_fildes; union { struct iovec *aio_iov; void *aio_ioctl_buf; }; int aio_niov; uint64_t aio_nbytes; off_t aio_offset; int aio_type; } RawPosixAIOData; # 223 "../block/file-posix.c" static int raw_normalize_devicepath(const char **filename) { return 0; } /* * Get logical block size via ioctl. On success store it in @sector_size_p. */ static int probe_logical_blocksize(int fd, unsigned int *sector_size_p) { unsigned int sector_size; # 235 "../block/file-posix.c" 3 4 _Bool # 235 "../block/file-posix.c" success = # 235 "../block/file-posix.c" 3 4 0 # 235 "../block/file-posix.c" ; int i; # 238 "../block/file-posix.c" 3 4 (*__errno_location ()) # 238 "../block/file-posix.c" = # 238 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 238 "../block/file-posix.c" ; static const unsigned long ioctl_list[] = { # 241 "../block/file-posix.c" 3 4 (((0U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((104)) << 0) | ((0) << ((0 +8)+8)))/* get block device sector size */ # 241 "../block/file-posix.c" , }; /* Try a few ioctls to get the right size */ for (i = 0; i < (int)((sizeof(ioctl_list) / sizeof((ioctl_list)[0])) + (sizeof(struct { int:(!(!__builtin_types_compatible_p(typeof(ioctl_list), typeof(&(ioctl_list)[0])))) ? -1 : 1; }) - sizeof(struct { int:(!(!__builtin_types_compatible_p(typeof(ioctl_list), typeof(&(ioctl_list)[0])))) ? -1 : 1; }))); i++) { if (ioctl(fd, ioctl_list[i], §or_size) >= 0) { *sector_size_p = sector_size; success = # 255 "../block/file-posix.c" 3 4 1 # 255 "../block/file-posix.c" ; } } return success ? 0 : - # 259 "../block/file-posix.c" 3 4 (*__errno_location ()) # 259 "../block/file-posix.c" ; } /** * Get physical block size of @fd. * On success, store it in @blk_size and return 0. * On failure, return -errno. */ static int probe_physical_blocksize(int fd, unsigned int *blk_size) { if (ioctl(fd, # 270 "../block/file-posix.c" 3 4 (((0U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((123)) << 0) | ((0) << ((0 +8)+8))) # 270 "../block/file-posix.c" , blk_size) < 0) { return - # 271 "../block/file-posix.c" 3 4 (*__errno_location ()) # 271 "../block/file-posix.c" ; } return 0; } /* Check if read is allowed with given memory buffer and length. * * This function is used to check O_DIRECT memory buffer and request alignment. */ static # 283 "../block/file-posix.c" 3 4 _Bool # 283 "../block/file-posix.c" raw_is_io_aligned(int fd, void *buf, size_t len) { ssize_t ret = pread(fd, buf, len, 0); if (ret >= 0) { return # 288 "../block/file-posix.c" 3 4 1 # 288 "../block/file-posix.c" ; } /* The Linux kernel returns EINVAL for misaligned O_DIRECT reads. Ignore * other errors (e.g. real I/O error), which could happen on a failed * drive, since we only care about probing alignment. */ if ( # 296 "../block/file-posix.c" 3 4 (*__errno_location ()) # 296 "../block/file-posix.c" != # 296 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 296 "../block/file-posix.c" ) { return # 297 "../block/file-posix.c" 3 4 1 # 297 "../block/file-posix.c" ; } return # 301 "../block/file-posix.c" 3 4 0 # 301 "../block/file-posix.c" ; } static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp) { BDRVRawState *s = bs->opaque; char *buf; size_t max_align = # 308 "../block/file-posix.c" 3 4 ((( # 308 "../block/file-posix.c" 4096 # 308 "../block/file-posix.c" 3 4 )>( # 308 "../block/file-posix.c" getpagesize() # 308 "../block/file-posix.c" 3 4 ))?( # 308 "../block/file-posix.c" 4096 # 308 "../block/file-posix.c" 3 4 ):( # 308 "../block/file-posix.c" getpagesize() # 308 "../block/file-posix.c" 3 4 )) # 308 "../block/file-posix.c" ; /* For SCSI generic devices the alignment is not really used. With buffered I/O, we don't have any restrictions. */ if (bdrv_is_sg(bs) || !s->needs_alignment) { bs->bl.request_alignment = 1; s->buf_align = 1; return; } bs->bl.request_alignment = 0; s->buf_align = 0; /* Let's try to use the logical blocksize for the alignment. */ if (probe_logical_blocksize(fd, &bs->bl.request_alignment) < 0) { bs->bl.request_alignment = 0; } if (s->is_xfs) { struct dioattr da; if (xfsctl( # 327 "../block/file-posix.c" 3 4 ((void *)0) # 327 "../block/file-posix.c" , fd, # 327 "../block/file-posix.c" 3 4 (((2U) << (((0 +8)+8)+14)) | ((('X')) << (0 +8)) | (((30)) << 0) | ((((sizeof(struct dioattr)))) << ((0 +8)+8))) # 327 "../block/file-posix.c" , &da) >= 0) { bs->bl.request_alignment = da.d_miniosz; /* The kernel returns wrong information for d_mem */ /* s->buf_align = da.d_mem; */ } } /* If we could not get the sizes so far, we can only guess them */ if (!s->buf_align) { size_t align; buf = qemu_memalign(max_align, 2 * max_align); for (align = 512; align <= max_align; align <<= 1) { if (raw_is_io_aligned(fd, buf + align, max_align)) { s->buf_align = align; break; } } qemu_vfree(buf); } if (!bs->bl.request_alignment) { size_t align; buf = qemu_memalign(s->buf_align, max_align); for (align = 512; align <= max_align; align <<= 1) { if (raw_is_io_aligned(fd, buf, align)) { bs->bl.request_alignment = align; break; } } qemu_vfree(buf); } if (!s->buf_align || !bs->bl.request_alignment) { error_setg_internal((errp), "../block/file-posix.c", 361, __func__, ("Could not find working O_DIRECT alignment")); error_append_hint(errp, "Try cache.direct=off\n"); } } static void raw_parse_flags(int bdrv_flags, int *open_flags) { # 368 "../block/file-posix.c" 3 4 ((void) sizeof (( # 368 "../block/file-posix.c" open_flags != # 368 "../block/file-posix.c" 3 4 ((void *)0)) ? 1 : 0), __extension__ ({ if ( # 368 "../block/file-posix.c" open_flags != # 368 "../block/file-posix.c" 3 4 ((void *)0)) ; /* empty */ else __assert_fail ( # 368 "../block/file-posix.c" "open_flags != NULL" # 368 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 368, __extension__ __PRETTY_FUNCTION__); })) # 368 "../block/file-posix.c" ; *open_flags |= 0; *open_flags &= ~ # 371 "../block/file-posix.c" 3 4 0003 # 371 "../block/file-posix.c" ; if (bdrv_flags & 0x0002) { *open_flags |= # 373 "../block/file-posix.c" 3 4 02 # 373 "../block/file-posix.c" ; } else { *open_flags |= # 375 "../block/file-posix.c" 3 4 00 # 375 "../block/file-posix.c" ; } /* Use O_DSYNC for write-through caching, no flags for write-back caching, * and O_DIRECT for no caching. */ if ((bdrv_flags & 0x0020 /* do not use the host page cache */)) { *open_flags |= # 381 "../block/file-posix.c" 3 4 040000 /* Direct disk access. */ # 381 "../block/file-posix.c" ; } } static void raw_parse_filename(const char *filename, QDict *options, Error **errp) { bdrv_parse_filename_strip_prefix(filename, "file:", options); } static QemuOptsList raw_runtime_opts = { .name = "raw", .head = { # 393 "../block/file-posix.c" 3 4 ((void *)0) # 393 "../block/file-posix.c" , &(raw_runtime_opts.head).tqh_first }, .desc = { { .name = "filename", .type = QEMU_OPT_STRING, .help = "File name of the image", }, { .name = "aio", .type = QEMU_OPT_STRING, .help = "host AIO implementation (threads, native)", }, { .name = "locking", .type = QEMU_OPT_STRING, .help = "file locking mode (on/off/auto, default: auto)", }, { .name = "pr-manager", .type = QEMU_OPT_STRING, .help = "id of persistent reservation manager object (default: none)", }, { /* end of list */ } }, }; static int raw_open_common(BlockDriverState *bs, QDict *options, int bdrv_flags, int open_flags, Error **errp) { BDRVRawState *s = bs->opaque; QemuOpts *opts; Error *local_err = # 424 "../block/file-posix.c" 3 4 ((void *)0) # 424 "../block/file-posix.c" ; const char *filename = # 425 "../block/file-posix.c" 3 4 ((void *)0) # 425 "../block/file-posix.c" ; const char *str; BlockdevAioOptions aio, aio_default; int fd, ret; struct stat st; OnOffAuto locking; opts = qemu_opts_create(&raw_runtime_opts, # 432 "../block/file-posix.c" 3 4 ((void *)0) # 432 "../block/file-posix.c" , 0, &error_abort); qemu_opts_absorb_qdict(opts, options, &local_err); if (local_err) { error_propagate(errp, local_err); ret = - # 436 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 436 "../block/file-posix.c" ; goto fail; } filename = qemu_opt_get(opts, "filename"); ret = raw_normalize_devicepath(&filename); if (ret != 0) { error_setg_errno_internal((errp), "../block/file-posix.c", 444, __func__, (-ret), ("Could not normalize device path")); goto fail; } aio_default = (bdrv_flags & 0x0080 /* use native AIO instead of the thread pool */) ? BLOCKDEV_AIO_OPTIONS_NATIVE : BLOCKDEV_AIO_OPTIONS_THREADS; aio = qapi_enum_parse(&BlockdevAioOptions_lookup, qemu_opt_get(opts, "aio"), aio_default, &local_err); if (local_err) { error_propagate(errp, local_err); ret = - # 456 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 456 "../block/file-posix.c" ; goto fail; } s->use_linux_aio = (aio == BLOCKDEV_AIO_OPTIONS_NATIVE); locking = qapi_enum_parse(&OnOffAuto_lookup, qemu_opt_get(opts, "locking"), ON_OFF_AUTO_AUTO, &local_err); if (local_err) { error_propagate(errp, local_err); ret = - # 466 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 466 "../block/file-posix.c" ; goto fail; } switch (locking) { case ON_OFF_AUTO_ON: s->use_lock = # 471 "../block/file-posix.c" 3 4 1 # 471 "../block/file-posix.c" ; if (!qemu_has_ofd_lock()) { fprintf( # 473 "../block/file-posix.c" 3 4 stderr # 473 "../block/file-posix.c" , "File lock requested but OFD locking syscall is " "unavailable, falling back to POSIX file locks.\n" "Due to the implementation, locks can be lost " "unexpectedly.\n"); } break; case ON_OFF_AUTO_OFF: s->use_lock = # 481 "../block/file-posix.c" 3 4 0 # 481 "../block/file-posix.c" ; break; case ON_OFF_AUTO_AUTO: s->use_lock = qemu_has_ofd_lock(); break; default: abort(); } str = qemu_opt_get(opts, "pr-manager"); if (str) { s->pr_mgr = pr_manager_lookup(str, &local_err); if (local_err) { error_propagate(errp, local_err); ret = - # 495 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 495 "../block/file-posix.c" ; goto fail; } } s->open_flags = open_flags; raw_parse_flags(bdrv_flags, &s->open_flags); s->fd = -1; fd = qemu_open(filename, s->open_flags, 0644); if (fd < 0) { ret = - # 506 "../block/file-posix.c" 3 4 (*__errno_location ()) # 506 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 507, __func__, ( # 507 "../block/file-posix.c" 3 4 (*__errno_location ()) # 507 "../block/file-posix.c" ), ("Could not open '%s'"), filename); if (ret == - # 508 "../block/file-posix.c" 3 4 30 /* Read-only file system */ # 508 "../block/file-posix.c" ) { ret = - # 509 "../block/file-posix.c" 3 4 13 /* Permission denied */ # 509 "../block/file-posix.c" ; } goto fail; } s->fd = fd; s->lock_fd = -1; if (s->use_lock) { fd = qemu_open(filename, s->open_flags); if (fd < 0) { ret = - # 519 "../block/file-posix.c" 3 4 (*__errno_location ()) # 519 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c" # 520 "../block/file-posix.c" , 521 # 520 "../block/file-posix.c" , __func__, ( # 520 "../block/file-posix.c" 3 4 (*__errno_location ()) # 520 "../block/file-posix.c" ), ("Could not open '%s' for locking"), filename) ; qemu_close(s->fd); goto fail; } s->lock_fd = fd; } s->perm = 0; s->shared_perm = BLK_PERM_ALL; /* Currently Linux does AIO only for files opened with O_DIRECT */ if (s->use_linux_aio && !(s->open_flags & # 532 "../block/file-posix.c" 3 4 040000 /* Direct disk access. */ # 532 "../block/file-posix.c" )) { error_setg_internal((errp), "../block/file-posix.c" # 533 "../block/file-posix.c" , 534 # 533 "../block/file-posix.c" , __func__, ("aio=native was specified, but it requires " "cache.direct=on, which was not specified.")) ; ret = - # 535 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 535 "../block/file-posix.c" ; goto fail; } # 547 "../block/file-posix.c" s->has_discard = # 547 "../block/file-posix.c" 3 4 1 # 547 "../block/file-posix.c" ; s->has_write_zeroes = # 548 "../block/file-posix.c" 3 4 1 # 548 "../block/file-posix.c" ; bs->supported_zero_flags = BDRV_REQ_MAY_UNMAP; if ((bs->open_flags & 0x0020 /* do not use the host page cache */) != 0) { s->needs_alignment = # 551 "../block/file-posix.c" 3 4 1 # 551 "../block/file-posix.c" ; } if (fstat(s->fd, &st) < 0) { ret = - # 555 "../block/file-posix.c" 3 4 (*__errno_location ()) # 555 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 556, __func__, ( # 556 "../block/file-posix.c" 3 4 (*__errno_location ()) # 556 "../block/file-posix.c" ), ("Could not stat file")); goto fail; } if ( # 559 "../block/file-posix.c" 3 4 (((( # 559 "../block/file-posix.c" st.st_mode # 559 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0100000 /* Regular file. */)) # 559 "../block/file-posix.c" ) { s->discard_zeroes = # 560 "../block/file-posix.c" 3 4 1 # 560 "../block/file-posix.c" ; s->has_fallocate = # 561 "../block/file-posix.c" 3 4 1 # 561 "../block/file-posix.c" ; } if ( # 563 "../block/file-posix.c" 3 4 (((( # 563 "../block/file-posix.c" st.st_mode # 563 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0060000 /* Block device. */)) # 563 "../block/file-posix.c" ) { unsigned int arg; if (ioctl(s->fd, # 566 "../block/file-posix.c" 3 4 (((0U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((124)) << 0) | ((0) << ((0 +8)+8))) # 566 "../block/file-posix.c" , &arg) == 0 && arg) { s->discard_zeroes = # 567 "../block/file-posix.c" 3 4 1 # 567 "../block/file-posix.c" ; } /* On Linux 3.10, BLKDISCARD leaves stale data in the page cache. Do * not rely on the contents of discarded blocks unless using O_DIRECT. * Same for BLKZEROOUT. */ if (!(bs->open_flags & 0x0020 /* do not use the host page cache */)) { s->discard_zeroes = # 576 "../block/file-posix.c" 3 4 0 # 576 "../block/file-posix.c" ; s->has_write_zeroes = # 577 "../block/file-posix.c" 3 4 0 # 577 "../block/file-posix.c" ; } } # 594 "../block/file-posix.c" if (platform_test_xfs_fd(s->fd)) { s->is_xfs = # 595 "../block/file-posix.c" 3 4 1 # 595 "../block/file-posix.c" ; } ret = 0; fail: if (filename && (bdrv_flags & 0x0010 /* delete the file after use */)) { unlink(filename); } qemu_opts_del(opts); return ret; } static int raw_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVRawState *s = bs->opaque; s->type = 0; return raw_open_common(bs, options, flags, 0, errp); } typedef enum { RAW_PL_PREPARE, RAW_PL_COMMIT, RAW_PL_ABORT, } RawPermLockOp; /* Lock bytes indicated by @perm_lock_bits and @shared_perm_lock_bits in the * file; if @unlock == true, also unlock the unneeded bytes. * @shared_perm_lock_bits is the mask of all permissions that are NOT shared. */ static int raw_apply_lock_bytes(BDRVRawState *s, uint64_t perm_lock_bits, uint64_t shared_perm_lock_bits, # 633 "../block/file-posix.c" 3 4 _Bool # 633 "../block/file-posix.c" unlock, Error **errp) { int ret; int i; for ((i) = 0; (1ULL << (i)) <= BLK_PERM_ALL; i++) { int off = 100 + i; if (perm_lock_bits & (1ULL << i)) { ret = qemu_lock_fd(s->lock_fd, off, 1, # 641 "../block/file-posix.c" 3 4 0 # 641 "../block/file-posix.c" ); if (ret) { error_setg_internal((errp), "../block/file-posix.c", 643, __func__, ("Failed to lock byte %d"), off); return ret; } } else if (unlock) { ret = qemu_unlock_fd(s->lock_fd, off, 1); if (ret) { error_setg_internal((errp), "../block/file-posix.c", 649, __func__, ("Failed to unlock byte %d"), off); return ret; } } } for ((i) = 0; (1ULL << (i)) <= BLK_PERM_ALL; i++) { int off = 200 + i; if (shared_perm_lock_bits & (1ULL << i)) { ret = qemu_lock_fd(s->lock_fd, off, 1, # 657 "../block/file-posix.c" 3 4 0 # 657 "../block/file-posix.c" ); if (ret) { error_setg_internal((errp), "../block/file-posix.c", 659, __func__, ("Failed to lock byte %d"), off); return ret; } } else if (unlock) { ret = qemu_unlock_fd(s->lock_fd, off, 1); if (ret) { error_setg_internal((errp), "../block/file-posix.c", 665, __func__, ("Failed to unlock byte %d"), off); return ret; } } } return 0; } /* Check "unshared" bytes implied by @perm and ~@shared_perm in the file. */ static int raw_check_lock_bytes(BDRVRawState *s, uint64_t perm, uint64_t shared_perm, Error **errp) { int ret; int i; for ((i) = 0; (1ULL << (i)) <= BLK_PERM_ALL; i++) { int off = 200 + i; uint64_t p = 1ULL << i; if (perm & p) { ret = qemu_lock_fd_test(s->lock_fd, off, 1, # 685 "../block/file-posix.c" 3 4 1 # 685 "../block/file-posix.c" ); if (ret) { char *perm_name = bdrv_perm_names(p); error_setg_internal((errp), "../block/file-posix.c" # 688 "../block/file-posix.c" , 690 # 688 "../block/file-posix.c" , __func__, ("Failed to get \"%s\" lock"), perm_name) ; g_free(perm_name); error_append_hint(errp, "Is another process using the image?\n"); return ret; } } } for ((i) = 0; (1ULL << (i)) <= BLK_PERM_ALL; i++) { int off = 100 + i; uint64_t p = 1ULL << i; if (!(shared_perm & p)) { ret = qemu_lock_fd_test(s->lock_fd, off, 1, # 702 "../block/file-posix.c" 3 4 1 # 702 "../block/file-posix.c" ); if (ret) { char *perm_name = bdrv_perm_names(p); error_setg_internal((errp), "../block/file-posix.c" # 705 "../block/file-posix.c" , 707 # 705 "../block/file-posix.c" , __func__, ("Failed to get shared \"%s\" lock"), perm_name) ; g_free(perm_name); error_append_hint(errp, "Is another process using the image?\n"); return ret; } } } return 0; } static int raw_handle_perm_lock(BlockDriverState *bs, RawPermLockOp op, uint64_t new_perm, uint64_t new_shared, Error **errp) { BDRVRawState *s = bs->opaque; int ret = 0; Error *local_err = # 725 "../block/file-posix.c" 3 4 ((void *)0) # 725 "../block/file-posix.c" ; if (!s->use_lock) { return 0; } if (bdrv_get_flags(bs) & 0x0800 /* consistency hint for migration handoff */) { return 0; } # 735 "../block/file-posix.c" 3 4 ((void) sizeof (( # 735 "../block/file-posix.c" s->lock_fd > 0 # 735 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 735 "../block/file-posix.c" s->lock_fd > 0 # 735 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 735 "../block/file-posix.c" "s->lock_fd > 0" # 735 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 735, __extension__ __PRETTY_FUNCTION__); })) # 735 "../block/file-posix.c" ; switch (op) { case RAW_PL_PREPARE: ret = raw_apply_lock_bytes(s, s->perm | new_perm, ~s->shared_perm | ~new_shared, # 741 "../block/file-posix.c" 3 4 0 # 741 "../block/file-posix.c" , errp); if (!ret) { ret = raw_check_lock_bytes(s, new_perm, new_shared, errp); if (!ret) { return 0; } } op = RAW_PL_ABORT; /* fall through to unlock bytes. */ case RAW_PL_ABORT: raw_apply_lock_bytes(s, s->perm, ~s->shared_perm, # 751 "../block/file-posix.c" 3 4 1 # 751 "../block/file-posix.c" , &local_err); if (local_err) { /* Theoretically the above call only unlocks bytes and it cannot * fail. Something weird happened, report it. */ error_report_err(local_err); } break; case RAW_PL_COMMIT: raw_apply_lock_bytes(s, new_perm, ~new_shared, # 760 "../block/file-posix.c" 3 4 1 # 760 "../block/file-posix.c" , &local_err); if (local_err) { /* Theoretically the above call only unlocks bytes and it cannot * fail. Something weird happened, report it. */ error_report_err(local_err); } break; } return ret; } static int raw_reopen_prepare(BDRVReopenState *state, BlockReopenQueue *queue, Error **errp) { BDRVRawState *s; BDRVRawReopenState *rs; int ret = 0; Error *local_err = # 778 "../block/file-posix.c" 3 4 ((void *)0) # 778 "../block/file-posix.c" ; # 780 "../block/file-posix.c" 3 4 ((void) sizeof (( # 780 "../block/file-posix.c" state != # 780 "../block/file-posix.c" 3 4 ((void *)0)) ? 1 : 0), __extension__ ({ if ( # 780 "../block/file-posix.c" state != # 780 "../block/file-posix.c" 3 4 ((void *)0)) ; /* empty */ else __assert_fail ( # 780 "../block/file-posix.c" "state != NULL" # 780 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 780, __extension__ __PRETTY_FUNCTION__); })) # 780 "../block/file-posix.c" ; # 781 "../block/file-posix.c" 3 4 ((void) sizeof (( # 781 "../block/file-posix.c" state->bs != # 781 "../block/file-posix.c" 3 4 ((void *)0)) ? 1 : 0), __extension__ ({ if ( # 781 "../block/file-posix.c" state->bs != # 781 "../block/file-posix.c" 3 4 ((void *)0)) ; /* empty */ else __assert_fail ( # 781 "../block/file-posix.c" "state->bs != NULL" # 781 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 781, __extension__ __PRETTY_FUNCTION__); })) # 781 "../block/file-posix.c" ; s = state->bs->opaque; state->opaque = ((BDRVRawReopenState *) g_malloc0_n ((1), sizeof (BDRVRawReopenState))); rs = state->opaque; if (s->type == 1) { rs->open_flags |= # 789 "../block/file-posix.c" 3 4 04000 # 789 "../block/file-posix.c" ; } raw_parse_flags(state->flags, &rs->open_flags); rs->fd = -1; int fcntl_flags = # 796 "../block/file-posix.c" 3 4 02000 # 796 "../block/file-posix.c" | # 796 "../block/file-posix.c" 3 4 04000 # 796 "../block/file-posix.c" ; fcntl_flags |= # 798 "../block/file-posix.c" 3 4 01000000 /* Do not set atime. */ # 798 "../block/file-posix.c" ; /* Not all operating systems have O_ASYNC, and those that don't * will not let us track the state into rs->open_flags (typically * you achieve the same effect with an ioctl, for example I_SETSIG * on Solaris). But we do not use O_ASYNC, so that's fine. */ # 807 "../block/file-posix.c" 3 4 ((void) sizeof (( # 807 "../block/file-posix.c" (s->open_flags & # 807 "../block/file-posix.c" 3 4 020000 # 807 "../block/file-posix.c" ) == 0 # 807 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 807 "../block/file-posix.c" (s->open_flags & # 807 "../block/file-posix.c" 3 4 020000 # 807 "../block/file-posix.c" ) == 0 # 807 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 807 "../block/file-posix.c" "(s->open_flags & O_ASYNC) == 0" # 807 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 807, __extension__ __PRETTY_FUNCTION__); })) # 807 "../block/file-posix.c" ; if ((rs->open_flags & ~fcntl_flags) == (s->open_flags & ~fcntl_flags)) { /* dup the original fd */ rs->fd = qemu_dup(s->fd); if (rs->fd >= 0) { ret = fcntl_setfl(rs->fd, rs->open_flags); if (ret) { qemu_close(rs->fd); rs->fd = -1; } } } /* If we cannot use fcntl, or fcntl failed, fall back to qemu_open() */ if (rs->fd == -1) { const char *normalized_filename = state->bs->filename; ret = raw_normalize_devicepath(&normalized_filename); if (ret < 0) { error_setg_errno_internal((errp), "../block/file-posix.c", 827, __func__, (-ret), ("Could not normalize device path")); } else { # 829 "../block/file-posix.c" 3 4 ((void) sizeof (( # 829 "../block/file-posix.c" !(rs->open_flags & # 829 "../block/file-posix.c" 3 4 0100 /* Not fcntl. */ # 829 "../block/file-posix.c" ) # 829 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 829 "../block/file-posix.c" !(rs->open_flags & # 829 "../block/file-posix.c" 3 4 0100 /* Not fcntl. */ # 829 "../block/file-posix.c" ) # 829 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 829 "../block/file-posix.c" "!(rs->open_flags & O_CREAT)" # 829 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 829, __extension__ __PRETTY_FUNCTION__); })) # 829 "../block/file-posix.c" ; rs->fd = qemu_open(normalized_filename, rs->open_flags); if (rs->fd == -1) { error_setg_errno_internal((errp), "../block/file-posix.c", 832, __func__, ( # 832 "../block/file-posix.c" 3 4 (*__errno_location ()) # 832 "../block/file-posix.c" ), ("Could not reopen file")); ret = -1; } } } /* Fail already reopen_prepare() if we can't get a working O_DIRECT * alignment with the new fd. */ if (rs->fd != -1) { raw_probe_alignment(state->bs, rs->fd, &local_err); if (local_err) { qemu_close(rs->fd); rs->fd = -1; error_propagate(errp, local_err); ret = - # 846 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 846 "../block/file-posix.c" ; } } return ret; } static void raw_reopen_commit(BDRVReopenState *state) { BDRVRawReopenState *rs = state->opaque; BDRVRawState *s = state->bs->opaque; s->open_flags = rs->open_flags; qemu_close(s->fd); s->fd = rs->fd; g_free(state->opaque); state->opaque = # 864 "../block/file-posix.c" 3 4 ((void *)0) # 864 "../block/file-posix.c" ; } static void raw_reopen_abort(BDRVReopenState *state) { BDRVRawReopenState *rs = state->opaque; /* nothing to do if NULL, we didn't get far enough */ if (rs == # 873 "../block/file-posix.c" 3 4 ((void *)0) # 873 "../block/file-posix.c" ) { return; } if (rs->fd >= 0) { qemu_close(rs->fd); rs->fd = -1; } g_free(state->opaque); state->opaque = # 882 "../block/file-posix.c" 3 4 ((void *)0) # 882 "../block/file-posix.c" ; } static int hdev_get_max_transfer_length(BlockDriverState *bs, int fd) { int max_bytes = 0; short max_sectors = 0; if (bs->sg && ioctl(fd, # 890 "../block/file-posix.c" 3 4 (((0U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((103)) << 0) | ((0) << ((0 +8)+8)))/* get max sectors per request (ll_rw_blk.c) */ # 890 "../block/file-posix.c" , &max_bytes) == 0) { return max_bytes; } else if (!bs->sg && ioctl(fd, # 892 "../block/file-posix.c" 3 4 (((0U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((103)) << 0) | ((0) << ((0 +8)+8)))/* get max sectors per request (ll_rw_blk.c) */ # 892 "../block/file-posix.c" , &max_sectors) == 0) { return max_sectors << 9; } else { return - # 895 "../block/file-posix.c" 3 4 (*__errno_location ()) # 895 "../block/file-posix.c" ; } } static int hdev_get_max_segments(const struct stat *st) { char buf[32]; const char *end; char *sysfspath; int ret; int fd = -1; long max_segments; sysfspath = g_strdup_printf("/sys/dev/block/%u:%u/queue/max_segments", # 913 "../block/file-posix.c" 3 4 gnu_dev_major ( # 913 "../block/file-posix.c" st->st_rdev # 913 "../block/file-posix.c" 3 4 ) # 913 "../block/file-posix.c" , # 913 "../block/file-posix.c" 3 4 gnu_dev_minor ( # 913 "../block/file-posix.c" st->st_rdev # 913 "../block/file-posix.c" 3 4 ) # 913 "../block/file-posix.c" ); fd = open(sysfspath, # 914 "../block/file-posix.c" 3 4 00 # 914 "../block/file-posix.c" ); if (fd == -1) { ret = - # 916 "../block/file-posix.c" 3 4 (*__errno_location ()) # 916 "../block/file-posix.c" ; goto out; } do { ret = read(fd, buf, sizeof(buf) - 1); } while (ret == -1 && # 921 "../block/file-posix.c" 3 4 (*__errno_location ()) # 921 "../block/file-posix.c" == # 921 "../block/file-posix.c" 3 4 4 /* Interrupted system call */ # 921 "../block/file-posix.c" ); if (ret < 0) { ret = - # 923 "../block/file-posix.c" 3 4 (*__errno_location ()) # 923 "../block/file-posix.c" ; goto out; } else if (ret == 0) { ret = - # 926 "../block/file-posix.c" 3 4 5 /* I/O error */ # 926 "../block/file-posix.c" ; goto out; } buf[ret] = 0; /* The file is ended with '\n', pass 'end' to accept that. */ ret = qemu_strtol(buf, &end, 10, &max_segments); if (ret == 0 && end && *end == '\n') { ret = max_segments; } out: if (fd != -1) { close(fd); } g_free(sysfspath); return ret; } static void raw_refresh_limits(BlockDriverState *bs, Error **errp) { BDRVRawState *s = bs->opaque; struct stat st; if (!fstat(s->fd, &st)) { if ( # 953 "../block/file-posix.c" 3 4 (((( # 953 "../block/file-posix.c" st.st_mode # 953 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0060000 /* Block device. */)) # 953 "../block/file-posix.c" || # 953 "../block/file-posix.c" 3 4 (((( # 953 "../block/file-posix.c" st.st_mode # 953 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0020000 /* Character device. */)) # 953 "../block/file-posix.c" ) { int ret = hdev_get_max_transfer_length(bs, s->fd); if (ret > 0 && ret <= ( # 955 "../block/file-posix.c" 3 4 ((((18446744073709551615UL) # 955 "../block/file-posix.c" >> 9 # 955 "../block/file-posix.c" 3 4 )<(0x7fffffff # 955 "../block/file-posix.c" >> 9 # 955 "../block/file-posix.c" 3 4 ))?((18446744073709551615UL) # 955 "../block/file-posix.c" >> 9 # 955 "../block/file-posix.c" 3 4 ):(0x7fffffff # 955 "../block/file-posix.c" >> 9 # 955 "../block/file-posix.c" 3 4 )) # 955 "../block/file-posix.c" << 9)) { bs->bl.max_transfer = pow2floor(ret); } ret = hdev_get_max_segments(&st); if (ret > 0) { bs->bl.max_transfer = # 960 "../block/file-posix.c" 3 4 ((( # 960 "../block/file-posix.c" bs->bl.max_transfer # 960 "../block/file-posix.c" 3 4 )<( # 960 "../block/file-posix.c" ret * getpagesize() # 960 "../block/file-posix.c" 3 4 ))?( # 960 "../block/file-posix.c" bs->bl.max_transfer # 960 "../block/file-posix.c" 3 4 ):( # 960 "../block/file-posix.c" ret * getpagesize() # 960 "../block/file-posix.c" 3 4 )) # 961 "../block/file-posix.c" ; } } } raw_probe_alignment(bs, s->fd, errp); bs->bl.min_mem_alignment = s->buf_align; bs->bl.opt_mem_alignment = # 968 "../block/file-posix.c" 3 4 ((( # 968 "../block/file-posix.c" s->buf_align # 968 "../block/file-posix.c" 3 4 )>( # 968 "../block/file-posix.c" getpagesize() # 968 "../block/file-posix.c" 3 4 ))?( # 968 "../block/file-posix.c" s->buf_align # 968 "../block/file-posix.c" 3 4 ):( # 968 "../block/file-posix.c" getpagesize() # 968 "../block/file-posix.c" 3 4 )) # 968 "../block/file-posix.c" ; } static int check_for_dasd(int fd) { return -1; } /** * Try to get @bs's logical and physical block size. * On success, store them in @bsz and return zero. * On failure, return negative errno. */ static int hdev_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz) { BDRVRawState *s = bs->opaque; int ret; /* If DASD, get blocksizes */ if (check_for_dasd(s->fd) < 0) { return - # 994 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 994 "../block/file-posix.c" ; } ret = probe_logical_blocksize(s->fd, &bsz->log); if (ret < 0) { return ret; } return probe_physical_blocksize(s->fd, &bsz->phys); } /** * Try to get @bs's geometry: cyls, heads, sectors. * On success, store them in @geo and return 0. * On failure return -errno. * (Allows block driver to assign default geometry values that guest sees) */ static int hdev_probe_geometry(BlockDriverState *bs, HDGeometry *geo) { BDRVRawState *s = bs->opaque; struct hd_geometry ioctl_geo = {0}; /* If DASD, get its geometry */ if (check_for_dasd(s->fd) < 0) { return - # 1017 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1017 "../block/file-posix.c" ; } if (ioctl(s->fd, # 1019 "../block/file-posix.c" 3 4 0x0301 /* get device geometry */ # 1019 "../block/file-posix.c" , &ioctl_geo) < 0) { return - # 1020 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1020 "../block/file-posix.c" ; } /* HDIO_GETGEO may return success even though geo contains zeros (e.g. certain multipath setups) */ if (!ioctl_geo.heads || !ioctl_geo.sectors || !ioctl_geo.cylinders) { return - # 1025 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1025 "../block/file-posix.c" ; } /* Do not return a geometry for partition */ if (ioctl_geo.start != 0) { return - # 1029 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1029 "../block/file-posix.c" ; } geo->heads = ioctl_geo.heads; geo->sectors = ioctl_geo.sectors; geo->cylinders = ioctl_geo.cylinders; return 0; } static ssize_t handle_aiocb_ioctl(RawPosixAIOData *aiocb) { int ret; ret = ioctl(aiocb->aio_fildes, aiocb->aio_nbytes /* for QEMU_AIO_IOCTL */, aiocb->aio_ioctl_buf); if (ret == -1) { return - # 1050 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1050 "../block/file-posix.c" ; } return 0; } static ssize_t handle_aiocb_flush(RawPosixAIOData *aiocb) { BDRVRawState *s = aiocb->bs->opaque; int ret; if (s->page_cache_inconsistent) { return - # 1062 "../block/file-posix.c" 3 4 5 /* I/O error */ # 1062 "../block/file-posix.c" ; } ret = qemu_fdatasync(aiocb->aio_fildes); if (ret == -1) { /* There is no clear definition of the semantics of a failing fsync(), * so we may have to assume the worst. The sad truth is that this * assumption is correct for Linux. Some pages are now probably marked * clean in the page cache even though they are inconsistent with the * on-disk contents. The next fdatasync() call would succeed, but no * further writeback attempt will be made. We can't get back to a state * in which we know what is on disk (we would have to rewrite * everything that was touched since the last fdatasync() at least), so * make bdrv_flush() fail permanently. Given that the behaviour isn't * really defined, I have little hope that other OSes are doing better. * * Obviously, this doesn't affect O_DIRECT, which bypasses the page * cache. */ if ((s->open_flags & # 1080 "../block/file-posix.c" 3 4 040000 /* Direct disk access. */ # 1080 "../block/file-posix.c" ) == 0) { s->page_cache_inconsistent = # 1081 "../block/file-posix.c" 3 4 1 # 1081 "../block/file-posix.c" ; } return - # 1083 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1083 "../block/file-posix.c" ; } return 0; } static # 1090 "../block/file-posix.c" 3 4 _Bool # 1090 "../block/file-posix.c" preadv_present = # 1090 "../block/file-posix.c" 3 4 1 # 1090 "../block/file-posix.c" ; static ssize_t qemu_preadv(int fd, const struct iovec *iov, int nr_iov, off_t offset) { return preadv(fd, iov, nr_iov, offset); } static ssize_t qemu_pwritev(int fd, const struct iovec *iov, int nr_iov, off_t offset) { return pwritev(fd, iov, nr_iov, offset); } # 1122 "../block/file-posix.c" static ssize_t handle_aiocb_rw_vector(RawPosixAIOData *aiocb) { ssize_t len; do { if (aiocb->aio_type & 0x0002) len = qemu_pwritev(aiocb->aio_fildes, aiocb->aio_iov, aiocb->aio_niov, aiocb->aio_offset); else len = qemu_preadv(aiocb->aio_fildes, aiocb->aio_iov, aiocb->aio_niov, aiocb->aio_offset); } while (len == -1 && # 1137 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1137 "../block/file-posix.c" == # 1137 "../block/file-posix.c" 3 4 4 /* Interrupted system call */ # 1137 "../block/file-posix.c" ); if (len == -1) { return - # 1140 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1140 "../block/file-posix.c" ; } return len; } /* * Read/writes the data to/from a given linear buffer. * * Returns the number of bytes handles or -errno in case of an error. Short * reads are only returned if the end of the file is reached. */ static ssize_t handle_aiocb_rw_linear(RawPosixAIOData *aiocb, char *buf) { ssize_t offset = 0; ssize_t len; while (offset < aiocb->aio_nbytes) { if (aiocb->aio_type & 0x0002) { len = pwrite(aiocb->aio_fildes, (const char *)buf + offset, aiocb->aio_nbytes - offset, aiocb->aio_offset + offset); } else { len = pread(aiocb->aio_fildes, buf + offset, aiocb->aio_nbytes - offset, aiocb->aio_offset + offset); } if (len == -1 && # 1168 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1168 "../block/file-posix.c" == # 1168 "../block/file-posix.c" 3 4 4 /* Interrupted system call */ # 1168 "../block/file-posix.c" ) { continue; } else if (len == -1 && # 1170 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1170 "../block/file-posix.c" == # 1170 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 1170 "../block/file-posix.c" && (aiocb->bs->open_flags & 0x0020 /* do not use the host page cache */) && !(aiocb->aio_type & 0x0002) && offset > 0) { /* O_DIRECT pread() may fail with EINVAL when offset is unaligned * after a short read. Assume that O_DIRECT short reads only occur * at EOF. Therefore this is a short read, not an I/O error. */ break; } else if (len == -1) { offset = - # 1180 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1180 "../block/file-posix.c" ; break; } else if (len == 0) { break; } offset += len; } return offset; } static ssize_t handle_aiocb_rw(RawPosixAIOData *aiocb) { ssize_t nbytes; char *buf; if (!(aiocb->aio_type & 0x1000)) { /* * If there is just a single buffer, and it is properly aligned * we can just use plain pread/pwrite without any problems. */ if (aiocb->aio_niov == 1) { return handle_aiocb_rw_linear(aiocb, aiocb->aio_iov->iov_base); } /* * We have more than one iovec, and all are properly aligned. * * Try preadv/pwritev first and fall back to linearizing the * buffer if it's not supported. */ if (preadv_present) { nbytes = handle_aiocb_rw_vector(aiocb); if (nbytes == aiocb->aio_nbytes || (nbytes < 0 && nbytes != - # 1213 "../block/file-posix.c" 3 4 38 /* Invalid system call number */ # 1213 "../block/file-posix.c" )) { return nbytes; } preadv_present = # 1216 "../block/file-posix.c" 3 4 0 # 1216 "../block/file-posix.c" ; } /* * XXX(hch): short read/write. no easy way to handle the reminder * using these interfaces. For now retry using plain * pread/pwrite? */ } /* * Ok, we have to do it the hard way, copy all segments into * a single aligned buffer. */ buf = qemu_try_blockalign(aiocb->bs, aiocb->aio_nbytes); if (buf == # 1231 "../block/file-posix.c" 3 4 ((void *)0) # 1231 "../block/file-posix.c" ) { return - # 1232 "../block/file-posix.c" 3 4 12 /* Out of memory */ # 1232 "../block/file-posix.c" ; } if (aiocb->aio_type & 0x0002) { char *p = buf; int i; for (i = 0; i < aiocb->aio_niov; ++i) { memcpy(p, aiocb->aio_iov[i].iov_base, aiocb->aio_iov[i].iov_len); p += aiocb->aio_iov[i].iov_len; } # 1243 "../block/file-posix.c" 3 4 ((void) sizeof (( # 1243 "../block/file-posix.c" p - buf == aiocb->aio_nbytes # 1243 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 1243 "../block/file-posix.c" p - buf == aiocb->aio_nbytes # 1243 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 1243 "../block/file-posix.c" "p - buf == aiocb->aio_nbytes" # 1243 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 1243, __extension__ __PRETTY_FUNCTION__); })) # 1243 "../block/file-posix.c" ; } nbytes = handle_aiocb_rw_linear(aiocb, buf); if (!(aiocb->aio_type & 0x0002)) { char *p = buf; size_t count = aiocb->aio_nbytes, copy; int i; for (i = 0; i < aiocb->aio_niov && count; ++i) { copy = count; if (copy > aiocb->aio_iov[i].iov_len) { copy = aiocb->aio_iov[i].iov_len; } memcpy(aiocb->aio_iov[i].iov_base, p, copy); # 1258 "../block/file-posix.c" 3 4 ((void) sizeof (( # 1258 "../block/file-posix.c" count >= copy # 1258 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 1258 "../block/file-posix.c" count >= copy # 1258 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 1258 "../block/file-posix.c" "count >= copy" # 1258 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 1258, __extension__ __PRETTY_FUNCTION__); })) # 1258 "../block/file-posix.c" ; p += copy; count -= copy; } # 1262 "../block/file-posix.c" 3 4 ((void) sizeof (( # 1262 "../block/file-posix.c" count == 0 # 1262 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 1262 "../block/file-posix.c" count == 0 # 1262 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 1262 "../block/file-posix.c" "count == 0" # 1262 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 1262, __extension__ __PRETTY_FUNCTION__); })) # 1262 "../block/file-posix.c" ; } qemu_vfree(buf); return nbytes; } static int xfs_write_zeroes(BDRVRawState *s, int64_t offset, uint64_t bytes) { struct xfs_flock64 fl; int err; memset(&fl, 0, sizeof(fl)); fl.l_whence = # 1276 "../block/file-posix.c" 3 4 0 /* seek relative to beginning of file */ # 1276 "../block/file-posix.c" ; fl.l_start = offset; fl.l_len = bytes; if (xfsctl( # 1280 "../block/file-posix.c" 3 4 ((void *)0) # 1280 "../block/file-posix.c" , s->fd, # 1280 "../block/file-posix.c" 3 4 (((1U) << (((0 +8)+8)+14)) | ((('X')) << (0 +8)) | (((57)) << 0) | ((((sizeof(struct xfs_flock64)))) << ((0 +8)+8))) # 1280 "../block/file-posix.c" , &fl) < 0) { err = # 1281 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1281 "../block/file-posix.c" ; do { if (0) { printf("cannot write zero range (%s)\n", strerror( # 1282 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1282 "../block/file-posix.c" )); } } while (0); return -err; } return 0; } static int xfs_discard(BDRVRawState *s, int64_t offset, uint64_t bytes) { struct xfs_flock64 fl; int err; memset(&fl, 0, sizeof(fl)); fl.l_whence = # 1295 "../block/file-posix.c" 3 4 0 /* seek relative to beginning of file */ # 1295 "../block/file-posix.c" ; fl.l_start = offset; fl.l_len = bytes; if (xfsctl( # 1299 "../block/file-posix.c" 3 4 ((void *)0) # 1299 "../block/file-posix.c" , s->fd, # 1299 "../block/file-posix.c" 3 4 (((1U) << (((0 +8)+8)+14)) | ((('X')) << (0 +8)) | (((43)) << 0) | ((((sizeof(struct xfs_flock64)))) << ((0 +8)+8))) # 1299 "../block/file-posix.c" , &fl) < 0) { err = # 1300 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1300 "../block/file-posix.c" ; do { if (0) { printf("cannot punch hole (%s)\n", strerror( # 1301 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1301 "../block/file-posix.c" )); } } while (0); return -err; } return 0; } static int translate_err(int err) { if (err == - # 1311 "../block/file-posix.c" 3 4 19 /* No such device */ # 1311 "../block/file-posix.c" || err == - # 1311 "../block/file-posix.c" 3 4 38 /* Invalid system call number */ # 1311 "../block/file-posix.c" || err == - # 1311 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1311 "../block/file-posix.c" || err == - # 1312 "../block/file-posix.c" 3 4 25 /* Not a typewriter */ # 1312 "../block/file-posix.c" ) { err = - # 1313 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1313 "../block/file-posix.c" ; } return err; } static int do_fallocate(int fd, int mode, off_t offset, off_t len) { do { if (fallocate(fd, mode, offset, len) == 0) { return 0; } } while ( # 1325 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1325 "../block/file-posix.c" == # 1325 "../block/file-posix.c" 3 4 4 /* Interrupted system call */ # 1325 "../block/file-posix.c" ); return translate_err(- # 1326 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1326 "../block/file-posix.c" ); } static ssize_t handle_aiocb_write_zeroes_block(RawPosixAIOData *aiocb) { int ret = - # 1332 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1332 "../block/file-posix.c" ; BDRVRawState *s = aiocb->bs->opaque; if (!s->has_write_zeroes) { return - # 1336 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1336 "../block/file-posix.c" ; } do { uint64_t range[2] = { aiocb->aio_offset, aiocb->aio_nbytes }; if (ioctl(aiocb->aio_fildes, # 1342 "../block/file-posix.c" 3 4 (((0U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((127)) << 0) | ((0) << ((0 +8)+8))) # 1342 "../block/file-posix.c" , range) == 0) { return 0; } } while ( # 1345 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1345 "../block/file-posix.c" == # 1345 "../block/file-posix.c" 3 4 4 /* Interrupted system call */ # 1345 "../block/file-posix.c" ); ret = translate_err(- # 1347 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1347 "../block/file-posix.c" ); if (ret == - # 1350 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1350 "../block/file-posix.c" ) { s->has_write_zeroes = # 1351 "../block/file-posix.c" 3 4 0 # 1351 "../block/file-posix.c" ; } return ret; } static ssize_t handle_aiocb_write_zeroes(RawPosixAIOData *aiocb) { BDRVRawState *s = aiocb->bs->opaque; int64_t len; if (aiocb->aio_type & 0x2000) { return handle_aiocb_write_zeroes_block(aiocb); } if (s->is_xfs) { return xfs_write_zeroes(s, aiocb->aio_offset, aiocb->aio_nbytes); } if (s->has_write_zeroes) { int ret = do_fallocate(s->fd, # 1377 "../block/file-posix.c" 3 4 0x10 # 1377 "../block/file-posix.c" , aiocb->aio_offset, aiocb->aio_nbytes); if (ret == 0 || ret != - # 1379 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1379 "../block/file-posix.c" ) { return ret; } s->has_write_zeroes = # 1382 "../block/file-posix.c" 3 4 0 # 1382 "../block/file-posix.c" ; } if (s->has_discard && s->has_fallocate) { int ret = do_fallocate(s->fd, # 1389 "../block/file-posix.c" 3 4 0x02 /* de-allocates range */ # 1389 "../block/file-posix.c" | # 1389 "../block/file-posix.c" 3 4 0x01 /* default is extend size */ # 1389 "../block/file-posix.c" , aiocb->aio_offset, aiocb->aio_nbytes); if (ret == 0) { ret = do_fallocate(s->fd, 0, aiocb->aio_offset, aiocb->aio_nbytes); if (ret == 0 || ret != - # 1393 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1393 "../block/file-posix.c" ) { return ret; } s->has_fallocate = # 1396 "../block/file-posix.c" 3 4 0 # 1396 "../block/file-posix.c" ; } else if (ret != - # 1397 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1397 "../block/file-posix.c" ) { return ret; } else { s->has_discard = # 1400 "../block/file-posix.c" 3 4 0 # 1400 "../block/file-posix.c" ; } } /* Last resort: we are trying to extend the file with zeroed data. This * can be done via fallocate(fd, 0) */ len = bdrv_getlength(aiocb->bs); if (s->has_fallocate && len >= 0 && aiocb->aio_offset >= len) { int ret = do_fallocate(s->fd, 0, aiocb->aio_offset, aiocb->aio_nbytes); if (ret == 0 || ret != - # 1411 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1411 "../block/file-posix.c" ) { return ret; } s->has_fallocate = # 1414 "../block/file-posix.c" 3 4 0 # 1414 "../block/file-posix.c" ; } return - # 1418 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1418 "../block/file-posix.c" ; } static ssize_t handle_aiocb_discard(RawPosixAIOData *aiocb) { int ret = - # 1423 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1423 "../block/file-posix.c" ; BDRVRawState *s = aiocb->bs->opaque; if (!s->has_discard) { return - # 1427 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1427 "../block/file-posix.c" ; } if (aiocb->aio_type & 0x2000) { do { uint64_t range[2] = { aiocb->aio_offset, aiocb->aio_nbytes }; if (ioctl(aiocb->aio_fildes, # 1434 "../block/file-posix.c" 3 4 (((0U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((119)) << 0) | ((0) << ((0 +8)+8))) # 1434 "../block/file-posix.c" , range) == 0) { return 0; } } while ( # 1437 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1437 "../block/file-posix.c" == # 1437 "../block/file-posix.c" 3 4 4 /* Interrupted system call */ # 1437 "../block/file-posix.c" ); ret = - # 1439 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1439 "../block/file-posix.c" ; } else { if (s->is_xfs) { return xfs_discard(s, aiocb->aio_offset, aiocb->aio_nbytes); } ret = do_fallocate(s->fd, # 1449 "../block/file-posix.c" 3 4 0x02 /* de-allocates range */ # 1449 "../block/file-posix.c" | # 1449 "../block/file-posix.c" 3 4 0x01 /* default is extend size */ # 1449 "../block/file-posix.c" , aiocb->aio_offset, aiocb->aio_nbytes); } ret = translate_err(ret); if (ret == - # 1455 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1455 "../block/file-posix.c" ) { s->has_discard = # 1456 "../block/file-posix.c" 3 4 0 # 1456 "../block/file-posix.c" ; } return ret; } static int aio_worker(void *arg) { RawPosixAIOData *aiocb = arg; ssize_t ret = 0; switch (aiocb->aio_type & (0x0001|0x0002|0x0004|0x0008| 0x0010|0x0020)) { case 0x0001: ret = handle_aiocb_rw(aiocb); if (ret >= 0 && ret < aiocb->aio_nbytes) { iov_memset(aiocb->aio_iov, aiocb->aio_niov, ret, 0, aiocb->aio_nbytes - ret); ret = aiocb->aio_nbytes; } if (ret == aiocb->aio_nbytes) { ret = 0; } else if (ret >= 0 && ret < aiocb->aio_nbytes) { ret = - # 1478 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 1478 "../block/file-posix.c" ; } break; case 0x0002: ret = handle_aiocb_rw(aiocb); if (ret == aiocb->aio_nbytes) { ret = 0; } else if (ret >= 0 && ret < aiocb->aio_nbytes) { ret = - # 1486 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 1486 "../block/file-posix.c" ; } break; case 0x0008: ret = handle_aiocb_flush(aiocb); break; case 0x0004: ret = handle_aiocb_ioctl(aiocb); break; case 0x0010: ret = handle_aiocb_discard(aiocb); break; case 0x0020: ret = handle_aiocb_write_zeroes(aiocb); break; default: fprintf( # 1502 "../block/file-posix.c" 3 4 stderr # 1502 "../block/file-posix.c" , "invalid aio request (0x%x)\n", aiocb->aio_type); ret = - # 1503 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 1503 "../block/file-posix.c" ; break; } g_free(aiocb); return ret; } static int paio_submit_co(BlockDriverState *bs, int fd, int64_t offset, QEMUIOVector *qiov, int bytes, int type) { RawPosixAIOData *acb = ((RawPosixAIOData *) g_malloc_n ((1), sizeof (RawPosixAIOData))); ThreadPool *pool; acb->bs = bs; acb->aio_type = type; acb->aio_fildes = fd; acb->aio_nbytes = bytes; acb->aio_offset = offset; if (qiov) { acb->aio_iov = qiov->iov; acb->aio_niov = qiov->niov; # 1528 "../block/file-posix.c" 3 4 ((void) sizeof (( # 1528 "../block/file-posix.c" qiov->size == bytes # 1528 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 1528 "../block/file-posix.c" qiov->size == bytes # 1528 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 1528 "../block/file-posix.c" "qiov->size == bytes" # 1528 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 1528, __extension__ __PRETTY_FUNCTION__); })) # 1528 "../block/file-posix.c" ; } trace_paio_submit_co(offset, bytes, type); pool = aio_get_thread_pool(bdrv_get_aio_context(bs)); return thread_pool_submit_co(pool, aio_worker, acb); } static BlockAIOCB *paio_submit(BlockDriverState *bs, int fd, int64_t offset, QEMUIOVector *qiov, int bytes, BlockCompletionFunc *cb, void *opaque, int type) { RawPosixAIOData *acb = ((RawPosixAIOData *) g_malloc_n ((1), sizeof (RawPosixAIOData))); ThreadPool *pool; acb->bs = bs; acb->aio_type = type; acb->aio_fildes = fd; acb->aio_nbytes = bytes; acb->aio_offset = offset; if (qiov) { acb->aio_iov = qiov->iov; acb->aio_niov = qiov->niov; # 1553 "../block/file-posix.c" 3 4 ((void) sizeof (( # 1553 "../block/file-posix.c" qiov->size == acb->aio_nbytes # 1553 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 1553 "../block/file-posix.c" qiov->size == acb->aio_nbytes # 1553 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 1553 "../block/file-posix.c" "qiov->size == acb->aio_nbytes" # 1553 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 1553, __extension__ __PRETTY_FUNCTION__); })) # 1553 "../block/file-posix.c" ; } trace_paio_submit(acb, opaque, offset, bytes, type); pool = aio_get_thread_pool(bdrv_get_aio_context(bs)); return thread_pool_submit_aio(pool, aio_worker, acb, cb, opaque); } static int raw_co_prw(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int type) { BDRVRawState *s = bs->opaque; if (fd_open(bs) < 0) return - # 1567 "../block/file-posix.c" 3 4 5 /* I/O error */ # 1567 "../block/file-posix.c" ; /* * Check if the underlying device requires requests to be aligned, * and if the request we are trying to submit is aligned or not. * If this is the case tell the low-level driver that it needs * to copy the buffer. */ if (s->needs_alignment) { if (!bdrv_qiov_is_aligned(bs, qiov)) { type |= 0x1000; } else if (s->use_linux_aio) { LinuxAioState *aio = aio_get_linux_aio(bdrv_get_aio_context(bs)); # 1581 "../block/file-posix.c" 3 4 ((void) sizeof (( # 1581 "../block/file-posix.c" qiov->size == bytes # 1581 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 1581 "../block/file-posix.c" qiov->size == bytes # 1581 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 1581 "../block/file-posix.c" "qiov->size == bytes" # 1581 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 1581, __extension__ __PRETTY_FUNCTION__); })) # 1581 "../block/file-posix.c" ; return laio_co_submit(bs, aio, s->fd, offset, qiov, type); } } return paio_submit_co(bs, s->fd, offset, qiov, bytes, type); } static int raw_co_preadv(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { return raw_co_prw(bs, offset, bytes, qiov, 0x0001); } static int raw_co_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { # 1601 "../block/file-posix.c" 3 4 ((void) sizeof (( # 1601 "../block/file-posix.c" flags == 0 # 1601 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 1601 "../block/file-posix.c" flags == 0 # 1601 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 1601 "../block/file-posix.c" "flags == 0" # 1601 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 1601, __extension__ __PRETTY_FUNCTION__); })) # 1601 "../block/file-posix.c" ; return raw_co_prw(bs, offset, bytes, qiov, 0x0002); } static void raw_aio_plug(BlockDriverState *bs) { BDRVRawState *s = bs->opaque; if (s->use_linux_aio) { LinuxAioState *aio = aio_get_linux_aio(bdrv_get_aio_context(bs)); laio_io_plug(bs, aio); } } static void raw_aio_unplug(BlockDriverState *bs) { BDRVRawState *s = bs->opaque; if (s->use_linux_aio) { LinuxAioState *aio = aio_get_linux_aio(bdrv_get_aio_context(bs)); laio_io_unplug(bs, aio); } } static BlockAIOCB *raw_aio_flush(BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque) { BDRVRawState *s = bs->opaque; if (fd_open(bs) < 0) return # 1633 "../block/file-posix.c" 3 4 ((void *)0) # 1633 "../block/file-posix.c" ; return paio_submit(bs, s->fd, 0, # 1635 "../block/file-posix.c" 3 4 ((void *)0) # 1635 "../block/file-posix.c" , 0, cb, opaque, 0x0008); } static void raw_close(BlockDriverState *bs) { BDRVRawState *s = bs->opaque; if (s->fd >= 0) { qemu_close(s->fd); s->fd = -1; } if (s->lock_fd >= 0) { qemu_close(s->lock_fd); s->lock_fd = -1; } } /** * Truncates the given regular file @fd to @offset and, when growing, fills the * new space according to @prealloc. * * Returns: 0 on success, -errno on failure. */ static int raw_regular_truncate(int fd, int64_t offset, PreallocMode prealloc, Error **errp) { int result = 0; int64_t current_length = 0; char *buf = # 1663 "../block/file-posix.c" 3 4 ((void *)0) # 1663 "../block/file-posix.c" ; struct stat st; if (fstat(fd, &st) < 0) { result = - # 1667 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1667 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 1668, __func__, (-result), ("Could not stat file")); return result; } current_length = st.st_size; if (current_length > offset && prealloc != PREALLOC_MODE_OFF) { error_setg_internal((errp), "../block/file-posix.c", 1674, __func__, ("Cannot use preallocation for shrinking files")); return - # 1675 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1675 "../block/file-posix.c" ; } switch (prealloc) { case PREALLOC_MODE_FALLOC: /* * Truncating before posix_fallocate() makes it about twice slower on * file systems that do not support fallocate(), trying to check if a * block is allocated before allocating it, so don't do that here. */ result = -posix_fallocate(fd, current_length, offset - current_length); if (result != 0) { /* posix_fallocate() doesn't set errno. */ error_setg_errno_internal((errp), "../block/file-posix.c" # 1689 "../block/file-posix.c" , 1690 # 1689 "../block/file-posix.c" , __func__, (-result), ("Could not preallocate new data")) ; } goto out; case PREALLOC_MODE_FULL: { int64_t num = 0, left = offset - current_length; /* * Knowing the final size from the beginning could allow the file * system driver to do less allocations and possibly avoid * fragmentation of the file. */ if (ftruncate(fd, offset) != 0) { result = - # 1704 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1704 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 1705, __func__, (-result), ("Could not resize file")); goto out; } buf = g_malloc0(65536); result = lseek(fd, current_length, # 1711 "../block/file-posix.c" 3 4 0 /* seek relative to beginning of file */ # 1711 "../block/file-posix.c" ); if (result < 0) { result = - # 1713 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1713 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c" # 1714 "../block/file-posix.c" , 1715 # 1714 "../block/file-posix.c" , __func__, (-result), ("Failed to seek to the old end of file")) ; goto out; } while (left > 0) { num = # 1720 "../block/file-posix.c" 3 4 ((( # 1720 "../block/file-posix.c" left # 1720 "../block/file-posix.c" 3 4 )<( # 1720 "../block/file-posix.c" 65536 # 1720 "../block/file-posix.c" 3 4 ))?( # 1720 "../block/file-posix.c" left # 1720 "../block/file-posix.c" 3 4 ):( # 1720 "../block/file-posix.c" 65536 # 1720 "../block/file-posix.c" 3 4 )) # 1720 "../block/file-posix.c" ; result = write(fd, buf, num); if (result < 0) { result = - # 1723 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1723 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c" # 1724 "../block/file-posix.c" , 1725 # 1724 "../block/file-posix.c" , __func__, (-result), ("Could not write zeros for preallocation")) ; goto out; } left -= result; } if (result >= 0) { result = fsync(fd); if (result < 0) { result = - # 1733 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1733 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c" # 1734 "../block/file-posix.c" , 1735 # 1734 "../block/file-posix.c" , __func__, (-result), ("Could not flush file to disk")) ; goto out; } } goto out; } case PREALLOC_MODE_OFF: if (ftruncate(fd, offset) != 0) { result = - # 1743 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1743 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 1744, __func__, (-result), ("Could not resize file")); } return result; default: result = - # 1748 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1748 "../block/file-posix.c" ; error_setg_internal((errp), "../block/file-posix.c" # 1749 "../block/file-posix.c" , 1750 # 1749 "../block/file-posix.c" , __func__, ("Unsupported preallocation mode: %s"), qapi_enum_lookup(&PreallocMode_lookup, (prealloc))) ; return result; } out: if (result < 0) { if (ftruncate(fd, current_length) < 0) { error_report("Failed to restore old file length: %s", strerror( # 1758 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1758 "../block/file-posix.c" )); } } g_free(buf); return result; } static int raw_truncate(BlockDriverState *bs, int64_t offset, PreallocMode prealloc, Error **errp) { BDRVRawState *s = bs->opaque; struct stat st; int ret; if (fstat(s->fd, &st)) { ret = - # 1774 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1774 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 1775, __func__, (-ret), ("Failed to fstat() the file")); return ret; } if ( # 1779 "../block/file-posix.c" 3 4 (((( # 1779 "../block/file-posix.c" st.st_mode # 1779 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0100000 /* Regular file. */)) # 1779 "../block/file-posix.c" ) { return raw_regular_truncate(s->fd, offset, prealloc, errp); } if (prealloc != PREALLOC_MODE_OFF) { error_setg_internal((errp), "../block/file-posix.c" # 1784 "../block/file-posix.c" , 1785 # 1784 "../block/file-posix.c" , __func__, ("Preallocation mode '%s' unsupported for this " "non-regular file"), qapi_enum_lookup(&PreallocMode_lookup, (prealloc))) ; return - # 1786 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1786 "../block/file-posix.c" ; } if ( # 1789 "../block/file-posix.c" 3 4 (((( # 1789 "../block/file-posix.c" st.st_mode # 1789 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0020000 /* Character device. */)) # 1789 "../block/file-posix.c" || # 1789 "../block/file-posix.c" 3 4 (((( # 1789 "../block/file-posix.c" st.st_mode # 1789 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0060000 /* Block device. */)) # 1789 "../block/file-posix.c" ) { if (offset > raw_getlength(bs)) { error_setg_internal((errp), "../block/file-posix.c", 1791, __func__, ("Cannot grow device files")); return - # 1792 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 1792 "../block/file-posix.c" ; } } else { error_setg_internal((errp), "../block/file-posix.c", 1795, __func__, ("Resizing this file is not supported")); return - # 1796 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 1796 "../block/file-posix.c" ; } return 0; } # 1952 "../block/file-posix.c" static int64_t raw_getlength(BlockDriverState *bs) { BDRVRawState *s = bs->opaque; int ret; int64_t size; ret = fd_open(bs); if (ret < 0) { return ret; } size = lseek(s->fd, 0, # 1963 "../block/file-posix.c" 3 4 2 /* seek relative to end of file */ # 1963 "../block/file-posix.c" ); if (size < 0) { return - # 1965 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1965 "../block/file-posix.c" ; } return size; } static int64_t raw_get_allocated_file_size(BlockDriverState *bs) { struct stat st; BDRVRawState *s = bs->opaque; if (fstat(s->fd, &st) < 0) { return - # 1977 "../block/file-posix.c" 3 4 (*__errno_location ()) # 1977 "../block/file-posix.c" ; } return (int64_t)st.st_blocks * 512; } static int raw_create(const char *filename, QemuOpts *opts, Error **errp) { int fd; int result = 0; int64_t total_size = 0; # 1987 "../block/file-posix.c" 3 4 _Bool # 1987 "../block/file-posix.c" nocow = # 1987 "../block/file-posix.c" 3 4 0 # 1987 "../block/file-posix.c" ; PreallocMode prealloc; char *buf = # 1989 "../block/file-posix.c" 3 4 ((void *)0) # 1989 "../block/file-posix.c" ; Error *local_err = # 1990 "../block/file-posix.c" 3 4 ((void *)0) # 1990 "../block/file-posix.c" ; strstart(filename, "file:", &filename); /* Read out options */ total_size = (((qemu_opt_get_size_del(opts, "size", 0)) + ((1ULL << 9)) - 1) & -(0 ? (qemu_opt_get_size_del(opts, "size", 0)) : ((1ULL << 9)))) ; nocow = qemu_opt_get_bool(opts, "nocow", # 1997 "../block/file-posix.c" 3 4 0 # 1997 "../block/file-posix.c" ); buf = qemu_opt_get_del(opts, "preallocation"); prealloc = qapi_enum_parse(&PreallocMode_lookup, buf, PREALLOC_MODE_OFF, &local_err); g_free(buf); if (local_err) { error_propagate(errp, local_err); result = - # 2004 "../block/file-posix.c" 3 4 22 /* Invalid argument */ # 2004 "../block/file-posix.c" ; goto out; } fd = qemu_open(filename, # 2008 "../block/file-posix.c" 3 4 02 # 2008 "../block/file-posix.c" | # 2008 "../block/file-posix.c" 3 4 0100 /* Not fcntl. */ # 2008 "../block/file-posix.c" | # 2008 "../block/file-posix.c" 3 4 01000 /* Not fcntl. */ # 2008 "../block/file-posix.c" | 0, 0644); if (fd < 0) { result = - # 2011 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2011 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 2012, __func__, (-result), ("Could not create file")); goto out; } if (nocow) { /* Set NOCOW flag to solve performance issue on fs like btrfs. * This is an optimisation. The FS_IOC_SETFLAGS ioctl return value * will be ignored since any failure of this operation should not * block the left work. */ int attr; if (ioctl(fd, # 2024 "../block/file-posix.c" 3 4 (((2U) << (((0 +8)+8)+14)) | ((('f')) << (0 +8)) | (((1)) << 0) | ((((sizeof(long)))) << ((0 +8)+8))) # 2024 "../block/file-posix.c" , &attr) == 0) { attr |= # 2025 "../block/file-posix.c" 3 4 0x00800000 /* Do not cow file */ # 2025 "../block/file-posix.c" ; ioctl(fd, # 2026 "../block/file-posix.c" 3 4 (((1U) << (((0 +8)+8)+14)) | ((('f')) << (0 +8)) | (((2)) << 0) | ((((sizeof(long)))) << ((0 +8)+8))) # 2026 "../block/file-posix.c" , &attr); } } result = raw_regular_truncate(fd, total_size, prealloc, errp); if (result < 0) { goto out_close; } out_close: if (qemu_close(fd) != 0 && result == 0) { result = - # 2038 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2038 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 2039, __func__, (-result), ("Could not close the new file")); } out: return result; } /* * Find allocation range in @bs around offset @start. * May change underlying file descriptor's file offset. * If @start is not in a hole, store @start in @data, and the * beginning of the next hole in @hole, and return 0. * If @start is in a non-trailing hole, store @start in @hole and the * beginning of the next non-hole in @data, and return 0. * If @start is in a trailing hole or beyond EOF, return -ENXIO. * If we can't find out, return a negative errno other than -ENXIO. */ static int find_allocation(BlockDriverState *bs, off_t start, off_t *data, off_t *hole) { BDRVRawState *s = bs->opaque; off_t offs; /* * SEEK_DATA cases: * D1. offs == start: start is in data * D2. offs > start: start is in a hole, next data at offs * D3. offs < 0, errno = ENXIO: either start is in a trailing hole * or start is beyond EOF * If the latter happens, the file has been truncated behind * our back since we opened it. All bets are off then. * Treating like a trailing hole is simplest. * D4. offs < 0, errno != ENXIO: we learned nothing */ offs = lseek(s->fd, start, # 2073 "../block/file-posix.c" 3 4 3 /* seek to the next data */ # 2073 "../block/file-posix.c" ); if (offs < 0) { return - # 2075 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2075 "../block/file-posix.c" ; /* D3 or D4 */ } # 2077 "../block/file-posix.c" 3 4 ((void) sizeof (( # 2077 "../block/file-posix.c" offs >= start # 2077 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 2077 "../block/file-posix.c" offs >= start # 2077 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 2077 "../block/file-posix.c" "offs >= start" # 2077 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 2077, __extension__ __PRETTY_FUNCTION__); })) # 2077 "../block/file-posix.c" ; if (offs > start) { /* D2: in hole, next data at offs */ *hole = start; *data = offs; return 0; } /* D1: in data, end not yet known */ /* * SEEK_HOLE cases: * H1. offs == start: start is in a hole * If this happens here, a hole has been dug behind our back * since the previous lseek(). * H2. offs > start: either start is in data, next hole at offs, * or start is in trailing hole, EOF at offs * Linux treats trailing holes like any other hole: offs == * start. Solaris seeks to EOF instead: offs > start (blech). * If that happens here, a hole has been dug behind our back * since the previous lseek(). * H3. offs < 0, errno = ENXIO: start is beyond EOF * If this happens, the file has been truncated behind our * back since we opened it. Treat it like a trailing hole. * H4. offs < 0, errno != ENXIO: we learned nothing * Pretend we know nothing at all, i.e. "forget" about D1. */ offs = lseek(s->fd, start, # 2105 "../block/file-posix.c" 3 4 4 /* seek to the next hole */ # 2105 "../block/file-posix.c" ); if (offs < 0) { return - # 2107 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2107 "../block/file-posix.c" ; /* D1 and (H3 or H4) */ } # 2109 "../block/file-posix.c" 3 4 ((void) sizeof (( # 2109 "../block/file-posix.c" offs >= start # 2109 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 2109 "../block/file-posix.c" offs >= start # 2109 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 2109 "../block/file-posix.c" "offs >= start" # 2109 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 2109, __extension__ __PRETTY_FUNCTION__); })) # 2109 "../block/file-posix.c" ; if (offs > start) { /* * D1 and H2: either in data, next hole at offs, or it was in * data but is now in a trailing hole. In the latter case, * all bets are off. Treating it as if it there was data all * the way to EOF is safe, so simply do that. */ *data = start; *hole = offs; return 0; } /* D1 and H1 */ return - # 2124 "../block/file-posix.c" 3 4 16 /* Device or resource busy */ # 2124 "../block/file-posix.c" ; } /* * Returns the allocation status of the specified sectors. * * If 'sector_num' is beyond the end of the disk image the return value is 0 * and 'pnum' is set to 0. * * 'pnum' is set to the number of sectors (including and immediately following * the specified sector) that are known to be in the same * allocated/unallocated state. * * 'nb_sectors' is the max value 'pnum' should be set to. If nb_sectors goes * beyond the end of the disk image it will be clamped. */ static int64_t raw_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { off_t start, data = 0, hole = 0; int64_t total_size; int ret; ret = fd_open(bs); if (ret < 0) { return ret; } start = sector_num * (1ULL << 9); total_size = bdrv_getlength(bs); if (total_size < 0) { return total_size; } else if (start >= total_size) { *pnum = 0; return 0; } else if (start + nb_sectors * (1ULL << 9) > total_size) { nb_sectors = (((total_size - start) + ((1ULL << 9)) - 1) / ((1ULL << 9))); } ret = find_allocation(bs, start, &data, &hole); if (ret == - # 2169 "../block/file-posix.c" 3 4 6 /* No such device or address */ # 2169 "../block/file-posix.c" ) { /* Trailing hole */ *pnum = nb_sectors; ret = 0x02; } else if (ret < 0) { /* No info available, so pretend there are no holes */ *pnum = nb_sectors; ret = 0x01; } else if (data == start) { /* On a data extent, compute sectors to the end of the extent, * possibly including a partial sector at EOF. */ *pnum = # 2180 "../block/file-posix.c" 3 4 ((( # 2180 "../block/file-posix.c" nb_sectors # 2180 "../block/file-posix.c" 3 4 )<( # 2180 "../block/file-posix.c" (((hole - start) + ((1ULL << 9)) - 1) / ((1ULL << 9))) # 2180 "../block/file-posix.c" 3 4 ))?( # 2180 "../block/file-posix.c" nb_sectors # 2180 "../block/file-posix.c" 3 4 ):( # 2180 "../block/file-posix.c" (((hole - start) + ((1ULL << 9)) - 1) / ((1ULL << 9))) # 2180 "../block/file-posix.c" 3 4 )) # 2180 "../block/file-posix.c" ; ret = 0x01; } else { /* On a hole, compute sectors to the beginning of the next extent. */ # 2184 "../block/file-posix.c" 3 4 ((void) sizeof (( # 2184 "../block/file-posix.c" hole == start # 2184 "../block/file-posix.c" 3 4 ) ? 1 : 0), __extension__ ({ if ( # 2184 "../block/file-posix.c" hole == start # 2184 "../block/file-posix.c" 3 4 ) ; /* empty */ else __assert_fail ( # 2184 "../block/file-posix.c" "hole == start" # 2184 "../block/file-posix.c" 3 4 , "../block/file-posix.c", 2184, __extension__ __PRETTY_FUNCTION__); })) # 2184 "../block/file-posix.c" ; *pnum = # 2185 "../block/file-posix.c" 3 4 ((( # 2185 "../block/file-posix.c" nb_sectors # 2185 "../block/file-posix.c" 3 4 )<( # 2185 "../block/file-posix.c" (data - start) / (1ULL << 9) # 2185 "../block/file-posix.c" 3 4 ))?( # 2185 "../block/file-posix.c" nb_sectors # 2185 "../block/file-posix.c" 3 4 ):( # 2185 "../block/file-posix.c" (data - start) / (1ULL << 9) # 2185 "../block/file-posix.c" 3 4 )) # 2185 "../block/file-posix.c" ; ret = 0x02; } *file = bs; return ret | 0x04 | start; } static BlockAIOCB *raw_aio_pdiscard(BlockDriverState *bs, int64_t offset, int bytes, BlockCompletionFunc *cb, void *opaque) { BDRVRawState *s = bs->opaque; return paio_submit(bs, s->fd, offset, # 2198 "../block/file-posix.c" 3 4 ((void *)0) # 2198 "../block/file-posix.c" , bytes, cb, opaque, 0x0010); } static int raw_co_pwrite_zeroes( BlockDriverState *bs, int64_t offset, int bytes, BdrvRequestFlags flags) { BDRVRawState *s = bs->opaque; if (!(flags & BDRV_REQ_MAY_UNMAP)) { return paio_submit_co(bs, s->fd, offset, # 2209 "../block/file-posix.c" 3 4 ((void *)0) # 2209 "../block/file-posix.c" , bytes, 0x0020); } else if (s->discard_zeroes) { return paio_submit_co(bs, s->fd, offset, # 2212 "../block/file-posix.c" 3 4 ((void *)0) # 2212 "../block/file-posix.c" , bytes, 0x0010); } return - # 2215 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 2215 "../block/file-posix.c" ; } static int raw_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) { BDRVRawState *s = bs->opaque; bdi->unallocated_blocks_are_zero = s->discard_zeroes; bdi->can_write_zeroes_with_unmap = s->discard_zeroes; return 0; } static QemuOptsList raw_create_opts = { .name = "raw-create-opts", .head = { # 2229 "../block/file-posix.c" 3 4 ((void *)0) # 2229 "../block/file-posix.c" , &(raw_create_opts.head).tqh_first }, .desc = { { .name = "size", .type = QEMU_OPT_SIZE, .help = "Virtual disk size" }, { .name = "nocow", .type = QEMU_OPT_BOOL, .help = "Turn off copy-on-write (valid only on btrfs)" }, { .name = "preallocation", .type = QEMU_OPT_STRING, .help = "Preallocation mode (allowed values: off, falloc, full)" }, { /* end of list */ } } }; static int raw_check_perm(BlockDriverState *bs, uint64_t perm, uint64_t shared, Error **errp) { return raw_handle_perm_lock(bs, RAW_PL_PREPARE, perm, shared, errp); } static void raw_set_perm(BlockDriverState *bs, uint64_t perm, uint64_t shared) { BDRVRawState *s = bs->opaque; raw_handle_perm_lock(bs, RAW_PL_COMMIT, perm, shared, # 2259 "../block/file-posix.c" 3 4 ((void *)0) # 2259 "../block/file-posix.c" ); s->perm = perm; s->shared_perm = shared; } static void raw_abort_perm_update(BlockDriverState *bs) { raw_handle_perm_lock(bs, RAW_PL_ABORT, 0, 0, # 2266 "../block/file-posix.c" 3 4 ((void *)0) # 2266 "../block/file-posix.c" ); } BlockDriver bdrv_file = { .format_name = "file", .protocol_name = "file", .instance_size = sizeof(BDRVRawState), .bdrv_needs_filename = # 2273 "../block/file-posix.c" 3 4 1 # 2273 "../block/file-posix.c" , .bdrv_probe = # 2274 "../block/file-posix.c" 3 4 ((void *)0) # 2274 "../block/file-posix.c" , /* no probe for protocols */ .bdrv_parse_filename = raw_parse_filename, .bdrv_file_open = raw_open, .bdrv_reopen_prepare = raw_reopen_prepare, .bdrv_reopen_commit = raw_reopen_commit, .bdrv_reopen_abort = raw_reopen_abort, .bdrv_close = raw_close, .bdrv_create = raw_create, .bdrv_has_zero_init = bdrv_has_zero_init_1, .bdrv_co_get_block_status = raw_co_get_block_status, .bdrv_co_pwrite_zeroes = raw_co_pwrite_zeroes, .bdrv_co_preadv = raw_co_preadv, .bdrv_co_pwritev = raw_co_pwritev, .bdrv_aio_flush = raw_aio_flush, .bdrv_aio_pdiscard = raw_aio_pdiscard, .bdrv_refresh_limits = raw_refresh_limits, .bdrv_io_plug = raw_aio_plug, .bdrv_io_unplug = raw_aio_unplug, .bdrv_truncate = raw_truncate, .bdrv_getlength = raw_getlength, .bdrv_get_info = raw_get_info, .bdrv_get_allocated_file_size = raw_get_allocated_file_size, .bdrv_check_perm = raw_check_perm, .bdrv_set_perm = raw_set_perm, .bdrv_abort_perm_update = raw_abort_perm_update, .create_opts = &raw_create_opts, }; /***********************************************/ /* host device */ # 2422 "../block/file-posix.c" static int hdev_probe_device(const char *filename) { struct stat st; /* allow a dedicated CD-ROM driver to match with a higher priority */ if (strstart(filename, "/dev/cdrom", # 2427 "../block/file-posix.c" 3 4 ((void *)0) # 2427 "../block/file-posix.c" )) return 50; if (stat(filename, &st) >= 0 && ( # 2431 "../block/file-posix.c" 3 4 (((( # 2431 "../block/file-posix.c" st.st_mode # 2431 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0020000 /* Character device. */)) # 2431 "../block/file-posix.c" || # 2431 "../block/file-posix.c" 3 4 (((( # 2431 "../block/file-posix.c" st.st_mode # 2431 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0060000 /* Block device. */)) # 2431 "../block/file-posix.c" )) { return 100; } return 0; } static int check_hdev_writable(BDRVRawState *s) { /* Linux block devices can be configured "read-only" using blockdev(8). * This is independent of device node permissions and therefore open(2) * with O_RDWR succeeds. Actual writes fail with EPERM. * * bdrv_open() is supposed to fail if the disk is read-only. Explicitly * check for read-only block devices so that Linux block devices behave * properly. */ struct stat st; int readonly = 0; if (fstat(s->fd, &st)) { return - # 2453 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2453 "../block/file-posix.c" ; } if (! # 2456 "../block/file-posix.c" 3 4 (((( # 2456 "../block/file-posix.c" st.st_mode # 2456 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0060000 /* Block device. */)) # 2456 "../block/file-posix.c" ) { return 0; } if (ioctl(s->fd, # 2460 "../block/file-posix.c" 3 4 (((0U) << (((0 +8)+8)+14)) | (((0x12)) << (0 +8)) | (((94)) << 0) | ((0) << ((0 +8)+8))) /* get read-only status (0 = read_write) */ # 2460 "../block/file-posix.c" , &readonly) < 0) { return - # 2461 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2461 "../block/file-posix.c" ; } if (readonly) { return - # 2465 "../block/file-posix.c" 3 4 13 /* Permission denied */ # 2465 "../block/file-posix.c" ; } return 0; } static void hdev_parse_filename(const char *filename, QDict *options, Error **errp) { bdrv_parse_filename_strip_prefix(filename, "host_device:", options); } static # 2477 "../block/file-posix.c" 3 4 _Bool # 2477 "../block/file-posix.c" hdev_is_sg(BlockDriverState *bs) { BDRVRawState *s = bs->opaque; struct stat st; struct sg_scsi_id scsiid; int sg_version; int ret; if (stat(bs->filename, &st) < 0 || ! # 2488 "../block/file-posix.c" 3 4 (((( # 2488 "../block/file-posix.c" st.st_mode # 2488 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0020000 /* Character device. */)) # 2488 "../block/file-posix.c" ) { return # 2489 "../block/file-posix.c" 3 4 0 # 2489 "../block/file-posix.c" ; } ret = ioctl(s->fd, # 2492 "../block/file-posix.c" 3 4 0x2282 /* Example: version 2.1.34 yields 20134 */ # 2492 "../block/file-posix.c" , &sg_version); if (ret < 0) { return # 2494 "../block/file-posix.c" 3 4 0 # 2494 "../block/file-posix.c" ; } ret = ioctl(s->fd, # 2497 "../block/file-posix.c" 3 4 0x2276 /* Yields fd's bus, chan, dev, lun + type */ # 2497 "../block/file-posix.c" , &scsiid); if (ret >= 0) { do { if (0) { printf("SG device found: type=%d, version=%d\n", scsiid.scsi_type, sg_version); } } while (0) ; return # 2501 "../block/file-posix.c" 3 4 1 # 2501 "../block/file-posix.c" ; } return # 2506 "../block/file-posix.c" 3 4 0 # 2506 "../block/file-posix.c" ; } static int hdev_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVRawState *s = bs->opaque; Error *local_err = # 2513 "../block/file-posix.c" 3 4 ((void *)0) # 2513 "../block/file-posix.c" ; int ret; # 2576 "../block/file-posix.c" s->type = 0; ret = raw_open_common(bs, options, flags, 0, &local_err); if (ret < 0) { error_propagate(errp, local_err); # 2590 "../block/file-posix.c" return ret; } /* Since this does ioctl the device must be already opened */ bs->sg = hdev_is_sg(bs); if (flags & 0x0002) { ret = check_hdev_writable(s); if (ret < 0) { raw_close(bs); error_setg_errno_internal((errp), "../block/file-posix.c", 2600, __func__, (-ret), ("The device is not writable")); return ret; } } return ret; } static BlockAIOCB *hdev_aio_ioctl(BlockDriverState *bs, unsigned long int req, void *buf, BlockCompletionFunc *cb, void *opaque) { BDRVRawState *s = bs->opaque; RawPosixAIOData *acb; ThreadPool *pool; if (fd_open(bs) < 0) return # 2619 "../block/file-posix.c" 3 4 ((void *)0) # 2619 "../block/file-posix.c" ; if (req == # 2621 "../block/file-posix.c" 3 4 0x2285 /* similar effect as write() followed by read() */ # 2621 "../block/file-posix.c" && s->pr_mgr) { struct sg_io_hdr *io_hdr = buf; if (io_hdr->cmdp[0] == 0x5f || io_hdr->cmdp[0] == 0x5e) { return pr_manager_execute(s->pr_mgr, bdrv_get_aio_context(bs), s->fd, io_hdr, cb, opaque); } } acb = ((RawPosixAIOData *) g_malloc_n ((1), sizeof (RawPosixAIOData))); acb->bs = bs; acb->aio_type = 0x0004; acb->aio_fildes = s->fd; acb->aio_offset = 0; acb->aio_ioctl_buf = buf; acb->aio_nbytes /* for QEMU_AIO_IOCTL */ = req; pool = aio_get_thread_pool(bdrv_get_aio_context(bs)); return thread_pool_submit_aio(pool, aio_worker, acb, cb, opaque); } static int fd_open(BlockDriverState *bs) { BDRVRawState *s = bs->opaque; /* this is just to ensure s->fd is sane (its called by io ops) */ if (s->fd >= 0) return 0; return - # 2649 "../block/file-posix.c" 3 4 5 /* I/O error */ # 2649 "../block/file-posix.c" ; } static BlockAIOCB *hdev_aio_pdiscard(BlockDriverState *bs, int64_t offset, int bytes, BlockCompletionFunc *cb, void *opaque) { BDRVRawState *s = bs->opaque; if (fd_open(bs) < 0) { return # 2659 "../block/file-posix.c" 3 4 ((void *)0) # 2659 "../block/file-posix.c" ; } return paio_submit(bs, s->fd, offset, # 2661 "../block/file-posix.c" 3 4 ((void *)0) # 2661 "../block/file-posix.c" , bytes, cb, opaque, 0x0010|0x2000); } static int hdev_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int bytes, BdrvRequestFlags flags) { BDRVRawState *s = bs->opaque; int rc; rc = fd_open(bs); if (rc < 0) { return rc; } if (!(flags & BDRV_REQ_MAY_UNMAP)) { return paio_submit_co(bs, s->fd, offset, # 2676 "../block/file-posix.c" 3 4 ((void *)0) # 2676 "../block/file-posix.c" , bytes, 0x0020|0x2000); } else if (s->discard_zeroes) { return paio_submit_co(bs, s->fd, offset, # 2679 "../block/file-posix.c" 3 4 ((void *)0) # 2679 "../block/file-posix.c" , bytes, 0x0010|0x2000); } return - # 2682 "../block/file-posix.c" 3 4 95 /* Operation not supported on transport endpoint */ # 2682 "../block/file-posix.c" ; } static int hdev_create(const char *filename, QemuOpts *opts, Error **errp) { int fd; int ret = 0; struct stat stat_buf; int64_t total_size = 0; # 2692 "../block/file-posix.c" 3 4 _Bool # 2692 "../block/file-posix.c" has_prefix; /* This function is used by both protocol block drivers and therefore either * of these prefixes may be given. * The return value has to be stored somewhere, otherwise this is an error * due to -Werror=unused-value. */ has_prefix = strstart(filename, "host_device:", &filename) || strstart(filename, "host_cdrom:" , &filename); (void)has_prefix; ret = raw_normalize_devicepath(&filename); if (ret < 0) { error_setg_errno_internal((errp), "../block/file-posix.c", 2706, __func__, (-ret), ("Could not normalize device path")); return ret; } /* Read out options */ total_size = (((qemu_opt_get_size_del(opts, "size", 0)) + ((1ULL << 9)) - 1) & -(0 ? (qemu_opt_get_size_del(opts, "size", 0)) : ((1ULL << 9)))) ; fd = qemu_open(filename, # 2714 "../block/file-posix.c" 3 4 01 # 2714 "../block/file-posix.c" | 0); if (fd < 0) { ret = - # 2716 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2716 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 2717, __func__, (-ret), ("Could not open device")); return ret; } if (fstat(fd, &stat_buf) < 0) { ret = - # 2722 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2722 "../block/file-posix.c" ; error_setg_errno_internal((errp), "../block/file-posix.c", 2723, __func__, (-ret), ("Could not stat device")); } else if (! # 2724 "../block/file-posix.c" 3 4 (((( # 2724 "../block/file-posix.c" stat_buf.st_mode # 2724 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0060000 /* Block device. */)) # 2724 "../block/file-posix.c" && ! # 2724 "../block/file-posix.c" 3 4 (((( # 2724 "../block/file-posix.c" stat_buf.st_mode # 2724 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0020000 /* Character device. */)) # 2724 "../block/file-posix.c" ) { error_setg_internal((errp), "../block/file-posix.c" # 2725 "../block/file-posix.c" , 2726 # 2725 "../block/file-posix.c" , __func__, ("The given file is neither a block nor a character device")) ; ret = - # 2727 "../block/file-posix.c" 3 4 19 /* No such device */ # 2727 "../block/file-posix.c" ; } else if (lseek(fd, 0, # 2728 "../block/file-posix.c" 3 4 2 /* seek relative to end of file */ # 2728 "../block/file-posix.c" ) < total_size) { error_setg_internal((errp), "../block/file-posix.c", 2729, __func__, ("Device is too small")); ret = - # 2730 "../block/file-posix.c" 3 4 28 /* No space left on device */ # 2730 "../block/file-posix.c" ; } if (!ret && total_size) { uint8_t buf[(1ULL << 9)] = { 0 }; int64_t zero_size = # 2735 "../block/file-posix.c" 3 4 ((( # 2735 "../block/file-posix.c" (1ULL << 9) # 2735 "../block/file-posix.c" 3 4 )<( # 2735 "../block/file-posix.c" total_size # 2735 "../block/file-posix.c" 3 4 ))?( # 2735 "../block/file-posix.c" (1ULL << 9) # 2735 "../block/file-posix.c" 3 4 ):( # 2735 "../block/file-posix.c" total_size # 2735 "../block/file-posix.c" 3 4 )) # 2735 "../block/file-posix.c" ; if (lseek(fd, 0, # 2736 "../block/file-posix.c" 3 4 0 /* seek relative to beginning of file */ # 2736 "../block/file-posix.c" ) == -1) { ret = - # 2737 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2737 "../block/file-posix.c" ; } else { ret = qemu_write_full(fd, buf, zero_size); ret = ret == zero_size ? 0 : - # 2740 "../block/file-posix.c" 3 4 (*__errno_location ()) # 2740 "../block/file-posix.c" ; } } qemu_close(fd); return ret; } static BlockDriver bdrv_host_device = { .format_name = "host_device", .protocol_name = "host_device", .instance_size = sizeof(BDRVRawState), .bdrv_needs_filename = # 2751 "../block/file-posix.c" 3 4 1 # 2751 "../block/file-posix.c" , .bdrv_probe_device = hdev_probe_device, .bdrv_parse_filename = hdev_parse_filename, .bdrv_file_open = hdev_open, .bdrv_close = raw_close, .bdrv_reopen_prepare = raw_reopen_prepare, .bdrv_reopen_commit = raw_reopen_commit, .bdrv_reopen_abort = raw_reopen_abort, .bdrv_create = hdev_create, .create_opts = &raw_create_opts, .bdrv_co_pwrite_zeroes = hdev_co_pwrite_zeroes, .bdrv_co_preadv = raw_co_preadv, .bdrv_co_pwritev = raw_co_pwritev, .bdrv_aio_flush = raw_aio_flush, .bdrv_aio_pdiscard = hdev_aio_pdiscard, .bdrv_refresh_limits = raw_refresh_limits, .bdrv_io_plug = raw_aio_plug, .bdrv_io_unplug = raw_aio_unplug, .bdrv_truncate = raw_truncate, .bdrv_getlength = raw_getlength, .bdrv_get_info = raw_get_info, .bdrv_get_allocated_file_size = raw_get_allocated_file_size, .bdrv_check_perm = raw_check_perm, .bdrv_set_perm = raw_set_perm, .bdrv_abort_perm_update = raw_abort_perm_update, .bdrv_probe_blocksizes = hdev_probe_blocksizes, .bdrv_probe_geometry = hdev_probe_geometry, /* generic scsi device */ .bdrv_aio_ioctl = hdev_aio_ioctl, }; static void cdrom_parse_filename(const char *filename, QDict *options, Error **errp) { bdrv_parse_filename_strip_prefix(filename, "host_cdrom:", options); } static int cdrom_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVRawState *s = bs->opaque; s->type = 1; /* open will not fail even if no CD is inserted, so add O_NONBLOCK */ return raw_open_common(bs, options, flags, # 2805 "../block/file-posix.c" 3 4 04000 # 2805 "../block/file-posix.c" , errp); } static int cdrom_probe_device(const char *filename) { int fd, ret; int prio = 0; struct stat st; fd = qemu_open(filename, # 2814 "../block/file-posix.c" 3 4 00 # 2814 "../block/file-posix.c" | # 2814 "../block/file-posix.c" 3 4 04000 # 2814 "../block/file-posix.c" ); if (fd < 0) { goto out; } ret = fstat(fd, &st); if (ret == -1 || ! # 2819 "../block/file-posix.c" 3 4 (((( # 2819 "../block/file-posix.c" st.st_mode # 2819 "../block/file-posix.c" 3 4 )) & 0170000 /* These bits determine file type. */) == (0060000 /* Block device. */)) # 2819 "../block/file-posix.c" ) { goto outc; } /* Attempt to detect via a CDROM specific ioctl */ ret = ioctl(fd, # 2824 "../block/file-posix.c" 3 4 0x5326 /* Get tray position, etc. */ # 2824 "../block/file-posix.c" , 0x7fffffff); if (ret >= 0) prio = 100; outc: qemu_close(fd); out: return prio; } static # 2834 "../block/file-posix.c" 3 4 _Bool # 2834 "../block/file-posix.c" cdrom_is_inserted(BlockDriverState *bs) { BDRVRawState *s = bs->opaque; int ret; ret = ioctl(s->fd, # 2839 "../block/file-posix.c" 3 4 0x5326 /* Get tray position, etc. */ # 2839 "../block/file-posix.c" , 0x7fffffff); return ret == # 2840 "../block/file-posix.c" 3 4 4 # 2840 "../block/file-posix.c" ; } static void cdrom_eject(BlockDriverState *bs, # 2843 "../block/file-posix.c" 3 4 _Bool # 2843 "../block/file-posix.c" eject_flag) { BDRVRawState *s = bs->opaque; if (eject_flag) { if (ioctl(s->fd, # 2848 "../block/file-posix.c" 3 4 0x5309 /* Ejects the cdrom media */ # 2848 "../block/file-posix.c" , # 2848 "../block/file-posix.c" 3 4 ((void *)0) # 2848 "../block/file-posix.c" ) < 0) perror("CDROMEJECT"); } else { if (ioctl(s->fd, # 2851 "../block/file-posix.c" 3 4 0x5319 /* pendant of CDROMEJECT */ # 2851 "../block/file-posix.c" , # 2851 "../block/file-posix.c" 3 4 ((void *)0) # 2851 "../block/file-posix.c" ) < 0) perror("CDROMEJECT"); } } static void cdrom_lock_medium(BlockDriverState *bs, # 2856 "../block/file-posix.c" 3 4 _Bool # 2856 "../block/file-posix.c" locked) { BDRVRawState *s = bs->opaque; if (ioctl(s->fd, # 2860 "../block/file-posix.c" 3 4 0x5329 /* lock or unlock door */ # 2860 "../block/file-posix.c" , locked) < 0) { /* * Note: an error can happen if the distribution automatically * mounts the CD-ROM */ /* perror("CDROM_LOCKDOOR"); */ } } static BlockDriver bdrv_host_cdrom = { .format_name = "host_cdrom", .protocol_name = "host_cdrom", .instance_size = sizeof(BDRVRawState), .bdrv_needs_filename = # 2873 "../block/file-posix.c" 3 4 1 # 2873 "../block/file-posix.c" , .bdrv_probe_device = cdrom_probe_device, .bdrv_parse_filename = cdrom_parse_filename, .bdrv_file_open = cdrom_open, .bdrv_close = raw_close, .bdrv_reopen_prepare = raw_reopen_prepare, .bdrv_reopen_commit = raw_reopen_commit, .bdrv_reopen_abort = raw_reopen_abort, .bdrv_create = hdev_create, .create_opts = &raw_create_opts, .bdrv_co_preadv = raw_co_preadv, .bdrv_co_pwritev = raw_co_pwritev, .bdrv_aio_flush = raw_aio_flush, .bdrv_refresh_limits = raw_refresh_limits, .bdrv_io_plug = raw_aio_plug, .bdrv_io_unplug = raw_aio_unplug, .bdrv_truncate = raw_truncate, .bdrv_getlength = raw_getlength, .has_variable_length = # 2894 "../block/file-posix.c" 3 4 1 # 2894 "../block/file-posix.c" , .bdrv_get_allocated_file_size = raw_get_allocated_file_size, /* removable device support */ .bdrv_is_inserted = cdrom_is_inserted, .bdrv_eject = cdrom_eject, .bdrv_lock_medium = cdrom_lock_medium, /* generic scsi device */ .bdrv_aio_ioctl = hdev_aio_ioctl, }; # 3035 "../block/file-posix.c" static void bdrv_file_init(void) { /* * Register all the drivers. Note that order is important, the driver * registered last will get probed first. */ bdrv_register(&bdrv_file); bdrv_register(&bdrv_host_device); bdrv_register(&bdrv_host_cdrom); } static void __attribute__((constructor)) do_qemu_init_bdrv_file_init(void) { register_module_init(bdrv_file_init, MODULE_INIT_BLOCK); };