diff options
Diffstat (limited to 'source/blender/imbuf/intern/allocimbuf.c')
-rw-r--r-- | source/blender/imbuf/intern/allocimbuf.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index 5c79eb2c544..19b68b17e70 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -62,6 +62,30 @@ void imb_refcounter_lock_exit(void) BLI_spin_end(&refcounter_spin); } +#ifdef WIN32 +static SpinLock mmap_spin; + +void imb_mmap_lock_init(void) +{ + BLI_spin_init(&mmap_spin); +} + +void imb_mmap_lock_exit(void) +{ + BLI_spin_end(&mmap_spin); +} + +void imb_mmap_lock(void) +{ + BLI_spin_lock(&mmap_spin); +} + +void imb_mmap_unlock(void) +{ + BLI_spin_unlock(&mmap_spin); +} +#endif + void imb_freemipmapImBuf(ImBuf *ibuf) { int a; |