Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Sprinkle some __restrict into <sys/socket.h>.
details: https://anonhg.NetBSD.org/src/rev/99fab8c81b02
branches: trunk
changeset: 516400:99fab8c81b02
user: kleink <kleink%NetBSD.org@localhost>
date: Mon Oct 22 20:59:02 2001 +0000
description:
Sprinkle some __restrict into <sys/socket.h>.
diffstat:
lib/libc/sys/accept.2 | 6 +++---
lib/libc/sys/getpeername.2 | 6 +++---
lib/libc/sys/getsockname.2 | 6 +++---
lib/libc/sys/getsockopt.2 | 6 +++---
lib/libc/sys/recv.2 | 6 +++---
sys/sys/socket.h | 17 ++++++++++-------
6 files changed, 25 insertions(+), 22 deletions(-)
diffs (170 lines):
diff -r 5ac097bc5750 -r 99fab8c81b02 lib/libc/sys/accept.2
--- a/lib/libc/sys/accept.2 Mon Oct 22 20:47:05 2001 +0000
+++ b/lib/libc/sys/accept.2 Mon Oct 22 20:59:02 2001 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: accept.2,v 1.18 2001/10/16 20:09:59 kleink Exp $
+.\" $NetBSD: accept.2,v 1.19 2001/10/22 20:59:02 kleink Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" @(#)accept.2 8.2 (Berkeley) 12/11/93
.\"
-.Dd October 16, 2001
+.Dd October 22, 2001
.Dt ACCEPT 2
.Os
.Sh NAME
@@ -44,7 +44,7 @@
.Sh SYNOPSIS
.Fd #include <sys/socket.h>
.Ft int
-.Fn accept "int s" "struct sockaddr *addr" "socklen_t *addrlen"
+.Fn accept "int s" "struct sockaddr * restrict addr" "socklen_t * restrict addrlen"
.Sh DESCRIPTION
The argument
.Fa s
diff -r 5ac097bc5750 -r 99fab8c81b02 lib/libc/sys/getpeername.2
--- a/lib/libc/sys/getpeername.2 Mon Oct 22 20:47:05 2001 +0000
+++ b/lib/libc/sys/getpeername.2 Mon Oct 22 20:59:02 2001 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: getpeername.2,v 1.11 2001/09/16 01:39:00 wiz Exp $
+.\" $NetBSD: getpeername.2,v 1.12 2001/10/22 20:59:02 kleink Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" @(#)getpeername.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd June 4, 1993
+.Dd October 22, 2001
.Dt GETPEERNAME 2
.Os
.Sh NAME
@@ -44,7 +44,7 @@
.Sh SYNOPSIS
.Fd #include <sys/socket.h>
.Ft int
-.Fn getpeername "int s" "struct sockaddr *name" "socklen_t *namelen"
+.Fn getpeername "int s" "struct sockaddr * restrict name" "socklen_t * restrict namelen"
.Sh DESCRIPTION
.Fn getpeername
returns the name of the peer connected to
diff -r 5ac097bc5750 -r 99fab8c81b02 lib/libc/sys/getsockname.2
--- a/lib/libc/sys/getsockname.2 Mon Oct 22 20:47:05 2001 +0000
+++ b/lib/libc/sys/getsockname.2 Mon Oct 22 20:59:02 2001 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: getsockname.2,v 1.14 2001/09/16 02:13:28 wiz Exp $
+.\" $NetBSD: getsockname.2,v 1.15 2001/10/22 20:59:03 kleink Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" @(#)getsockname.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd June 4, 1993
+.Dd October 22, 2001
.Dt GETSOCKNAME 2
.Os
.Sh NAME
@@ -44,7 +44,7 @@
.Sh SYNOPSIS
.Fd #include <sys/socket.h>
.Ft int
-.Fn getsockname "int s" "struct sockaddr *name" "socklen_t *namelen"
+.Fn getsockname "int s" "struct sockaddr * restrict name" "socklen_t * restrict namelen"
.Sh DESCRIPTION
The
.Fn getsockname
diff -r 5ac097bc5750 -r 99fab8c81b02 lib/libc/sys/getsockopt.2
--- a/lib/libc/sys/getsockopt.2 Mon Oct 22 20:47:05 2001 +0000
+++ b/lib/libc/sys/getsockopt.2 Mon Oct 22 20:59:02 2001 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: getsockopt.2,v 1.21 2001/10/16 20:09:59 kleink Exp $
+.\" $NetBSD: getsockopt.2,v 1.22 2001/10/22 20:59:03 kleink Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95
.\"
-.Dd October 16, 2001
+.Dd October 22, 2001
.Dt GETSOCKOPT 2
.Os
.Sh NAME
@@ -45,7 +45,7 @@
.Sh SYNOPSIS
.Fd #include <sys/socket.h>
.Ft int
-.Fn getsockopt "int s" "int level" "int optname" "void *optval" "socklen_t *optlen"
+.Fn getsockopt "int s" "int level" "int optname" "void * restrict optval" "socklen_t * restrict optlen"
.Ft int
.Fn setsockopt "int s" "int level" "int optname" "const void *optval" "socklen_t optlen"
.Sh DESCRIPTION
diff -r 5ac097bc5750 -r 99fab8c81b02 lib/libc/sys/recv.2
--- a/lib/libc/sys/recv.2 Mon Oct 22 20:47:05 2001 +0000
+++ b/lib/libc/sys/recv.2 Mon Oct 22 20:59:02 2001 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: recv.2,v 1.19 2001/10/16 20:09:59 kleink Exp $
+.\" $NetBSD: recv.2,v 1.20 2001/10/22 20:59:03 kleink Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" @(#)recv.2 8.3 (Berkeley) 2/21/94
.\"
-.Dd October 16, 2001
+.Dd October 22, 2001
.Dt RECV 2
.Os
.Sh NAME
@@ -48,7 +48,7 @@
.Ft ssize_t
.Fn recv "int s" "void *buf" "size_t len" "int flags"
.Ft ssize_t
-.Fn recvfrom "int s" "void *buf" "size_t len" "int flags" "struct sockaddr *from" "socklen_t *fromlen"
+.Fn recvfrom "int s" "void * restrict buf" "size_t len" "int flags" "struct sockaddr * restrict from" "socklen_t * restrict fromlen"
.Ft ssize_t
.Fn recvmsg "int s" "struct msghdr *msg" "int flags"
.Sh DESCRIPTION
diff -r 5ac097bc5750 -r 99fab8c81b02 sys/sys/socket.h
--- a/sys/sys/socket.h Mon Oct 22 20:47:05 2001 +0000
+++ b/sys/sys/socket.h Mon Oct 22 20:59:02 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: socket.h,v 1.64 2001/10/22 17:53:44 kleink Exp $ */
+/* $NetBSD: socket.h,v 1.65 2001/10/22 20:59:04 kleink Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -514,16 +514,19 @@
#ifndef _KERNEL
__BEGIN_DECLS
-int accept __P((int, struct sockaddr *, socklen_t *));
+int accept __P((int, struct sockaddr * __restrict, socklen_t * __restrict));
int bind __P((int, const struct sockaddr *, socklen_t));
int connect __P((int, const struct sockaddr *, socklen_t));
-int getpeername __P((int, struct sockaddr *, socklen_t *));
-int getsockname __P((int, struct sockaddr *, socklen_t *));
-int getsockopt __P((int, int, int, void *, socklen_t *));
+int getpeername __P((int, struct sockaddr * __restrict,
+ socklen_t * __restrict));
+int getsockname __P((int, struct sockaddr * __restrict,
+ socklen_t * __restrict));
+int getsockopt __P((int, int, int, void * __restrict,
+ socklen_t * __restrict));
int listen __P((int, int));
ssize_t recv __P((int, void *, size_t, int));
-ssize_t recvfrom __P((int, void *, size_t, int, struct sockaddr *,
- socklen_t *));
+ssize_t recvfrom __P((int, void * __restrict, size_t, int,
+ struct sockaddr * __restrict, socklen_t * __restrict));
ssize_t recvmsg __P((int, struct msghdr *, int));
ssize_t send __P((int, const void *, size_t, int));
ssize_t sendto __P((int, const void *,
Home |
Main Index |
Thread Index |
Old Index