annotate src/os/windows/vm/hpi_windows.hpp @ 1552:c18cbe5936b8

6941466: Oracle rebranding changes for Hotspot repositories Summary: Change all the Sun copyrights to Oracle copyright Reviewed-by: ohair
author trims
date Thu, 27 May 2010 19:08:38 -0700
parents 2a1a77d3458f
children f95d63e2154a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 222
diff changeset
2 * Copyright (c) 1998, 2005, 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
a61af66fc99e Initial load
duke
parents:
diff changeset
25 // Win32 delegates these to the HPI. Solaris provides its own
a61af66fc99e Initial load
duke
parents:
diff changeset
26 // implementation without using the HPI (for Interrupitble I/O).
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 // HPI_FileInterface
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 HPIDECL(close, "close", _file, Close, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
31 (int fd),
a61af66fc99e Initial load
duke
parents:
diff changeset
32 ("fd = %d", fd),
a61af66fc99e Initial load
duke
parents:
diff changeset
33 (fd));
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 HPIDECL(read, "read", _file, Read, size_t, "%ld",
a61af66fc99e Initial load
duke
parents:
diff changeset
36 (int fd, void *buf, unsigned int nBytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
37 ("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
38 (fd, buf, nBytes));
a61af66fc99e Initial load
duke
parents:
diff changeset
39
a61af66fc99e Initial load
duke
parents:
diff changeset
40 HPIDECL(write, "write", _file, Write, size_t, "%ld",
a61af66fc99e Initial load
duke
parents:
diff changeset
41 (int fd, const void *buf, unsigned int nBytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
42 ("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
43 (fd, buf, nBytes));
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45
a61af66fc99e Initial load
duke
parents:
diff changeset
46 // HPI_SocketInterface
a61af66fc99e Initial load
duke
parents:
diff changeset
47
a61af66fc99e Initial load
duke
parents:
diff changeset
48 HPIDECL(socket_close, "socket_close", _socket, Close, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
49 (int fd),
a61af66fc99e Initial load
duke
parents:
diff changeset
50 ("fd = %d", fd),
a61af66fc99e Initial load
duke
parents:
diff changeset
51 (fd));
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 HPIDECL(socket_available, "socket_available", _socket, Available,
a61af66fc99e Initial load
duke
parents:
diff changeset
54 int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
55 (int fd, jint *pbytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
56 ("fd = %d, pbytes = %p", fd, pbytes),
a61af66fc99e Initial load
duke
parents:
diff changeset
57 (fd, pbytes));
a61af66fc99e Initial load
duke
parents:
diff changeset
58
a61af66fc99e Initial load
duke
parents:
diff changeset
59 HPIDECL(socket, "socket", _socket, Socket, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
60 (int domain, int type, int protocol),
a61af66fc99e Initial load
duke
parents:
diff changeset
61 ("domain = %d, type = %d, protocol = %d", domain, type, protocol),
a61af66fc99e Initial load
duke
parents:
diff changeset
62 (domain, type, protocol));
a61af66fc99e Initial load
duke
parents:
diff changeset
63
a61af66fc99e Initial load
duke
parents:
diff changeset
64 HPIDECL(listen, "listen", _socket, Listen, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
65 (int fd, int count),
a61af66fc99e Initial load
duke
parents:
diff changeset
66 ("fd = %d, count = %d", fd, count),
a61af66fc99e Initial load
duke
parents:
diff changeset
67 (fd, count));
a61af66fc99e Initial load
duke
parents:
diff changeset
68
a61af66fc99e Initial load
duke
parents:
diff changeset
69 HPIDECL(connect, "connect", _socket, Connect, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
70 (int fd, struct sockaddr *him, int len),
a61af66fc99e Initial load
duke
parents:
diff changeset
71 ("fd = %d, him = %p, len = %d", fd, him, len),
a61af66fc99e Initial load
duke
parents:
diff changeset
72 (fd, him, len));
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 HPIDECL(accept, "accept", _socket, Accept, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
75 (int fd, struct sockaddr *him, int *len),
a61af66fc99e Initial load
duke
parents:
diff changeset
76 ("fd = %d, him = %p, len = %p", fd, him, len),
a61af66fc99e Initial load
duke
parents:
diff changeset
77 (fd, him, len));
a61af66fc99e Initial load
duke
parents:
diff changeset
78
a61af66fc99e Initial load
duke
parents:
diff changeset
79 HPIDECL(sendto, "sendto", _socket, SendTo, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
80 (int fd, char *buf, int len, int flags,
a61af66fc99e Initial load
duke
parents:
diff changeset
81 struct sockaddr *to, int tolen),
a61af66fc99e Initial load
duke
parents:
diff changeset
82 ("fd = %d, buf = %p, len = %d, flags = %d, to = %p, tolen = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
83 fd, buf, len, flags, to, tolen),
a61af66fc99e Initial load
duke
parents:
diff changeset
84 (fd, buf, len, flags, to, tolen));
a61af66fc99e Initial load
duke
parents:
diff changeset
85
a61af66fc99e Initial load
duke
parents:
diff changeset
86 HPIDECL(recvfrom, "recvfrom", _socket, RecvFrom, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
87 (int fd, char *buf, int nbytes, int flags,
a61af66fc99e Initial load
duke
parents:
diff changeset
88 struct sockaddr *from, int *fromlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
89 ("fd = %d, buf = %p, len = %d, flags = %d, frm = %p, frmlen = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
90 fd, buf, nbytes, flags, from, fromlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
91 (fd, buf, nbytes, flags, from, fromlen));
a61af66fc99e Initial load
duke
parents:
diff changeset
92
a61af66fc99e Initial load
duke
parents:
diff changeset
93 HPIDECL(recv, "recv", _socket, Recv, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
94 (int fd, char *buf, int nBytes, int flags),
a61af66fc99e Initial load
duke
parents:
diff changeset
95 ("fd = %d, buf = %p, nBytes = %d, flags = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
96 fd, buf, nBytes, flags),
a61af66fc99e Initial load
duke
parents:
diff changeset
97 (fd, buf, nBytes, flags));
a61af66fc99e Initial load
duke
parents:
diff changeset
98
a61af66fc99e Initial load
duke
parents:
diff changeset
99 HPIDECL(send, "send", _socket, Send, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
100 (int fd, char *buf, int nBytes, int flags),
a61af66fc99e Initial load
duke
parents:
diff changeset
101 ("fd = %d, buf = %p, nBytes = %d, flags = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
102 fd, buf, nBytes, flags),
a61af66fc99e Initial load
duke
parents:
diff changeset
103 (fd, buf, nBytes, flags));
a61af66fc99e Initial load
duke
parents:
diff changeset
104
222
2a1a77d3458f 6718676: putback for 6604014 is incomplete
never
parents: 0
diff changeset
105 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
106 return send(fd, buf, nBytes, flags);
2a1a77d3458f 6718676: putback for 6604014 is incomplete
never
parents: 0
diff changeset
107 }
2a1a77d3458f 6718676: putback for 6604014 is incomplete
never
parents: 0
diff changeset
108
0
a61af66fc99e Initial load
duke
parents:
diff changeset
109 HPIDECL(timeout, "timeout", _socket, Timeout, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
110 (int fd, long timeout),
a61af66fc99e Initial load
duke
parents:
diff changeset
111 ("fd = %d, timeout = %ld", fd, timeout),
a61af66fc99e Initial load
duke
parents:
diff changeset
112 (fd, timeout));
a61af66fc99e Initial load
duke
parents:
diff changeset
113
a61af66fc99e Initial load
duke
parents:
diff changeset
114 HPIDECL(get_host_by_name, "get_host_by_name", _socket, GetHostByName,
a61af66fc99e Initial load
duke
parents:
diff changeset
115 struct hostent *, "(struct hostent *)%p",
a61af66fc99e Initial load
duke
parents:
diff changeset
116 (char *name),
a61af66fc99e Initial load
duke
parents:
diff changeset
117 ("%s", name),
a61af66fc99e Initial load
duke
parents:
diff changeset
118 (name));
a61af66fc99e Initial load
duke
parents:
diff changeset
119
a61af66fc99e Initial load
duke
parents:
diff changeset
120 HPIDECL(socket_shutdown, "socket_shutdown", _socket, SocketShutdown,
a61af66fc99e Initial load
duke
parents:
diff changeset
121 int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
122 (int fd, int howto),
a61af66fc99e Initial load
duke
parents:
diff changeset
123 ("fd = %d, howto = %d", fd, howto),
a61af66fc99e Initial load
duke
parents:
diff changeset
124 (fd, howto));
a61af66fc99e Initial load
duke
parents:
diff changeset
125
a61af66fc99e Initial load
duke
parents:
diff changeset
126 HPIDECL(bind, "bind", _socket, Bind,
a61af66fc99e Initial load
duke
parents:
diff changeset
127 int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
128 (int fd, struct sockaddr *him, int len),
a61af66fc99e Initial load
duke
parents:
diff changeset
129 ("fd = %d, him = %p, len = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
130 fd, him, len),
a61af66fc99e Initial load
duke
parents:
diff changeset
131 (fd, him, len));
a61af66fc99e Initial load
duke
parents:
diff changeset
132
a61af66fc99e Initial load
duke
parents:
diff changeset
133 HPIDECL(get_sock_name, "get_sock_name", _socket, GetSocketName,
a61af66fc99e Initial load
duke
parents:
diff changeset
134 int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
135 (int fd, struct sockaddr *him, int *len),
a61af66fc99e Initial load
duke
parents:
diff changeset
136 ("fd = %d, him = %p, len = %p",
a61af66fc99e Initial load
duke
parents:
diff changeset
137 fd, him, len),
a61af66fc99e Initial load
duke
parents:
diff changeset
138 (fd, him, len));
a61af66fc99e Initial load
duke
parents:
diff changeset
139
a61af66fc99e Initial load
duke
parents:
diff changeset
140 HPIDECL(get_host_name, "get_host_name", _socket, GetHostName, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
141 (char *hostname, int namelen),
a61af66fc99e Initial load
duke
parents:
diff changeset
142 ("hostname = %p, namelen = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
143 hostname, namelen),
a61af66fc99e Initial load
duke
parents:
diff changeset
144 (hostname, namelen));
a61af66fc99e Initial load
duke
parents:
diff changeset
145
a61af66fc99e Initial load
duke
parents:
diff changeset
146 HPIDECL(get_host_by_addr, "get_host_by_addr", _socket, GetHostByAddr,
a61af66fc99e Initial load
duke
parents:
diff changeset
147 struct hostent *, "(struct hostent *)%p",
a61af66fc99e Initial load
duke
parents:
diff changeset
148 (const char* name, int len, int type),
a61af66fc99e Initial load
duke
parents:
diff changeset
149 ("name = %p, len = %d, type = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
150 name, len, type),
a61af66fc99e Initial load
duke
parents:
diff changeset
151 (name, len, type));
a61af66fc99e Initial load
duke
parents:
diff changeset
152
a61af66fc99e Initial load
duke
parents:
diff changeset
153 HPIDECL(get_sock_opt, "get_sock_opt", _socket, SocketGetOption, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
154 (int fd, int level, int optname, char *optval, int* optlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
155 ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %p",
a61af66fc99e Initial load
duke
parents:
diff changeset
156 fd, level, optname, optval, optlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
157 (fd, level, optname, optval, optlen));
a61af66fc99e Initial load
duke
parents:
diff changeset
158
a61af66fc99e Initial load
duke
parents:
diff changeset
159 HPIDECL(set_sock_opt, "set_sock_opt", _socket, SocketSetOption, int, "%d",
a61af66fc99e Initial load
duke
parents:
diff changeset
160 (int fd, int level, int optname, const char *optval, int optlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
161 ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
162 fd, level, optname, optval, optlen),
a61af66fc99e Initial load
duke
parents:
diff changeset
163 (fd, level, optname, optval, optlen));
a61af66fc99e Initial load
duke
parents:
diff changeset
164
a61af66fc99e Initial load
duke
parents:
diff changeset
165 HPIDECL(get_proto_by_name, "get_proto_by_name", _socket, GetProtoByName,
a61af66fc99e Initial load
duke
parents:
diff changeset
166 struct protoent *, "(struct protoent *)%p",
a61af66fc99e Initial load
duke
parents:
diff changeset
167 (char* name),
a61af66fc99e Initial load
duke
parents:
diff changeset
168 ("name = %p",
a61af66fc99e Initial load
duke
parents:
diff changeset
169 name),
a61af66fc99e Initial load
duke
parents:
diff changeset
170 (name));