2 * Copyright (c) 2006-2008 University of Zagreb
3 * Copyright (c) 2006-2008 FreeBSD Foundation
5 * This software was developed by the University of Zagreb and the
6 * FreeBSD Foundation under sponsorship by the Stichting NLnet and the
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 #ifndef _SYS_VIMAGE_H_
34 #define _SYS_VIMAGE_H_
36 /* Non-VIMAGE null-macros */
37 #define CURVNET_SET(arg)
38 #define CURVNET_SET_QUIET(arg)
39 #define CURVNET_RESTORE()
40 #define VNET_ASSERT(condition)
41 #define VSYM(base, sym) (sym)
42 #define INIT_FROM_VNET(vnet, modindex, modtype, sym)
43 #define VNET_ITERATOR_DECL(arg)
44 #define VNET_FOREACH(arg)
45 #define VNET_LIST_RLOCK()
46 #define VNET_LIST_RUNLOCK()
47 #define INIT_VPROCG(arg)
48 #define INIT_VCPU(arg)
49 #define TD_TO_VIMAGE(td)
50 #define TD_TO_VNET(td)
51 #define TD_TO_VPROCG(td)
52 #define TD_TO_VCPU(td)
53 #define P_TO_VIMAGE(p)
55 #define P_TO_VPROCG(p)
58 /* XXX those defines bellow should probably go into vprocg.h and vcpu.h */
59 #define VPROCG(sym) VSYM(vprocg, sym)
60 #define VCPU(sym) VSYM(vcpu, sym)
62 #define V_hostname VPROCG(hostname)
63 #define G_hostname VSYM(basevprocg, hostname) /* global hostname */
64 #define V_domainname VPROCG(domainname)
66 #endif /* !_SYS_VIMAGE_H_ */