summaryrefslogtreecommitdiff
path: root/libpager/pager-attr.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-06-01 21:43:59 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-06-01 21:43:59 +0000
commited493fe5e686de545ff3a3ea5884fba6faa921da (patch)
tree4fd3d20036050a61dad501d1d0834a1d7e35207a /libpager/pager-attr.c
parentcde0009406dae926d51e4df9300c1bf09c11918b (diff)
entered into RCS
Diffstat (limited to 'libpager/pager-attr.c')
-rw-r--r--libpager/pager-attr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libpager/pager-attr.c b/libpager/pager-attr.c
index 7fae4d74..762bb971 100644
--- a/libpager/pager-attr.c
+++ b/libpager/pager-attr.c
@@ -32,6 +32,17 @@ pager_change_attributes (struct pager *p,
mutex_lock (&p->interlock);
+ /* If there's nothing to do we might be able to return. However,
+ if the user asked us to wait, and there are pending changes,
+ then we have to do the work anyway because we must follow the
+ pending change. */
+ if (p->may_cache == may_cache && p->copy_strategy == copy_strategy
+ && ! (p->attribute_requests && wait))
+ {
+ mutex_unlock (&p->interlock);
+ return;
+ }
+
p->may_cache = may_cache;
p->copy_strategy = copy_strategy;