diff options
author | Roland McGrath <roland@gnu.org> | 2002-05-29 08:34:38 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-05-29 08:34:38 +0000 |
commit | 6f0783f05f1ec037bea1619306aff367b7f50d47 (patch) | |
tree | 8fd48932d43cbc00c599e627a0b0946996dbbcd1 /pfinet/socket.c | |
parent | a3820c3a3c372fc54a47d397e19db700023b5b06 (diff) | |
download | hurd-6f0783f05f1ec037bea1619306aff367b7f50d47.tar.gz hurd-6f0783f05f1ec037bea1619306aff367b7f50d47.tar.bz2 hurd-6f0783f05f1ec037bea1619306aff367b7f50d47.zip |
2002-05-29 Roland McGrath <roland@frob.com>
* linux-src/include/linux/net.h (struct socket) [_HURD_]:
New member `st_ino'.
* io-ops.c (S_io_stat, S_io_identity): Use that.
* socket.c (sock_alloc): Initialize it with a monotonic counter.
Diffstat (limited to 'pfinet/socket.c')
-rw-r--r-- | pfinet/socket.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pfinet/socket.c b/pfinet/socket.c index 82935a57..d56c1794 100644 --- a/pfinet/socket.c +++ b/pfinet/socket.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995,2000 Free Software Foundation, Inc. + Copyright (C) 1995,2000,02 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -41,6 +41,7 @@ sock_register (struct net_proto_family *fam) struct socket * sock_alloc (void) { + static ino_t nextino; /* locked by global_lock */ struct socket *sock; struct condition *c; @@ -55,6 +56,10 @@ sock_alloc (void) sock->refcnt = 1; sock->wait = (void *) c; + if (nextino == 0) + nextino = 2; + sock->st_ino = nextino++; + return sock; } |