Exemple #1
0
void memlock_dec(void)
{
	if (!_memlock_count)
		log_error("Internal error: _memlock_count has dropped below 0.");
	--_memlock_count;
	_unlock_mem_if_possible();
	log_debug("memlock_count dec to %d", _memlock_count);
}
Exemple #2
0
void memlock_dec_daemon(void)
{
	if (!_memlock_count_daemon)
		log_error("Internal error: _memlock_count_daemon has dropped below 0.");
	--_memlock_count_daemon;
	_unlock_mem_if_possible();
	log_debug("memlock_count_daemon dec to %d", _memlock_count_daemon);
}
void memlock_dec_daemon(struct cmd_context *cmd)
{
	if (!_memlock_count_daemon)
		log_error(INTERNAL_ERROR "_memlock_count_daemon has dropped below 0.");
	--_memlock_count_daemon;
	_unlock_mem_if_possible(cmd);
	log_debug("memlock_count_daemon dec to %d", _memlock_count_daemon);
}
Exemple #4
0
void memlock_dec_daemon(struct cmd_context *cmd)
{
	if (!_memlock_count_daemon)
		log_error(INTERNAL_ERROR "_memlock_count_daemon has dropped below 0.");
	--_memlock_count_daemon;
	log_debug_mem("memlock_count_daemon dec to %d", _memlock_count_daemon);
	if (!_memlock_count_daemon && _critical_section && _mem_locked) {
		log_error("Unlocking daemon memory in critical section.");
		_unlock_mem(cmd);
		_mem_locked = 0;
	}
	_unlock_mem_if_possible(cmd);
}
Exemple #5
0
void memlock_unlock(struct cmd_context *cmd)
{
	_unlock_mem_if_possible(cmd);
}