-/* $OpenBSD: kern_proc.c,v 1.92 2022/08/14 01:58:27 jsg Exp $ */
+/* $OpenBSD: kern_proc.c,v 1.93 2022/12/07 20:08:28 mvs Exp $ */
/* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */
/*
#include <sys/pool.h>
#include <sys/vnode.h>
+/*
+ * Locks used to protect struct members in this file:
+ * I immutable after creation
+ * U uidinfolk
+ */
+
struct rwlock uidinfolk;
#define UIHASH(uid) (&uihashtbl[(uid) & uihash])
-LIST_HEAD(uihashhead, uidinfo) *uihashtbl;
-u_long uihash; /* size of hash table - 1 */
+LIST_HEAD(uihashhead, uidinfo) *uihashtbl; /* [U] */
+u_long uihash; /* [I] size of hash table - 1 */
/*
* Other process lists
-/* $OpenBSD: proc.h,v 1.335 2022/11/23 11:00:27 mbuhl Exp $ */
+/* $OpenBSD: proc.h,v 1.336 2022/12/07 20:08:29 mvs Exp $ */
/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */
/*-
* Locks used to protect struct members in this file:
* I immutable after creation
* S scheduler lock
+ * U uidinfolk
* l read only reference, see lim_read_enter()
* o owned (read/modified only) by this thread
*/
#ifdef _KERNEL
struct uidinfo {
- LIST_ENTRY(uidinfo) ui_hash;
- uid_t ui_uid;
- long ui_proccnt; /* proc structs */
- long ui_lockcnt; /* lockf structs */
+ LIST_ENTRY(uidinfo) ui_hash; /* [U] */
+ uid_t ui_uid; /* [I] */
+ long ui_proccnt; /* [U] proc structs */
+ long ui_lockcnt; /* [U] lockf structs */
};
struct uidinfo *uid_find(uid_t);