コード例 #1
0
ファイル: visorchannel_funcs.c プロジェクト: Abioy/kasan
BOOL
visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
{
	BOOL rc;

	if (channel->needs_lock) {
		spin_lock(&channel->remove_lock);
		rc = signalremove_inner(channel, queue, msg);
		spin_unlock(&channel->remove_lock);
	} else {
		rc = signalremove_inner(channel, queue, msg);
	}

	return rc;
}
コード例 #2
0
ファイル: visorchannel.c プロジェクト: asmalldev/linux
/**
 * visorchannel_signalremove() - removes a message from the designated
 *                               channel/queue
 * @channel: the channel the message will be removed from
 * @queue:   the queue the message will be removed from
 * @msg:     the message to remove
 *
 * Return: integer error code indicating the status of the removal
 */
int
visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
{
	int rc;
	unsigned long flags;

	if (channel->needs_lock) {
		spin_lock_irqsave(&channel->remove_lock, flags);
		rc = signalremove_inner(channel, queue, msg);
		spin_unlock_irqrestore(&channel->remove_lock, flags);
	} else {
		rc = signalremove_inner(channel, queue, msg);
	}

	return rc;
}