1 /*
2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 // Win32 delegates these to the HPI. Solaris provides its own
26 // implementation without using the HPI (for Interrupitble I/O).
27
28 // HPI_FileInterface
29
30 HPIDECL(close, "close", _file, Close, int, "%d",
31 (int fd),
32 ("fd = %d", fd),
33 (fd));
34
35 HPIDECL(read, "read", _file, Read, size_t, "%ld",
36 (int fd, void *buf, unsigned int nBytes),
37 ("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
38 (fd, buf, nBytes));
39
40 HPIDECL(write, "write", _file, Write, size_t, "%ld",
41 (int fd, const void *buf, unsigned int nBytes),
42 ("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
43 (fd, buf, nBytes));
44
151 (name, len, type));
152
153 HPIDECL(get_sock_opt, "get_sock_opt", _socket, SocketGetOption, int, "%d",
154 (int fd, int level, int optname, char *optval, int* optlen),
155 ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %p",
156 fd, level, optname, optval, optlen),
157 (fd, level, optname, optval, optlen));
158
159 HPIDECL(set_sock_opt, "set_sock_opt", _socket, SocketSetOption, int, "%d",
160 (int fd, int level, int optname, const char *optval, int optlen),
161 ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %d",
162 fd, level, optname, optval, optlen),
163 (fd, level, optname, optval, optlen));
164
165 HPIDECL(get_proto_by_name, "get_proto_by_name", _socket, GetProtoByName,
166 struct protoent *, "(struct protoent *)%p",
167 (char* name),
168 ("name = %p",
169 name),
170 (name));
|
1 /*
2 * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef OS_WINDOWS_VM_HPI_WINDOWS_HPP
26 #define OS_WINDOWS_VM_HPI_WINDOWS_HPP
27
28 // Win32 delegates these to the HPI. Solaris provides its own
29 // implementation without using the HPI (for Interrupitble I/O).
30
31 // HPI_FileInterface
32
33 HPIDECL(close, "close", _file, Close, int, "%d",
34 (int fd),
35 ("fd = %d", fd),
36 (fd));
37
38 HPIDECL(read, "read", _file, Read, size_t, "%ld",
39 (int fd, void *buf, unsigned int nBytes),
40 ("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
41 (fd, buf, nBytes));
42
43 HPIDECL(write, "write", _file, Write, size_t, "%ld",
44 (int fd, const void *buf, unsigned int nBytes),
45 ("fd = %d, buf = %p, nBytes = %u", fd, buf, nBytes),
46 (fd, buf, nBytes));
47
154 (name, len, type));
155
156 HPIDECL(get_sock_opt, "get_sock_opt", _socket, SocketGetOption, int, "%d",
157 (int fd, int level, int optname, char *optval, int* optlen),
158 ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %p",
159 fd, level, optname, optval, optlen),
160 (fd, level, optname, optval, optlen));
161
162 HPIDECL(set_sock_opt, "set_sock_opt", _socket, SocketSetOption, int, "%d",
163 (int fd, int level, int optname, const char *optval, int optlen),
164 ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %d",
165 fd, level, optname, optval, optlen),
166 (fd, level, optname, optval, optlen));
167
168 HPIDECL(get_proto_by_name, "get_proto_by_name", _socket, GetProtoByName,
169 struct protoent *, "(struct protoent *)%p",
170 (char* name),
171 ("name = %p",
172 name),
173 (name));
174
175 #endif // OS_WINDOWS_VM_HPI_WINDOWS_HPP
|