/* * If the bit is already set it means that the key has already * been posted and we must not wait.
*/ if (test_bit(key, optee->notif.bitmap)) {
clear_bit(key, optee->notif.bitmap); goto out;
}
/* * Check if someone is already waiting for this key. If there is * it's a programming error.
*/ if (have_key(optee, key)) {
rc = -EBUSY; goto out;
}
list_add_tail(&entry->link, &optee->notif.db);
/* * Unlock temporarily and wait for completion.
*/
spin_unlock_irqrestore(&optee->notif.lock, flags); if (timeout != 0) { if (!wait_for_completion_timeout(&entry->c, timeout))
rc = -ETIMEDOUT;
} else {
wait_for_completion(&entry->c);
}
spin_lock_irqsave(&optee->notif.lock, flags);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.