spapr: move VCPU calculation to core machine code
[qemu.git] / pc-bios / s390-ccw / libc.h
blob0142ea8e7bcd4193705c355bec876eafbcd604af
1 /*
2 * libc-style definitions and functions
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 */
10 #ifndef S390_CCW_LIBC_H
11 #define S390_CCW_LIBC_H
13 typedef long size_t;
14 typedef int bool;
15 typedef unsigned char uint8_t;
16 typedef unsigned short uint16_t;
17 typedef unsigned int uint32_t;
18 typedef unsigned long long uint64_t;
20 static inline void *memset(void *s, int c, size_t n)
22 int i;
23 unsigned char *p = s;
25 for (i = 0; i < n; i++) {
26 p[i] = c;
29 return s;
32 static inline void *memcpy(void *s1, const void *s2, size_t n)
34 uint8_t *dest = s1;
35 const uint8_t *src = s2;
36 int i;
38 for (i = 0; i < n; i++) {
39 dest[i] = src[i];
42 return s1;
45 #endif