patch-2.3.15 linux/include/net/af_unix.h
Next file: linux/include/net/atmclip.h
Previous file: linux/include/net/addrconf.h
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Mon Aug 23 10:01:02 1999
- Orig file:
v2.3.14/linux/include/net/af_unix.h
- Orig date:
Mon Apr 14 16:28:26 1997
diff -u --recursive --new-file v2.3.14/linux/include/net/af_unix.h linux/include/net/af_unix.h
@@ -7,9 +7,13 @@
typedef struct sock unix_socket;
extern void unix_gc(void);
-#define UNIX_HASH_SIZE 16
+#define UNIX_HASH_SIZE 256
extern unix_socket *unix_socket_table[UNIX_HASH_SIZE+1];
+extern rwlock_t unix_table_lock;
+
+extern atomic_t unix_tot_inflight;
+
#define forall_unix_sockets(i, s) for (i=0; i<=UNIX_HASH_SIZE; i++) \
for (s=unix_socket_table[i]; s; s=s->next)
@@ -26,10 +30,14 @@
{
struct ucred creds; /* Skb credentials */
struct scm_fp_list *fp; /* Passed files */
- unsigned attr; /* Special attributes */
};
#define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb))
#define UNIXCREDS(skb) (&UNIXCB((skb)).creds)
+
+#define unix_state_rlock(s) read_lock(&(s)->protinfo.af_unix.lock)
+#define unix_state_runlock(s) read_unlock(&(s)->protinfo.af_unix.lock)
+#define unix_state_wlock(s) write_lock(&(s)->protinfo.af_unix.lock)
+#define unix_state_wunlock(s) write_unlock(&(s)->protinfo.af_unix.lock)
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)