summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2015-06-10 10:43:59 +0000
committermjg <mjg@FreeBSD.org>2015-06-10 10:43:59 +0000
commit67f2eebb44e1f27017750eddaf5a5ea513cb9c71 (patch)
tree4be753ea914cbf9f2ee65a2a1cc53e6989224d5d /sys/sparc64
parentab3ad78145346dc115fb372ccf5f9bf7731075c9 (diff)
downloadFreeBSD-src-67f2eebb44e1f27017750eddaf5a5ea513cb9c71.zip
FreeBSD-src-67f2eebb44e1f27017750eddaf5a5ea513cb9c71.tar.gz
Generalised support for copy-on-write structures shared by threads.
Thread credentials are maintained as follows: each thread has a pointer to creds and a reference on them. The pointer is compared with proc's creds on userspace<->kernel boundary and updated if needed. This patch introduces a counter which can be compared instead, so that more structures can use this scheme without adding more comparisons on the boundary.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/trap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c
index b4f0e27..e9917e5 100644
--- a/sys/sparc64/sparc64/trap.c
+++ b/sys/sparc64/sparc64/trap.c
@@ -277,8 +277,8 @@ trap(struct trapframe *tf)
td->td_pticks = 0;
td->td_frame = tf;
addr = tf->tf_tpc;
- if (td->td_ucred != p->p_ucred)
- cred_update_thread(td);
+ if (td->td_cowgen != p->p_cowgen)
+ thread_cow_update(td);
switch (tf->tf_type) {
case T_DATA_MISS:
OpenPOWER on IntegriCloud