[Wine-patches] [eterhack] server: Print a message if non-exclusive lock overlaps exclusive one (eterbug #7710).

Alexander Morozov amorozov на etersoft.ru
Пт Окт 14 20:04:55 MSD 2011


----------- следующая часть -----------
From fe09ad9caa94edd9b20241d98d442ca382896b79 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Fri, 14 Oct 2011 19:05:46 +0400
Subject: [eterhack] server: Print a message if non-exclusive lock overlaps
 exclusive one (eterbug #7710).

---
 server/fd.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/server/fd.c b/server/fd.c
index 824092b..3cbbb94 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -1489,7 +1489,16 @@ obj_handle_t lock_fd( struct fd *fd, file_pos_t start, file_pos_t count, int sha
     {
         struct file_lock *lock = LIST_ENTRY( ptr, struct file_lock, inode_entry );
         if (!lock_overlaps( lock, start, end )) continue;
-        if (shared && (lock->shared || lock->fd == fd)) continue;
+        if (shared)
+        {
+            if (lock->shared) continue;
+            if (lock->fd == fd)
+            {
+                fprintf( stderr, "wineserver: overlapping exclusive "
+                         "and non-exclusive locks is not fully supported\n" );
+                continue;
+            }
+        }
         /* found one */
         if (!wait)
         {
-- 
1.7.6.1



Подробная информация о списке рассылки Wine-patches