summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/sys/unpcb.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/sys/unpcb.h')
-rw-r--r--freebsd/sys/sys/unpcb.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/freebsd/sys/sys/unpcb.h b/freebsd/sys/sys/unpcb.h
index 1ab3457d..d80b1384 100644
--- a/freebsd/sys/sys/unpcb.h
+++ b/freebsd/sys/sys/unpcb.h
@@ -69,27 +69,29 @@ typedef uint64_t unp_gen_t;
LIST_HEAD(unp_head, unpcb);
struct unpcb {
- LIST_ENTRY(unpcb) unp_link; /* glue on list of all PCBs */
+ /* Cache line 1 */
+ struct mtx unp_mtx; /* mutex */
+ struct unpcb *unp_conn; /* control block of connected socket */
+ volatile u_int unp_refcount;
+ short unp_flags; /* flags */
+ short unp_gcflag; /* Garbage collector flags. */
+ struct sockaddr_un *unp_addr; /* bound address of socket */
struct socket *unp_socket; /* pointer back to socket */
- struct file *unp_file; /* back-pointer to file for gc. */
+ /* Cache line 2 */
#ifndef __rtems__
struct vnode *unp_vnode; /* if associated with file */
#else /* __rtems__ */
void *unp_vnode; /* if associated with file */
#endif /* __rtems__ */
- ino_t unp_ino; /* fake inode number */
- struct unpcb *unp_conn; /* control block of connected socket */
- struct unp_head unp_refs; /* referencing socket linked list */
+ struct xucred unp_peercred; /* peer credentials, if applicable */
LIST_ENTRY(unpcb) unp_reflink; /* link in unp_refs list */
- struct sockaddr_un *unp_addr; /* bound address of socket */
+ LIST_ENTRY(unpcb) unp_link; /* glue on list of all PCBs */
+ struct unp_head unp_refs; /* referencing socket linked list */
unp_gen_t unp_gencnt; /* generation count of this instance */
- short unp_flags; /* flags */
- short unp_gcflag; /* Garbage collector flags. */
- struct xucred unp_peercred; /* peer credentials, if applicable */
- u_int unp_refcount;
+ struct file *unp_file; /* back-pointer to file for gc. */
u_int unp_msgcount; /* references from message queue */
- struct mtx unp_mtx; /* mutex */
-};
+ ino_t unp_ino; /* fake inode number */
+} __aligned(CACHE_LINE_SIZE);
/*
* Flags in unp_flags.