annotate src/os/windows/vm/hpi_windows.hpp @ 1972:f95d63e2154a

6989984: Use standard include model for Hospot Summary: Replaced MakeDeps and the includeDB files with more standardized solutions. Reviewed-by: coleenp, kvn, kamg
author stefank
date Tue, 23 Nov 2010 13:22:55 -0800
parents c18cbe5936b8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
2 * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 222
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 222
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 222
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #ifndef OS_WINDOWS_VM_HPI_WINDOWS_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #define OS_WINDOWS_VM_HPI_WINDOWS_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27
0
a61af66fc99e Initial load
duke
parents:
diff changeset
28 // Win32 delegates these to the HPI. Solaris provides its own
a61af66fc99e Initial load
duke
parents:
diff changeset
29 // implementation without using the HPI (for Interrupitble I/O).
a61af66fc99e Initial load
duke
parents:
diff changeset
30
a61af66fc99e Initial load
duke
parents:
diff changeset
31 // HPI_FileInterface
a61af66fc99e Initial load
duke
parents:
diff changeset
32
a61af66fc99e Initial load
duke
parents:
diff changeset
33 HPIDECL(close, "close", _file, Close, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
34 (int fd),
a61af66fc99e Initial load
duke
parents:
diff changeset
35 ("fd = %d", fd),
a61af66fc99e Initial load
duke
parents:
diff changeset
36 (fd));
a61af66fc99e Initial load
duke
parents:
diff changeset
37
a61af66fc99e Initial load
duke
parents:
diff changeset
38 HPIDECL(read, "read", _file, Read, size_t, "%ld",
a61af66fc99e Initial load
duke
parents:
diff changeset
39 (int fd, void *buf, unsigned int nBytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
40 ("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
41 (fd, buf, nBytes));
a61af66fc99e Initial load
duke
parents:
diff changeset
42
a61af66fc99e Initial load
duke
parents:
diff changeset
43 HPIDECL(write, "write", _file, Write, size_t, "%ld",
a61af66fc99e Initial load
duke
parents:
diff changeset
44 (int fd, const void *buf, unsigned int nBytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
45 ("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
46 (fd, buf, nBytes));
a61af66fc99e Initial load
duke
parents:
diff changeset
47
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49 // HPI_SocketInterface
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 HPIDECL(socket_close, "socket_close", _socket, Close, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
52 (int fd),
a61af66fc99e Initial load
duke
parents:
diff changeset
53 ("fd = %d", fd),
a61af66fc99e Initial load
duke
parents:
diff changeset
54 (fd));
a61af66fc99e Initial load
duke
parents:
diff changeset
55
a61af66fc99e Initial load
duke
parents:
diff changeset
56 HPIDECL(socket_available, "socket_available", _socket, Available,
a61af66fc99e Initial load
duke
parents:
diff changeset
57 int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
58 (int fd, jint *pbytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
59 ("fd = %d, pbytes = %p", fd, pbytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
60 (fd, pbytes));
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 HPIDECL(socket, "socket", _socket, Socket, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
63 (int domain, int type, int protocol),
a61af66fc99e Initial load
duke
parents:
diff changeset
64 ("domain = %d, type = %d, protocol = %d", domain, type, protocol),
a61af66fc99e Initial load
duke
parents:
diff changeset
65 (domain, type, protocol));
a61af66fc99e Initial load
duke
parents:
diff changeset
66
a61af66fc99e Initial load
duke
parents:
diff changeset
67 HPIDECL(listen, "listen", _socket, Listen, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
68 (int fd, int count),
a61af66fc99e Initial load
duke
parents:
diff changeset
69 ("fd = %d, count = %d", fd, count),
a61af66fc99e Initial load
duke
parents:
diff changeset
70 (fd, count));
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 HPIDECL(connect, "connect", _socket, Connect, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
73 (int fd, struct sockaddr *him, int len),
a61af66fc99e Initial load
duke
parents:
diff changeset
74 ("fd = %d, him = %p, len = %d", fd, him, len),
a61af66fc99e Initial load
duke
parents:
diff changeset
75 (fd, him, len));
a61af66fc99e Initial load
duke
parents:
diff changeset
76
a61af66fc99e Initial load
duke
parents:
diff changeset
77 HPIDECL(accept, "accept", _socket, Accept, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
78 (int fd, struct sockaddr *him, int *len),
a61af66fc99e Initial load
duke
parents:
diff changeset
79 ("fd = %d, him = %p, len = %p", fd, him, len),
a61af66fc99e Initial load
duke
parents:
diff changeset
80 (fd, him, len));
a61af66fc99e Initial load
duke
parents:
diff changeset
81
a61af66fc99e Initial load
duke
parents:
diff changeset
82 HPIDECL(sendto, "sendto", _socket, SendTo, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
83 (int fd, char *buf, int len, int flags,
a61af66fc99e Initial load
duke
parents:
diff changeset
84 struct sockaddr *to, int tolen),
a61af66fc99e Initial load
duke
parents:
diff changeset
85 ("fd = %d, buf = %p, len = %d, flags = %d, to = %p, tolen = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
86 fd, buf, len, flags, to, tolen),
a61af66fc99e Initial load
duke
parents:
diff changeset
87 (fd, buf, len, flags, to, tolen));
a61af66fc99e Initial load
duke
parents:
diff changeset
88
a61af66fc99e Initial load
duke
parents:
diff changeset
89 HPIDECL(recvfrom, "recvfrom", _socket, RecvFrom, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
90 (int fd, char *buf, int nbytes, int flags,
a61af66fc99e Initial load
duke
parents:
diff changeset
91 struct sockaddr *from, int *fromlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
92 ("fd = %d, buf = %p, len = %d, flags = %d, frm = %p, frmlen = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
93 fd, buf, nbytes, flags, from, fromlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
94 (fd, buf, nbytes, flags, from, fromlen));
a61af66fc99e Initial load
duke
parents:
diff changeset
95
a61af66fc99e Initial load
duke
parents:
diff changeset
96 HPIDECL(recv, "recv", _socket, Recv, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
97 (int fd, char *buf, int nBytes, int flags),
a61af66fc99e Initial load
duke
parents:
diff changeset
98 ("fd = %d, buf = %p, nBytes = %d, flags = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
99 fd, buf, nBytes, flags),
a61af66fc99e Initial load
duke
parents:
diff changeset
100 (fd, buf, nBytes, flags));
a61af66fc99e Initial load
duke
parents:
diff changeset
101
a61af66fc99e Initial load
duke
parents:
diff changeset
102 HPIDECL(send, "send", _socket, Send, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
103 (int fd, char *buf, int nBytes, int flags),
a61af66fc99e Initial load
duke
parents:
diff changeset
104 ("fd = %d, buf = %p, nBytes = %d, flags = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
105 fd, buf, nBytes, flags),
a61af66fc99e Initial load
duke
parents:
diff changeset
106 (fd, buf, nBytes, flags));
a61af66fc99e Initial load
duke
parents:
diff changeset
107
222
2a1a77d3458f 6718676: putback for 6604014 is incomplete
never
parents: 0
diff changeset
108 inline int hpi::raw_send(int fd, char *buf, int nBytes, int flags) {
2a1a77d3458f 6718676: putback for 6604014 is incomplete
never
parents: 0
diff changeset
109 return send(fd, buf, nBytes, flags);
2a1a77d3458f 6718676: putback for 6604014 is incomplete
never
parents: 0
diff changeset
110 }
2a1a77d3458f 6718676: putback for 6604014 is incomplete
never
parents: 0
diff changeset
111
0
a61af66fc99e Initial load
duke
parents:
diff changeset
112 HPIDECL(timeout, "timeout", _socket, Timeout, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
113 (int fd, long timeout),
a61af66fc99e Initial load
duke
parents:
diff changeset
114 ("fd = %d, timeout = %ld", fd, timeout),
a61af66fc99e Initial load
duke
parents:
diff changeset
115 (fd, timeout));
a61af66fc99e Initial load
duke
parents:
diff changeset
116
a61af66fc99e Initial load
duke
parents:
diff changeset
117 HPIDECL(get_host_by_name, "get_host_by_name", _socket, GetHostByName,
a61af66fc99e Initial load
duke
parents:
diff changeset
118 struct hostent *, "(struct hostent *)%p",
a61af66fc99e Initial load
duke
parents:
diff changeset
119 (char *name),
a61af66fc99e Initial load
duke
parents:
diff changeset
120 ("%s", name),
a61af66fc99e Initial load
duke
parents:
diff changeset
121 (name));
a61af66fc99e Initial load
duke
parents:
diff changeset
122
a61af66fc99e Initial load
duke
parents:
diff changeset
123 HPIDECL(socket_shutdown, "socket_shutdown", _socket, SocketShutdown,
a61af66fc99e Initial load
duke
parents:
diff changeset
124 int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
125 (int fd, int howto),
a61af66fc99e Initial load
duke
parents:
diff changeset
126 ("fd = %d, howto = %d", fd, howto),
a61af66fc99e Initial load
duke
parents:
diff changeset
127 (fd, howto));
a61af66fc99e Initial load
duke
parents:
diff changeset
128
a61af66fc99e Initial load
duke
parents:
diff changeset
129 HPIDECL(bind, "bind", _socket, Bind,
a61af66fc99e Initial load
duke
parents:
diff changeset
130 int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
131 (int fd, struct sockaddr *him, int len),
a61af66fc99e Initial load
duke
parents:
diff changeset
132 ("fd = %d, him = %p, len = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
133 fd, him, len),
a61af66fc99e Initial load
duke
parents:
diff changeset
134 (fd, him, len));
a61af66fc99e Initial load
duke
parents:
diff changeset
135
a61af66fc99e Initial load
duke
parents:
diff changeset
136 HPIDECL(get_sock_name, "get_sock_name", _socket, GetSocketName,
a61af66fc99e Initial load
duke
parents:
diff changeset
137 int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
138 (int fd, struct sockaddr *him, int *len),
a61af66fc99e Initial load
duke
parents:
diff changeset
139 ("fd = %d, him = %p, len = %p",
a61af66fc99e Initial load
duke
parents:
diff changeset
140 fd, him, len),
a61af66fc99e Initial load
duke
parents:
diff changeset
141 (fd, him, len));
a61af66fc99e Initial load
duke
parents:
diff changeset
142
a61af66fc99e Initial load
duke
parents:
diff changeset
143 HPIDECL(get_host_name, "get_host_name", _socket, GetHostName, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
144 (char *hostname, int namelen),
a61af66fc99e Initial load
duke
parents:
diff changeset
145 ("hostname = %p, namelen = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
146 hostname, namelen),
a61af66fc99e Initial load
duke
parents:
diff changeset
147 (hostname, namelen));
a61af66fc99e Initial load
duke
parents:
diff changeset
148
a61af66fc99e Initial load
duke
parents:
diff changeset
149 HPIDECL(get_host_by_addr, "get_host_by_addr", _socket, GetHostByAddr,
a61af66fc99e Initial load
duke
parents:
diff changeset
150 struct hostent *, "(struct hostent *)%p",
a61af66fc99e Initial load
duke
parents:
diff changeset
151 (const char* name, int len, int type),
a61af66fc99e Initial load
duke
parents:
diff changeset
152 ("name = %p, len = %d, type = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
153 name, len, type),
a61af66fc99e Initial load
duke
parents:
diff changeset
154 (name, len, type));
a61af66fc99e Initial load
duke
parents:
diff changeset
155
a61af66fc99e Initial load
duke
parents:
diff changeset
156 HPIDECL(get_sock_opt, "get_sock_opt", _socket, SocketGetOption, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
157 (int fd, int level, int optname, char *optval, int* optlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
158 ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %p",
a61af66fc99e Initial load
duke
parents:
diff changeset
159 fd, level, optname, optval, optlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
160 (fd, level, optname, optval, optlen));
a61af66fc99e Initial load
duke
parents:
diff changeset
161
a61af66fc99e Initial load
duke
parents:
diff changeset
162 HPIDECL(set_sock_opt, "set_sock_opt", _socket, SocketSetOption, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
163 (int fd, int level, int optname, const char *optval, int optlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
164 ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
165 fd, level, optname, optval, optlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
166 (fd, level, optname, optval, optlen));
a61af66fc99e Initial load
duke
parents:
diff changeset
167
a61af66fc99e Initial load
duke
parents:
diff changeset
168 HPIDECL(get_proto_by_name, "get_proto_by_name", _socket, GetProtoByName,
a61af66fc99e Initial load
duke
parents:
diff changeset
169 struct protoent *, "(struct protoent *)%p",
a61af66fc99e Initial load
duke
parents:
diff changeset
170 (char* name),
a61af66fc99e Initial load
duke
parents:
diff changeset
171 ("name = %p",
a61af66fc99e Initial load
duke
parents:
diff changeset
172 name),
a61af66fc99e Initial load
duke
parents:
diff changeset
173 (name));
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
174
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
175 #endif // OS_WINDOWS_VM_HPI_WINDOWS_HPP