Objectcache-Macros

Makes Objectcache service more accessible with simple defined macros.

Summary
Objectcache-MacrosMakes Objectcache service more accessible with simple defined macros.
CopyrightThis program is free software.
Files
C-kern/api/cache/objectcache_macros.hHeader file of Objectcache-Macros.
Functions
iobuffer
LOCKIOBUFFER_OBJECTCACHELocks the io buffer and returns a pointer to it in iobuffer.
UNLOCKIOBUFFER_OBJECTCACHEUnlocks the locked io buffer and sets the pointer to NULL.

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2011 Jörg Seebohn

Files

C-kern/api/cache/objectcache_macros.h

Header file of Objectcache-Macros.

Functions

Summary
iobuffer
LOCKIOBUFFER_OBJECTCACHELocks the io buffer and returns a pointer to it in iobuffer.
UNLOCKIOBUFFER_OBJECTCACHEUnlocks the locked io buffer and sets the pointer to NULL.

iobuffer

LOCKIOBUFFER_OBJECTCACHE

#define LOCKIOBUFFER_OBJECTCACHE(
   /*out*/iobuffer
) (objectcache_maincontext().iimpl->lock_iobuffer(objectcache_maincontext().object, (iobuffer)))

Locks the io buffer and returns a pointer to it in iobuffer.  See also <lockiobuffer_objectcache>.

UNLOCKIOBUFFER_OBJECTCACHE

#define UNLOCKIOBUFFER_OBJECTCACHE(
   iobuffer
) (objectcache_maincontext().iimpl->unlock_iobuffer(objectcache_maincontext().object, (iobuffer)))

Unlocks the locked io buffer and sets the pointer to NULL.  See also <unlockiobuffer_objectcache>.

Offers a simple cache mechanism for objects needed in submodules which are costly to construct or deconstruct.
Makes Objectcache service more accessible with simple defined macros.
#define LOCKIOBUFFER_OBJECTCACHE(
   /*out*/iobuffer
) (objectcache_maincontext().iimpl->lock_iobuffer(objectcache_maincontext().object, (iobuffer)))
Locks the io buffer and returns a pointer to it in iobuffer.
#define UNLOCKIOBUFFER_OBJECTCACHE(
   iobuffer
) (objectcache_maincontext().iimpl->unlock_iobuffer(objectcache_maincontext().object, (iobuffer)))
Unlocks the locked io buffer and sets the pointer to NULL.
Close