diff options
author | deischen <deischen@FreeBSD.org> | 2005-07-29 21:06:09 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2005-07-29 21:06:09 +0000 |
commit | 46ccea61c3ad6a4579fd2a92965c2cf31f63431c (patch) | |
tree | 543b913e9286b1f9ea47638b2d068e056d029b90 /lib/libkse | |
parent | 42b3b6a20e754669f29a0e22604da71e863b783e (diff) | |
download | FreeBSD-src-46ccea61c3ad6a4579fd2a92965c2cf31f63431c.zip FreeBSD-src-46ccea61c3ad6a4579fd2a92965c2cf31f63431c.tar.gz |
Catch up with the atomic_FOO_ptr() changes and silence a few warnings.
Diffstat (limited to 'lib/libkse')
-rw-r--r-- | lib/libkse/sys/lock.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/libkse/sys/lock.c b/lib/libkse/sys/lock.c index 0f0f5f9..2ac8c0c 100644 --- a/lib/libkse/sys/lock.c +++ b/lib/libkse/sys/lock.c @@ -180,7 +180,9 @@ _lock_acquire(struct lock *lck, struct lockuser *lu, int prio) atomic_swap_ptr(&lck->l_head, lu->lu_myreq, &lu->lu_watchreq); if (lu->lu_watchreq->lr_locked != 0) { - atomic_store_rel_ptr(&lu->lu_watchreq->lr_watcher, lu); + atomic_store_rel_ptr + ((volatile uintptr_t *)&lu->lu_watchreq->lr_watcher, + (uintptr_t)lu); if ((lck->l_wait == NULL) || ((lck->l_type & LCK_ADAPTIVE) == 0)) { while (lu->lu_watchreq->lr_locked != 0) @@ -250,14 +252,19 @@ _lock_release(struct lock *lck, struct lockuser *lu) /* Update tail if our request is last. */ if (lu->lu_watchreq->lr_owner == NULL) { - atomic_store_rel_ptr(&lck->l_tail, lu->lu_myreq); - atomic_store_rel_ptr(&lu->lu_myreq->lr_owner, NULL); + atomic_store_rel_ptr((volatile uintptr_t *)&lck->l_tail, + (uintptr_t)lu->lu_myreq); + atomic_store_rel_ptr + ((volatile uintptr_t *)&lu->lu_myreq->lr_owner, + (uintptr_t)NULL); } else { /* Remove ourselves from the list. */ - atomic_store_rel_ptr(&lu->lu_myreq->lr_owner, - lu->lu_watchreq->lr_owner); - atomic_store_rel_ptr( - &lu->lu_watchreq->lr_owner->lu_myreq, lu->lu_myreq); + atomic_store_rel_ptr((volatile uintptr_t *) + &lu->lu_myreq->lr_owner, + (uintptr_t)lu->lu_watchreq->lr_owner); + atomic_store_rel_ptr((volatile uintptr_t *) + &lu->lu_watchreq->lr_owner->lu_myreq, + (uintptr_t)lu->lu_myreq); } /* * The watch request now becomes our own because we've |