Revision: 4213
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4213&view=rev
Author:   hofman
Date:     2008-07-14 14:23:16 -0700 (Mon, 14 Jul 2008)

Log Message:
-----------
Stop running server when the runloop finishes. Remove aligned attributes from 
flags.

Modified Paths:
--------------
    trunk/SKPDFSynchronizer.m

Modified: trunk/SKPDFSynchronizer.m
===================================================================
--- trunk/SKPDFSynchronizer.m   2008-07-14 19:41:15 UTC (rev 4212)
+++ trunk/SKPDFSynchronizer.m   2008-07-14 21:23:16 UTC (rev 4213)
@@ -62,8 +62,8 @@
 #pragma mark -
 
 struct SKServerFlags {
-    volatile int32_t shouldKeepRunning __attribute__ ((aligned (32)));
-    volatile int32_t serverReady __attribute__ ((aligned (32)));
+    volatile int32_t shouldKeepRunning;
+    volatile int32_t serverReady;
 };
 
 @protocol SKPDFSynchronizerServerThread
@@ -125,7 +125,8 @@
         
         // wait till the server is set up
         do {
-            [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode 
beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
+            if (NO == [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode 
beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]])
+                OSAtomicCompareAndSwap32Barrier(1, 0, (int32_t 
*)&serverFlags->shouldKeepRunning);
             OSMemoryBarrier();
         } while (serverFlags->serverReady == 0 && 
serverFlags->shouldKeepRunning == 1);
     }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to