ksched
#define BLOCK_CIPHER_func_ecb(cname, cprefix, kstruct, ksched) \
cprefix##_ecb_encrypt(in + i, out + i, &EVP_C_DATA(kstruct, ctx)->ksched, EVP_CIPHER_CTX_is_encrypting(ctx)); \
#define BLOCK_CIPHER_func_ofb(cname, cprefix, cbits, kstruct, ksched) \
cprefix##_ofb##cbits##_encrypt(in, out, (long)EVP_MAXCHUNK, &EVP_C_DATA(kstruct, ctx)->ksched, ctx->iv, &num); \
cprefix##_ofb##cbits##_encrypt(in, out, (long)inl, &EVP_C_DATA(kstruct, ctx)->ksched, ctx->iv, &num); \
#define BLOCK_CIPHER_func_cbc(cname, cprefix, kstruct, ksched) \
cprefix##_cbc_encrypt(in, out, (long)EVP_MAXCHUNK, &EVP_C_DATA(kstruct, ctx)->ksched, ctx->iv, EVP_CIPHER_CTX_is_encrypting(ctx)); \
cprefix##_cbc_encrypt(in, out, (long)inl, &EVP_C_DATA(kstruct, ctx)->ksched, ctx->iv, EVP_CIPHER_CTX_is_encrypting(ctx)); \
#define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \
&EVP_C_DATA(kstruct, ctx)->ksched, ctx->iv, \
#define BLOCK_CIPHER_all_funcs(cname, cprefix, cbits, kstruct, ksched) \
BLOCK_CIPHER_func_cbc(cname, cprefix, kstruct, ksched) \
BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \
BLOCK_CIPHER_func_ecb(cname, cprefix, kstruct, ksched) \
BLOCK_CIPHER_func_ofb(cname, cprefix, cbits, kstruct, ksched)
#define IMPLEMENT_BLOCK_CIPHER(cname, ksched, cprefix, kstruct, nid, \
BLOCK_CIPHER_all_funcs(cname, cprefix, cbits, kstruct, ksched) \
#define IMPLEMENT_CFBR(cipher, cprefix, kstruct, ksched, keysize, cbits, iv_len, fl) \
BLOCK_CIPHER_func_cfb(cipher##_##keysize, cprefix, cbits, kstruct, ksched) \
getscheduler(struct ksched *ksched, struct thread *td, int *policy)
ksched_setparam(struct ksched *ksched,
e = getscheduler(ksched, td, &policy);
e = ksched_setscheduler(ksched, td, policy, param);
ksched_getparam(struct ksched *ksched, struct thread *td,
ksched_setscheduler(struct ksched *ksched, struct thread *td, int policy,
ksched_getscheduler(struct ksched *ksched, struct thread *td, int *policy)
return (getscheduler(ksched, td, policy));
ksched_yield(struct ksched *ksched)
ksched_get_priority_max(struct ksched *ksched, int policy, int *prio)
ksched_get_priority_min(struct ksched *ksched, int policy, int *prio)
ksched_rr_get_interval(struct ksched *ksched, struct thread *td,
*timespec = ksched->rr_interval;
ksched_attach(struct ksched **p)
struct ksched *ksched;
ksched = malloc(sizeof(*ksched), M_P31B, M_WAITOK);
ksched->rr_interval.tv_sec = 0;
ksched->rr_interval.tv_nsec = 1000000000L / hz * sched_rr_interval();
*p = ksched;
ksched_detach(struct ksched *ks)
int ret = ksched_attach(&ksched);
error = ksched_setparam(ksched, targettd,
error = ksched_getparam(ksched, targettd, param);
error = ksched_setscheduler(ksched, targettd, policy,
error = ksched_getscheduler(ksched, targettd, policy);
error = ksched_get_priority_max(ksched, uap->policy, &prio);
error = ksched_get_priority_min(ksched, uap->policy, &prio);
error = ksched_rr_get_interval(ksched, targettd, ts);
static struct ksched *ksched;
int ksched_getscheduler(struct ksched *, struct thread *, int *);
int ksched_yield(struct ksched *);
int ksched_get_priority_max(struct ksched *, int, int *);
int ksched_get_priority_min(struct ksched *, int, int *);
int ksched_rr_get_interval(struct ksched *,
struct ksched;
int ksched_attach(struct ksched **);
int ksched_detach(struct ksched *);
int ksched_setparam(struct ksched *,
int ksched_getparam(struct ksched *,
int ksched_setscheduler(struct ksched *,