1 /******************************************************************************
2  *
3  * Copyright 2007-2008 Samuel Thibault <samuel.thibault@eu.citrix.com>.
4  * All rights reserved.
5  * Use is subject to license terms.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation;
10  * version 2.1 of the License.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #undef NDEBUG
22 #include <mini-os/types.h>
23 #include <mini-os/os.h>
24 #include <mini-os/mm.h>
25 #include <mini-os/lib.h>
26 
27 #include <xen/memory.h>
28 #include <unistd.h>
29 #include <fcntl.h>
30 #include <stdio.h>
31 #include <assert.h>
32 #include <stdint.h>
33 #include <inttypes.h>
34 #include <malloc.h>
35 
36 #include "xc_private.h"
37 
38 /* Optionally flush file to disk and discard page cache */
discard_file_cache(xc_interface * xch,int fd,int flush)39 void discard_file_cache(xc_interface *xch, int fd, int flush)
40 {
41     if (flush)
42         fsync(fd);
43 }
44 
xc_memalign(xc_interface * xch,size_t alignment,size_t size)45 void *xc_memalign(xc_interface *xch, size_t alignment, size_t size)
46 {
47     return memalign(alignment, size);
48 }
49 
xc_pcidev_get_gsi(xc_interface * xch,uint32_t sbdf)50 int xc_pcidev_get_gsi(xc_interface *xch, uint32_t sbdf)
51 {
52     errno = ENOSYS;
53     return -1;
54 }
55 
56 /*
57  * Local variables:
58  * mode: C
59  * c-file-style: "BSD"
60  * c-basic-offset: 4
61  * tab-width: 4
62  * indent-tabs-mode: nil
63  * End:
64  */
65