MCPcopy Create free account
hub / github.com/F-Stack/f-stack / crypto_unblock

Function crypto_unblock

freebsd/opencrypto/crypto.c:1190–1211  ·  view source on GitHub ↗

* Clear blockage on a driver. The what parameter indicates whether * the driver is now ready for cryptop's and/or cryptokop's. */

Source from the content-addressed store, hash-verified

1188 * the driver is now ready for cryptop's and/or cryptokop's.
1189 */
1190int
1191crypto_unblock(uint32_t driverid, int what)
1192{
1193 struct cryptocap *cap;
1194 int err;
1195
1196 CRYPTO_Q_LOCK();
1197 cap = crypto_checkdriver(driverid);
1198 if (cap != NULL) {
1199 if (what & CRYPTO_SYMQ)
1200 cap->cc_qblocked = 0;
1201 if (what & CRYPTO_ASYMQ)
1202 cap->cc_kqblocked = 0;
1203 if (crp_sleep)
1204 wakeup_one(&crp_q);
1205 err = 0;
1206 } else
1207 err = EINVAL;
1208 CRYPTO_Q_UNLOCK();
1209
1210 return err;
1211}
1212
1213size_t
1214crypto_buffer_len(struct crypto_buffer *cb)

Callers 1

Calls 2

crypto_checkdriverFunction · 0.85
wakeup_oneFunction · 0.50

Tested by

no test coverage detected