ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/video_vosf.h
(Generate patch)

Comparing BasiliskII/src/Unix/video_vosf.h (file contents):
Revision 1.43 by gbeauche, 2004-06-29T21:50:23Z vs.
Revision 1.46 by gbeauche, 2004-12-11T10:20:32Z

# Line 24 | Line 24
24   // Note: this file must be #include'd only in video_x.cpp
25   #ifdef ENABLE_VOSF
26  
27 #include <fcntl.h>
28 #include <sys/mman.h>
27   #include "sigsegv.h"
28   #include "vm_alloc.h"
29 + #ifdef _WIN32
30 + #include "util_windows.h"
31 + #endif
32  
33   // Glue for SDL and X11 support
34   #ifdef USE_SDL_VIDEO
# Line 156 | Line 157 | static inline int find_next_page_clear(i
157   static spinlock_t vosf_lock = SPIN_LOCK_UNLOCKED;                               // Mutex to protect frame buffer (dirtyPages in fact)
158   #define LOCK_VOSF spin_lock(&vosf_lock)
159   #define UNLOCK_VOSF spin_unlock(&vosf_lock)
160 + #elif defined(_WIN32)
161 + static mutex_t vosf_lock;                                                                               // Mutex to protect frame buffer (dirtyPages in fact)
162 + #define LOCK_VOSF vosf_lock.lock();
163 + #define UNLOCK_VOSF vosf_lock.unlock();
164   #elif defined(HAVE_PTHREADS)
165   static pthread_mutex_t vosf_lock = PTHREAD_MUTEX_INITIALIZER;   // Mutex to protect frame buffer (dirtyPages in fact)
166   #define LOCK_VOSF pthread_mutex_lock(&vosf_lock);
# Line 179 | Line 184 | static int log_base_2(uint32 x)
184   // Extend size to page boundary
185   static uint32 page_extend(uint32 size)
186   {
187 <        const uint32 page_size = getpagesize();
187 >        const uint32 page_size = vm_page_size();
188          const uint32 page_mask = page_size - 1;
189          return (size + page_mask) & ~page_mask;
190   }
# Line 227 | Line 232 | static bool video_vosf_init(MONITOR_INIT
232   {
233          VIDEO_MODE_INIT_MONITOR;
234  
235 <        const uintptr page_size = getpagesize();
235 >        const uintptr page_size = vm_page_size();
236          const uintptr page_mask = page_size - 1;
237          
238          // Round up frame buffer base to page boundary

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines