Changeset 1076:57fa159b839d in roaraudio


Ignore:
Timestamp:
12/28/08 18:13:49 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

theoreticly this should fix mlock() support on win32

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/roaraudio/win32hacks.h

    r1073 r1076  
    3131#ifdef ROAR_TARGET_WIN32 
    3232 
     33#include <windows.h> 
     34 
    3335#define id_t      int 
    3436#define pid_t     int 
  • libroar/libroar.c

    r700 r1076  
    3636 
    3737int _ROAR_MLOCK(const void *addr, size_t len) { 
     38#ifndef ROAR_TARGET_WIN32 
    3839 long sz = sysconf(_SC_PAGESIZE); 
    3940 unsigned long int pos = (unsigned long int) addr; 
     
    4445 
    4546 return mlock((void*)pos, len); 
     47#else 
     48 return GlobalLock(pos) == pos ? 0 : -1; 
     49#endif 
    4650} 
    4751 
Note: See TracChangeset for help on using the changeset viewer.