| 1 | /* |
| 2 | * BSD conversion extern declarations |
| 3 | * |
| 4 | * Copyright (c) 2013 Stacey D. Son |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 7 | */ |
| 8 | #ifndef QEMU_BSD_H |
| 9 | #define QEMU_BSD_H |
| 10 | |
| 11 | #include <sys/resource.h> |
| 12 | #include <sys/ipc.h> |
| 13 | #include <sys/msg.h> |
| 14 | #include <sys/resource.h> |
| 15 | #include <sys/sem.h> |
| 16 | #include <sys/shm.h> |
| 17 | #include <sys/socket.h> |
| 18 | #include <sys/un.h> |
| 19 | #include <sys/uuid.h> |
| 20 | #include <sys/wait.h> |
| 21 | #include <netinet/in.h> |
| 22 | |
| 23 | /* bsd-proc.c */ |
| 24 | int target_to_host_resource(int code); |
| 25 | rlim_t target_to_host_rlim(abi_llong target_rlim); |
| 26 | abi_llong host_to_target_rlim(rlim_t rlim); |
| 27 | abi_long host_to_target_rusage(abi_ulong target_addr, |
| 28 | const struct rusage *rusage); |
| 29 | abi_long host_to_target_wrusage(abi_ulong target_addr, |
| 30 | const struct __wrusage *wrusage); |
| 31 | int host_to_target_waitstatus(int status); |
| 32 | void h2g_rusage(const struct rusage *rusage, |
| 33 | struct target_freebsd_rusage *target_rusage); |
| 34 | |
| 35 | /* bsd-mem.c */ |
| 36 | void target_to_host_ipc_perm__locked(struct ipc_perm *host_ip, |
| 37 | struct target_ipc_perm *target_ip); |
| 38 | void host_to_target_ipc_perm__locked(struct target_ipc_perm *target_ip, |
| 39 | struct ipc_perm *host_ip); |
| 40 | abi_long target_to_host_shmid_ds(struct shmid_ds *host_sd, |
| 41 | abi_ulong target_addr); |
| 42 | abi_long host_to_target_shmid_ds(abi_ulong target_addr, |
| 43 | struct shmid_ds *host_sd); |
| 44 | |
| 45 | /* bsd-misc.c */ |
| 46 | abi_long host_to_target_uuid(abi_ulong target_addr, struct uuid *host_uuid); |
| 47 | abi_long target_to_host_semarray(int semid, unsigned short **host_array, |
| 48 | abi_ulong target_addr); |
| 49 | abi_long host_to_target_semarray(int semid, abi_ulong target_addr, |
| 50 | unsigned short **host_array); |
| 51 | abi_long target_to_host_semid_ds(struct semid_ds *host_sd, |
| 52 | abi_ulong target_addr); |
| 53 | abi_long host_to_target_semid_ds(abi_ulong target_addr, |
| 54 | struct semid_ds *host_sd); |
| 55 | abi_long target_to_host_msqid_ds(struct msqid_ds *host_md, |
| 56 | abi_ulong target_addr); |
| 57 | abi_long host_to_target_msqid_ds(abi_ulong target_addr, |
| 58 | struct msqid_ds *host_md); |
| 59 | |
| 60 | #endif /* QEMU_BSD_H */ |