1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU Lesser General Public License as published
4 * by the Free Software Foundation; version 2.1 only. with the special
5 * exception on linking described in file LICENSE.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU Lesser General Public License for more details.
11 *
12 * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
13 */
14
15 #ifndef LIBXL_X86_ACPI_H
16 #define LIBXL_X86_ACPI_H
17
18 #include "libxl_internal.h"
19
20 #define ASSERT(x) assert(x)
21
test_bit(unsigned int b,const void * p)22 static inline int test_bit(unsigned int b, const void *p)
23 {
24 return !!(((const uint8_t *)p)[b>>3] & (1u<<(b&7)));
25 }
26
27 #endif /* LIBXL_X_86_ACPI_H */
28
29 /*
30 * Local variables:
31 * mode: C
32 * c-basic-offset: 4
33 * indent-tabs-mode: nil
34 * End:
35 */
36