xref: /qemu/bsd-user/qemu-bsd.h (revision 1d4c4026)
100bff01fSStacey Son /*
200bff01fSStacey Son  *  BSD conversion extern declarations
300bff01fSStacey Son  *
400bff01fSStacey Son  *  Copyright (c) 2013 Stacey D. Son
500bff01fSStacey Son  *
600bff01fSStacey Son  *  This program is free software; you can redistribute it and/or modify
700bff01fSStacey Son  *  it under the terms of the GNU General Public License as published by
800bff01fSStacey Son  *  the Free Software Foundation; either version 2 of the License, or
900bff01fSStacey Son  *  (at your option) any later version.
1000bff01fSStacey Son  *
1100bff01fSStacey Son  *  This program is distributed in the hope that it will be useful,
1200bff01fSStacey Son  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
1300bff01fSStacey Son  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1400bff01fSStacey Son  *  GNU General Public License for more details.
1500bff01fSStacey Son  *
1600bff01fSStacey Son  *  You should have received a copy of the GNU General Public License
1700bff01fSStacey Son  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
1800bff01fSStacey Son  */
1900bff01fSStacey Son 
2000bff01fSStacey Son #ifndef QEMU_BSD_H
2100bff01fSStacey Son #define QEMU_BSD_H
2200bff01fSStacey Son 
2300bff01fSStacey Son #include <sys/types.h>
2400bff01fSStacey Son #include <sys/resource.h>
251d4c4026SStacey Son #include <sys/ipc.h>
261d4c4026SStacey Son #include <sys/msg.h>
271d4c4026SStacey Son #include <sys/resource.h>
281d4c4026SStacey Son #include <sys/sem.h>
291d4c4026SStacey Son #include <sys/shm.h>
301d4c4026SStacey Son #include <sys/socket.h>
311d4c4026SStacey Son #include <sys/un.h>
321d4c4026SStacey Son #include <sys/uuid.h>
331d4c4026SStacey Son #include <sys/wait.h>
341d4c4026SStacey Son #include <netinet/in.h>
3500bff01fSStacey Son 
3600bff01fSStacey Son /* bsd-proc.c */
3700bff01fSStacey Son int target_to_host_resource(int code);
3800bff01fSStacey Son rlim_t target_to_host_rlim(abi_llong target_rlim);
3900bff01fSStacey Son abi_llong host_to_target_rlim(rlim_t rlim);
4000bff01fSStacey Son abi_long host_to_target_rusage(abi_ulong target_addr,
4100bff01fSStacey Son         const struct rusage *rusage);
4200bff01fSStacey Son abi_long host_to_target_wrusage(abi_ulong target_addr,
4300bff01fSStacey Son         const struct __wrusage *wrusage);
4400bff01fSStacey Son int host_to_target_waitstatus(int status);
4500bff01fSStacey Son void h2g_rusage(const struct rusage *rusage,
4600bff01fSStacey Son         struct target_freebsd_rusage *target_rusage);
4700bff01fSStacey Son 
481d4c4026SStacey Son /* bsd-mem.c */
491d4c4026SStacey Son void target_to_host_ipc_perm__locked(struct ipc_perm *host_ip,
501d4c4026SStacey Son         struct target_ipc_perm *target_ip);
511d4c4026SStacey Son void host_to_target_ipc_perm__locked(struct target_ipc_perm *target_ip,
521d4c4026SStacey Son         struct ipc_perm *host_ip);
531d4c4026SStacey Son abi_long target_to_host_shmid_ds(struct shmid_ds *host_sd,
541d4c4026SStacey Son         abi_ulong target_addr);
551d4c4026SStacey Son abi_long host_to_target_shmid_ds(abi_ulong target_addr,
561d4c4026SStacey Son         struct shmid_ds *host_sd);
571d4c4026SStacey Son 
5800bff01fSStacey Son #endif /* QEMU_BSD_H */
59