physfs_internal.h
changeset 644 1cb5533d369c
parent 641 c6b04c2a0599
child 648 5c993684b8f2
equal deleted inserted replaced
643:95824caf2dbf 644:1cb5533d369c
  1293 #define BAIL_IF_MACRO(c, e, r) if (c) { __PHYSFS_setError(e); return r; }
  1293 #define BAIL_IF_MACRO(c, e, r) if (c) { __PHYSFS_setError(e); return r; }
  1294 #define BAIL_MACRO_MUTEX(e, m, r) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; }
  1294 #define BAIL_MACRO_MUTEX(e, m, r) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; }
  1295 #define BAIL_IF_MACRO_MUTEX(c, e, m, r) if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; }
  1295 #define BAIL_IF_MACRO_MUTEX(c, e, m, r) if (c) { __PHYSFS_setError(e); __PHYSFS_platformReleaseMutex(m); return r; }
  1296 
  1296 
  1297 
  1297 
       
  1298 /*
       
  1299  * Get the current allocator. Not valid before PHYSFS_init is called!
       
  1300  */
       
  1301 PHYSFS_allocator *__PHYSFS_getAllocator(void);
  1298 
  1302 
  1299 
  1303 
  1300 /*--------------------------------------------------------------------------*/
  1304 /*--------------------------------------------------------------------------*/
  1301 /*--------------------------------------------------------------------------*/
  1305 /*--------------------------------------------------------------------------*/
  1302 /*------------                                              ----------------*/
  1306 /*------------                                              ----------------*/
  1692  *  function, you'll cause an infinite recursion. This means you can't
  1696  *  function, you'll cause an infinite recursion. This means you can't
  1693  *  use the BAIL_*MACRO* macros, either.
  1697  *  use the BAIL_*MACRO* macros, either.
  1694  */
  1698  */
  1695 void __PHYSFS_platformReleaseMutex(void *mutex);
  1699 void __PHYSFS_platformReleaseMutex(void *mutex);
  1696 
  1700 
       
  1701 /*
       
  1702  * Implement malloc. It's safe to just pass through from the C runtime.
       
  1703  */
       
  1704 PHYSFS_memhandle __PHYSFS_platformMalloc(size_t s);
       
  1705 
       
  1706 /*
       
  1707  * Implement realloc. It's safe to just pass through from the C runtime.
       
  1708  */
       
  1709 PHYSFS_memhandle __PHYSFS_platformRealloc(PHYSFS_memhandle h, size_t s);
       
  1710 
       
  1711 /*
       
  1712  * Implement free. It's safe to just pass through from the C runtime.
       
  1713  */
       
  1714 void __PHYSFS_platformFree(PHYSFS_memhandle h);
       
  1715 
       
  1716 /*
       
  1717  * Lock a memhandle. If you are just passing through from the C runtime,
       
  1718  *  it is safe to make this a no-op. Otherwise, convert to a real pointer
       
  1719  *  in the address space and return it.
       
  1720  */
       
  1721 void *__PHYSFS_platformLock(PHYSFS_memhandle h);
       
  1722 
       
  1723 /*
       
  1724  * Unlock a memhandle. If you are just passing through from the C runtime,
       
  1725  *  it is safe to make this a no-op. Otherwise, you can consider the data in
       
  1726  *  the address space safe to move around until the handle is relocked.
       
  1727  */
       
  1728 void __PHYSFS_platformUnlock(PHYSFS_memhandle h);
       
  1729 
  1697 #ifdef __cplusplus
  1730 #ifdef __cplusplus
  1698 }
  1731 }
  1699 #endif
  1732 #endif
  1700 
  1733 
  1701 #endif
  1734 #endif