logger(c, CRYPT_LOG_ERROR, __FILE__, __LINE__, x); \
set_error(x); } while(0)
-int memlock_inc(struct crypt_device *ctx);
-int memlock_dec(struct crypt_device *ctx);
+int crypt_memlock_inc(struct crypt_device *ctx);
+int crypt_memlock_dec(struct crypt_device *ctx);
#endif /* INTERNAL_H */
int crypt_memory_lock(struct crypt_device *cd, int lock)
{
- return lock ? memlock_inc(cd) : memlock_dec(cd);
+ return lock ? crypt_memlock_inc(cd) : crypt_memlock_dec(cd);
}
// reporting
static int _memlock_count = 0;
// return 1 if memory is locked
-int memlock_inc(struct crypt_device *ctx)
+int crypt_memlock_inc(struct crypt_device *ctx)
{
if (!_memlock_count++) {
log_dbg("Locking memory.");
return _memlock_count ? 1 : 0;
}
-int memlock_dec(struct crypt_device *ctx)
+int crypt_memlock_dec(struct crypt_device *ctx)
{
if (_memlock_count && (!--_memlock_count)) {
log_dbg("Unlocking memory.");