Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 48) sorted by relevance

12

/lib/zlib_inflate/
Dinflate.c35 struct inflate_state *state; in zlib_inflateReset() local
37 if (strm == NULL || strm->state == NULL) return Z_STREAM_ERROR; in zlib_inflateReset()
38 state = (struct inflate_state *)strm->state; in zlib_inflateReset()
39 strm->total_in = strm->total_out = state->total = 0; in zlib_inflateReset()
42 state->mode = HEAD; in zlib_inflateReset()
43 state->last = 0; in zlib_inflateReset()
44 state->havedict = 0; in zlib_inflateReset()
45 state->dmax = 32768U; in zlib_inflateReset()
46 state->hold = 0; in zlib_inflateReset()
47 state->bits = 0; in zlib_inflateReset()
[all …]
Dinffast.c69 struct inflate_state *state; in inflate_fast() local
96 state = (struct inflate_state *)strm->state; in inflate_fast()
103 dmax = state->dmax; in inflate_fast()
105 wsize = state->wsize; in inflate_fast()
106 whave = state->whave; in inflate_fast()
107 write = state->write; in inflate_fast()
108 window = state->window; in inflate_fast()
109 hold = state->hold; in inflate_fast()
110 bits = state->bits; in inflate_fast()
111 lcode = state->lencode; in inflate_fast()
[all …]
/lib/
Drandom32.c52 u32 prandom_u32_state(struct rnd_state *state) in prandom_u32_state() argument
55 state->s1 = TAUSWORTHE(state->s1, 6U, 13U, 4294967294U, 18U); in prandom_u32_state()
56 state->s2 = TAUSWORTHE(state->s2, 2U, 27U, 4294967288U, 2U); in prandom_u32_state()
57 state->s3 = TAUSWORTHE(state->s3, 13U, 21U, 4294967280U, 7U); in prandom_u32_state()
58 state->s4 = TAUSWORTHE(state->s4, 3U, 12U, 4294967168U, 13U); in prandom_u32_state()
60 return (state->s1 ^ state->s2 ^ state->s3 ^ state->s4); in prandom_u32_state()
74 void prandom_bytes_state(struct rnd_state *state, void *buf, size_t bytes) in prandom_bytes_state() argument
79 put_unaligned(prandom_u32_state(state), (u32 *) ptr); in prandom_bytes_state()
85 u32 rem = prandom_u32_state(state); in prandom_bytes_state()
95 static void prandom_warmup(struct rnd_state *state) in prandom_warmup() argument
[all …]
Dxxhash.c245 struct xxh32_state state; in xxh32_reset() local
247 memset(&state, 0, sizeof(state)); in xxh32_reset()
248 state.v1 = seed + PRIME32_1 + PRIME32_2; in xxh32_reset()
249 state.v2 = seed + PRIME32_2; in xxh32_reset()
250 state.v3 = seed + 0; in xxh32_reset()
251 state.v4 = seed - PRIME32_1; in xxh32_reset()
252 memcpy(statePtr, &state, sizeof(state)); in xxh32_reset()
259 struct xxh64_state state; in xxh64_reset() local
261 memset(&state, 0, sizeof(state)); in xxh64_reset()
262 state.v1 = seed + PRIME64_1 + PRIME64_2; in xxh64_reset()
[all …]
Dirq_poll.c31 if (test_bit(IRQ_POLL_F_DISABLE, &iop->state)) in irq_poll_sched()
33 if (test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state)) in irq_poll_sched()
55 clear_bit_unlock(IRQ_POLL_F_SCHED, &iop->state); in __irq_poll_complete()
109 if (test_bit(IRQ_POLL_F_SCHED, &iop->state)) in irq_poll_softirq()
125 if (test_bit(IRQ_POLL_F_DISABLE, &iop->state)) in irq_poll_softirq()
147 set_bit(IRQ_POLL_F_DISABLE, &iop->state); in irq_poll_disable()
148 while (test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state)) in irq_poll_disable()
150 clear_bit(IRQ_POLL_F_DISABLE, &iop->state); in irq_poll_disable()
164 BUG_ON(!test_bit(IRQ_POLL_F_SCHED, &iop->state)); in irq_poll_enable()
166 clear_bit_unlock(IRQ_POLL_F_SCHED, &iop->state); in irq_poll_enable()
Dinterval_tree.c28 interval_tree_span_iter_next_gap(struct interval_tree_span_iter *state) in interval_tree_span_iter_next_gap() argument
30 struct interval_tree_node *cur = state->nodes[1]; in interval_tree_span_iter_next_gap()
32 state->nodes[0] = cur; in interval_tree_span_iter_next_gap()
34 if (cur->last > state->nodes[0]->last) in interval_tree_span_iter_next_gap()
35 state->nodes[0] = cur; in interval_tree_span_iter_next_gap()
36 cur = interval_tree_iter_next(cur, state->first_index, in interval_tree_span_iter_next_gap()
37 state->last_index); in interval_tree_span_iter_next_gap()
38 } while (cur && (state->nodes[0]->last >= cur->start || in interval_tree_span_iter_next_gap()
39 state->nodes[0]->last + 1 == cur->start)); in interval_tree_span_iter_next_gap()
40 state->nodes[1] = cur; in interval_tree_span_iter_next_gap()
Ddebugobjects.c272 obj->state = ODEBUG_STATE_NONE; in alloc_object()
516 msg, obj_states[obj->state], obj->astate, in debug_print_object()
527 debug_object_fixup(bool (*fixup)(void *addr, enum debug_obj_state state), in debug_object_fixup() argument
528 void * addr, enum debug_obj_state state) in debug_object_fixup()
530 if (fixup && fixup(addr, state)) { in debug_object_fixup()
565 enum debug_obj_state state = ODEBUG_STATE_NONE; in lookup_object_or_alloc() local
584 state = ODEBUG_STATE_INIT; in lookup_object_or_alloc()
589 obj->state = state; in lookup_object_or_alloc()
640 switch (obj->state) { in __debug_object_init()
644 obj->state = ODEBUG_STATE_INIT; in __debug_object_init()
[all …]
Ddecompress_unlzma.c290 int state; member
361 if (cst->state >= LZMA_NUM_LIT_STATES) { in process_bit0()
383 if (cst->state < 4) in process_bit0()
384 cst->state = 0; in process_bit0()
385 else if (cst->state < 10) in process_bit0()
386 cst->state -= 3; in process_bit0()
388 cst->state -= 6; in process_bit0()
402 prob = p + LZMA_IS_REP + cst->state; in process_bit1()
408 cst->state = cst->state < LZMA_NUM_LIT_STATES ? 0 : 3; in process_bit1()
412 prob = p + LZMA_IS_REP_G0 + cst->state; in process_bit1()
[all …]
Dsyscall.c72 unsigned int state; in task_current_syscall() local
77 state = READ_ONCE(target->__state); in task_current_syscall()
78 if (unlikely(!state)) in task_current_syscall()
81 ncsw = wait_task_inactive(target, state); in task_current_syscall()
84 unlikely(wait_task_inactive(target, state) != ncsw)) in task_current_syscall()
Dtextsearch.c206 struct ts_state *state) in get_linear_data() argument
208 struct ts_linear_state *st = (struct ts_linear_state *) state->cb; in get_linear_data()
232 struct ts_state *state, in textsearch_find_continuous() argument
235 struct ts_linear_state *st = (struct ts_linear_state *) state->cb; in textsearch_find_continuous()
241 return textsearch_find(conf, state); in textsearch_find_continuous()
Dts_kmp.c42 static unsigned int kmp_find(struct ts_config *conf, struct ts_state *state) in kmp_find() argument
45 unsigned int i, q = 0, text_len, consumed = state->offset; in kmp_find()
50 text_len = conf->get_next_block(consumed, &text, conf, state); in kmp_find()
63 state->offset = consumed + i + 1; in kmp_find()
64 return state->offset - kmp->pattern_len; in kmp_find()
/lib/crypto/
Dblake2s.c19 static inline void blake2s_set_lastblock(struct blake2s_state *state) in blake2s_set_lastblock() argument
21 state->f[0] = -1; in blake2s_set_lastblock()
24 void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen) in blake2s_update() argument
26 const size_t fill = BLAKE2S_BLOCK_SIZE - state->buflen; in blake2s_update()
31 memcpy(state->buf + state->buflen, in, fill); in blake2s_update()
32 blake2s_compress(state, state->buf, 1, BLAKE2S_BLOCK_SIZE); in blake2s_update()
33 state->buflen = 0; in blake2s_update()
39 blake2s_compress(state, in, nblocks - 1, BLAKE2S_BLOCK_SIZE); in blake2s_update()
43 memcpy(state->buf + state->buflen, in, inlen); in blake2s_update()
44 state->buflen += inlen; in blake2s_update()
[all …]
Dblake2s-selftest.c553 struct blake2s_state state; in blake2s_digest_test() local
576 blake2s_init(&state, outlen); in blake2s_digest_test()
578 blake2s_init_key(&state, outlen, in blake2s_digest_test()
582 blake2s_update(&state, buf, l); in blake2s_digest_test()
583 blake2s_update(&state, buf + l, i - l); in blake2s_digest_test()
584 blake2s_final(&state, hash); in blake2s_digest_test()
597 struct blake2s_state state; in blake2s_random_test() local
609 get_random_bytes(&state, sizeof(state)); in blake2s_random_test()
613 memcpy(&state1, &state, sizeof(state1)); in blake2s_random_test()
614 memcpy(&state2, &state, sizeof(state2)); in blake2s_random_test()
[all …]
Dblake2s-generic.c32 static inline void blake2s_increment_counter(struct blake2s_state *state, in blake2s_increment_counter() argument
35 state->t[0] += inc; in blake2s_increment_counter()
36 state->t[1] += (state->t[0] < inc); in blake2s_increment_counter()
39 void blake2s_compress(struct blake2s_state *state, const u8 *block,
43 void blake2s_compress_generic(struct blake2s_state *state, const u8 *block, in blake2s_compress_generic() argument
54 blake2s_increment_counter(state, inc); in blake2s_compress_generic()
57 memcpy(v, state->h, 32); in blake2s_compress_generic()
62 v[12] = BLAKE2S_IV4 ^ state->t[0]; in blake2s_compress_generic()
63 v[13] = BLAKE2S_IV5 ^ state->t[1]; in blake2s_compress_generic()
64 v[14] = BLAKE2S_IV6 ^ state->f[0]; in blake2s_compress_generic()
[all …]
Dsha256.c73 static void sha256_transform(u32 *state, const u8 *input, u32 *W) in sha256_transform() argument
103 a = state[0]; b = state[1]; c = state[2]; d = state[3]; in sha256_transform()
104 e = state[4]; f = state[5]; g = state[6]; h = state[7]; in sha256_transform()
118 state[0] += a; state[1] += b; state[2] += c; state[3] += d; in sha256_transform()
119 state[4] += e; state[5] += f; state[6] += g; state[7] += h; in sha256_transform()
128 sha256_transform(sctx->state, input, W); in sha256_transform_blocks()
Dpoly1305-donna32.c31 void poly1305_core_blocks(struct poly1305_state *state, in poly1305_core_blocks() argument
58 h0 = state->h[0]; in poly1305_core_blocks()
59 h1 = state->h[1]; in poly1305_core_blocks()
60 h2 = state->h[2]; in poly1305_core_blocks()
61 h3 = state->h[3]; in poly1305_core_blocks()
62 h4 = state->h[4]; in poly1305_core_blocks()
112 state->h[0] = h0; in poly1305_core_blocks()
113 state->h[1] = h1; in poly1305_core_blocks()
114 state->h[2] = h2; in poly1305_core_blocks()
115 state->h[3] = h3; in poly1305_core_blocks()
[all …]
Dpoly1305-donna64.c32 void poly1305_core_blocks(struct poly1305_state *state, in poly1305_core_blocks() argument
53 h0 = state->h64[0]; in poly1305_core_blocks()
54 h1 = state->h64[1]; in poly1305_core_blocks()
55 h2 = state->h64[2]; in poly1305_core_blocks()
105 state->h64[0] = h0; in poly1305_core_blocks()
106 state->h64[1] = h1; in poly1305_core_blocks()
107 state->h64[2] = h2; in poly1305_core_blocks()
111 void poly1305_core_emit(const struct poly1305_state *state, const u32 nonce[4], in poly1305_core_emit() argument
120 h0 = state->h64[0]; in poly1305_core_emit()
121 h1 = state->h64[1]; in poly1305_core_emit()
[all …]
Dchacha.c76 void chacha_block_generic(u32 *state, u8 *stream, int nrounds) in chacha_block_generic() argument
81 memcpy(x, state, 64); in chacha_block_generic()
86 put_unaligned_le32(x[i] + state[i], &stream[i * sizeof(u32)]); in chacha_block_generic()
88 state[12]++; in chacha_block_generic()
103 void hchacha_block_generic(const u32 *state, u32 *stream, int nrounds) in hchacha_block_generic() argument
107 memcpy(x, state, 64); in hchacha_block_generic()
Dlibchacha.c15 void chacha_crypt_generic(u32 *state, u8 *dst, const u8 *src, in chacha_crypt_generic() argument
22 chacha_block_generic(state, stream, nrounds); in chacha_crypt_generic()
29 chacha_block_generic(state, stream, nrounds); in chacha_crypt_generic()
/lib/zlib_dfltcc/
Ddfltcc_inflate.c17 struct inflate_state *state = (struct inflate_state *)strm->state; in dfltcc_can_inflate() local
18 struct dfltcc_state *dfltcc_state = GET_DFLTCC_STATE(state); in dfltcc_can_inflate()
32 struct inflate_state *state = (struct inflate_state *)strm->state; in dfltcc_reset_inflate_state() local
33 struct dfltcc_state *dfltcc_state = GET_DFLTCC_STATE(state); in dfltcc_reset_inflate_state()
43 struct inflate_state *state = (struct inflate_state *)strm->state; in dfltcc_was_inflate_used() local
44 struct dfltcc_param_v0 *param = &GET_DFLTCC_STATE(state)->param; in dfltcc_was_inflate_used()
53 struct inflate_state *state = (struct inflate_state *)strm->state; in dfltcc_inflate_disable() local
54 struct dfltcc_state *dfltcc_state = GET_DFLTCC_STATE(state); in dfltcc_inflate_disable()
73 struct inflate_state *state = (struct inflate_state *)strm->state; in dfltcc_xpnd() local
74 struct dfltcc_param_v0 *param = &GET_DFLTCC_STATE(state)->param; in dfltcc_xpnd()
[all …]
Ddfltcc_deflate.c10 #define GET_DFLTCC_DEFLATE_STATE(state) ((struct dfltcc_deflate_state *)GET_DFLTCC_STATE(state)) argument
19 deflate_state *state = (deflate_state *)strm->state; in dfltcc_can_deflate() local
20 struct dfltcc_deflate_state *dfltcc_state = GET_DFLTCC_DEFLATE_STATE(state); in dfltcc_can_deflate()
28 if (!dfltcc_are_params_ok(state->level, state->w_bits, state->strategy, in dfltcc_can_deflate()
43 deflate_state *state = (deflate_state *)strm->state; in dfltcc_reset_deflate_state() local
44 struct dfltcc_deflate_state *dfltcc_state = GET_DFLTCC_DEFLATE_STATE(state); in dfltcc_reset_deflate_state()
63 deflate_state *state = (deflate_state *)strm->state; in dfltcc_gdht() local
64 struct dfltcc_param_v0 *param = &GET_DFLTCC_STATE(state)->param; in dfltcc_gdht()
76 deflate_state *state = (deflate_state *)strm->state; in dfltcc_cmpr() local
77 struct dfltcc_param_v0 *param = &GET_DFLTCC_STATE(state)->param; in dfltcc_cmpr()
[all …]
/lib/vdso/
Dgetrandom.c72 struct vgetrandom_state *state = opaque_state; in __cvdso_getrandom_data() local
81 params->size_of_opaque_state = sizeof(*state); in __cvdso_getrandom_data()
90 if (unlikely(((unsigned long)opaque_state & ~PAGE_MASK) + sizeof(*state) > PAGE_SIZE)) in __cvdso_getrandom_data()
98 if (unlikely(opaque_len != sizeof(*state))) in __cvdso_getrandom_data()
125 in_use = READ_ONCE(state->in_use); in __cvdso_getrandom_data()
129 WRITE_ONCE(state->in_use, true); in __cvdso_getrandom_data()
142 if (unlikely(state->generation != current_generation)) { in __cvdso_getrandom_data()
151 WRITE_ONCE(state->generation, current_generation); in __cvdso_getrandom_data()
160 if (getrandom_syscall(state->key, sizeof(state->key), 0) != sizeof(state->key)) { in __cvdso_getrandom_data()
166 WRITE_ONCE(state->generation, 0); in __cvdso_getrandom_data()
[all …]
/lib/xz/
Dxz_lzma2.h63 static inline void lzma_state_literal(enum lzma_state *state) in lzma_state_literal() argument
65 if (*state <= STATE_SHORTREP_LIT_LIT) in lzma_state_literal()
66 *state = STATE_LIT_LIT; in lzma_state_literal()
67 else if (*state <= STATE_LIT_SHORTREP) in lzma_state_literal()
68 *state -= 3; in lzma_state_literal()
70 *state -= 6; in lzma_state_literal()
74 static inline void lzma_state_match(enum lzma_state *state) in lzma_state_match() argument
76 *state = *state < LIT_STATES ? STATE_LIT_MATCH : STATE_NONLIT_MATCH; in lzma_state_match()
80 static inline void lzma_state_long_rep(enum lzma_state *state) in lzma_state_long_rep() argument
82 *state = *state < LIT_STATES ? STATE_LIT_LONGREP : STATE_NONLIT_REP; in lzma_state_long_rep()
[all …]
Dxz_dec_test.c32 static struct xz_dec *state; variable
70 xz_dec_reset(state); in xz_dec_test_open()
132 ret = xz_dec_run(state, &buffers); in xz_dec_test_write()
184 state = xz_dec_init(XZ_PREALLOC, DICT_MAX); in xz_dec_test_init()
185 if (state == NULL) in xz_dec_test_init()
190 xz_dec_end(state); in xz_dec_test_init()
204 xz_dec_end(state); in xz_dec_test_exit()
/lib/dim/
Drdma_dim.c47 u8 state = dim->tune_state; in rdma_dim_decision() local
51 if (state != DIM_PARKING_ON_TOP && state != DIM_PARKING_TIRED) { in rdma_dim_decision()
86 switch (dim->state) { in rdma_dim()
94 dim->state = DIM_APPLY_NEW_PROFILE; in rdma_dim()
100 dim->state = DIM_MEASURE_IN_PROGRESS; in rdma_dim()

12