Statistics
| Branch: | Revision:

root / qemu-os-posix.h @ a74cdab4

History | View | Annotate | Download (1.8 kB)

1 0d93ca7c Jes Sorensen
/*
2 0d93ca7c Jes Sorensen
 * posix specific declarations
3 0d93ca7c Jes Sorensen
 *
4 0d93ca7c Jes Sorensen
 * Copyright (c) 2003-2008 Fabrice Bellard
5 0d93ca7c Jes Sorensen
 * Copyright (c) 2010 Jes Sorensen <Jes.Sorensen@redhat.com>
6 0d93ca7c Jes Sorensen
 *
7 0d93ca7c Jes Sorensen
 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 0d93ca7c Jes Sorensen
 * of this software and associated documentation files (the "Software"), to deal
9 0d93ca7c Jes Sorensen
 * in the Software without restriction, including without limitation the rights
10 0d93ca7c Jes Sorensen
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 0d93ca7c Jes Sorensen
 * copies of the Software, and to permit persons to whom the Software is
12 0d93ca7c Jes Sorensen
 * furnished to do so, subject to the following conditions:
13 0d93ca7c Jes Sorensen
 *
14 0d93ca7c Jes Sorensen
 * The above copyright notice and this permission notice shall be included in
15 0d93ca7c Jes Sorensen
 * all copies or substantial portions of the Software.
16 0d93ca7c Jes Sorensen
 *
17 0d93ca7c Jes Sorensen
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 0d93ca7c Jes Sorensen
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 0d93ca7c Jes Sorensen
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 0d93ca7c Jes Sorensen
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 0d93ca7c Jes Sorensen
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 0d93ca7c Jes Sorensen
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 0d93ca7c Jes Sorensen
 * THE SOFTWARE.
24 0d93ca7c Jes Sorensen
 */
25 0d93ca7c Jes Sorensen
26 0d93ca7c Jes Sorensen
#ifndef QEMU_OS_POSIX_H
27 0d93ca7c Jes Sorensen
#define QEMU_OS_POSIX_H
28 0d93ca7c Jes Sorensen
29 0d93ca7c Jes Sorensen
static inline void os_host_main_loop_wait(int *timeout)
30 0d93ca7c Jes Sorensen
{
31 0d93ca7c Jes Sorensen
}
32 0d93ca7c Jes Sorensen
33 9156d763 Jes Sorensen
void os_set_line_buffering(void);
34 ce798cf2 Jes Sorensen
void os_set_proc_name(const char *s);
35 8d963e6a Jes Sorensen
void os_setup_signal_handling(void);
36 eb505be1 Jes Sorensen
void os_daemonize(void);
37 eb505be1 Jes Sorensen
void os_setup_post(void);
38 8d963e6a Jes Sorensen
39 dc786bc9 Jes Sorensen
typedef struct timeval qemu_timeval;
40 dc786bc9 Jes Sorensen
#define qemu_gettimeofday(tp) gettimeofday(tp, NULL)
41 dc786bc9 Jes Sorensen
42 38671423 Hidetoshi Seto
#ifndef CONFIG_UTIMENSAT
43 38671423 Hidetoshi Seto
#ifndef UTIME_NOW
44 38671423 Hidetoshi Seto
# define UTIME_NOW     ((1l << 30) - 1l)
45 38671423 Hidetoshi Seto
#endif
46 38671423 Hidetoshi Seto
#ifndef UTIME_OMIT
47 38671423 Hidetoshi Seto
# define UTIME_OMIT    ((1l << 30) - 2l)
48 38671423 Hidetoshi Seto
#endif
49 38671423 Hidetoshi Seto
#endif
50 38671423 Hidetoshi Seto
typedef struct timespec qemu_timespec;
51 38671423 Hidetoshi Seto
int qemu_utimensat(int dirfd, const char *path, const qemu_timespec *times,
52 38671423 Hidetoshi Seto
    int flags);
53 38671423 Hidetoshi Seto
54 0d93ca7c Jes Sorensen
#endif