Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 25 of 482) sorted by relevance

12345678910>>...20

/freebsd-12-stable/contrib/subversion/subversion/libsvn_fs_x/
Dbatch_fsync.c119 waitable_counter_t *counter = apr_pcalloc(result_pool, sizeof(*counter)); in waitable_counter__create() local
120 counter->value = 0; in waitable_counter__create()
122 SVN_ERR(svn_thread_cond__create(&counter->cond, result_pool)); in waitable_counter__create()
123 SVN_ERR(svn_mutex__init(&counter->mutex, TRUE, result_pool)); in waitable_counter__create()
125 *counter_p = counter; in waitable_counter__create()
132 waitable_counter__increment(waitable_counter_t *counter) in waitable_counter__increment() argument
134 SVN_ERR(svn_mutex__lock(counter->mutex)); in waitable_counter__increment()
135 counter->value++; in waitable_counter__increment()
137 SVN_ERR(svn_thread_cond__broadcast(counter->cond)); in waitable_counter__increment()
138 SVN_ERR(svn_mutex__unlock(counter->mutex, SVN_NO_ERROR)); in waitable_counter__increment()
[all …]
/freebsd-12-stable/usr.sbin/keyserv/
Dcrypt_server.c91 short counter; in prepare_key() local
94 for(counter = 0; counter < 256; counter++) in prepare_key()
95 state[counter] = counter; in prepare_key()
100 for(counter = 0; counter < 256; counter++) in prepare_key()
102 index2 = (key_data_ptr[index1] + state[counter] + in prepare_key()
104 swap_byte(&state[counter], &state[index2]); in prepare_key()
116 short counter; in arcfour() local
122 for(counter = 0; counter < buffer_len; counter ++) in arcfour()
130 buffer_ptr[counter] ^= state[xorIndex]; in arcfour()
/freebsd-12-stable/sys/compat/linuxkpi/common/include/asm/
Datomic-long.h38 #define ATOMIC_LONG_INIT(x) { .counter = (x) }
41 volatile long counter; member
52 return i + atomic_fetchadd_long(&v->counter, i); in atomic_long_add_return()
58 WRITE_ONCE(v->counter, i); in atomic_long_set()
64 return READ_ONCE(v->counter); in atomic_long_read()
70 return atomic_fetchadd_long(&v->counter, 1) + 1; in atomic_long_inc()
76 return atomic_fetchadd_long(&v->counter, -1) - 1; in atomic_long_dec()
83 return atomic_swap_long(&v->counter, val); in atomic_long_xchg()
87 while (!atomic_fcmpset_long(&v->counter, &ret, val)) in atomic_long_xchg()
99 if (atomic_fcmpset_long(&v->counter, &ret, new)) in atomic_long_cmpxchg()
[all …]
Datomic64.h36 volatile int64_t counter; member
39 #define ATOMIC64_INIT(x) { .counter = (x) }
59 return i + atomic_fetchadd_64(&v->counter, i); in atomic64_add_return()
65 return atomic_fetchadd_64(&v->counter, -i) - i; in atomic64_sub_return()
71 atomic_store_rel_64(&v->counter, i); in atomic64_set()
77 return READ_ONCE(v->counter); in atomic64_read()
83 return atomic_fetchadd_64(&v->counter, 1) + 1; in atomic64_inc()
89 return atomic_fetchadd_64(&v->counter, -1) - 1; in atomic64_dec()
100 if (likely(atomic_fcmpset_64(&v->counter, &c, c + a))) in atomic64_add_unless()
114 if (likely(atomic_fcmpset_64(&v->counter, &c, c + a))) in atomic64_fetch_add_unless()
[all …]
Datomic.h39 #define ATOMIC_INIT(x) { .counter = (x) }
42 volatile int counter; member
63 return i + atomic_fetchadd_int(&v->counter, i); in atomic_add_return()
69 return atomic_fetchadd_int(&v->counter, -i) - i; in atomic_sub_return()
75 WRITE_ONCE(v->counter, i); in atomic_set()
81 atomic_store_rel_int(&v->counter, i); in atomic_set_release()
87 atomic_set_int(&v->counter, mask); in atomic_set_mask()
93 return READ_ONCE(v->counter); in atomic_read()
99 return atomic_fetchadd_int(&v->counter, 1) + 1; in atomic_inc()
105 return atomic_fetchadd_int(&v->counter, -1) - 1; in atomic_dec()
[all …]
/freebsd-12-stable/contrib/wpa/src/eap_common/
Deap_psk_common.c38 u8 counter = 1; in eap_psk_derive_keys() local
44 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys()
47 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys()
48 counter++; in eap_psk_derive_keys()
51 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys()
54 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys()
55 counter++; in eap_psk_derive_keys()
59 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys()
63 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys()
64 counter++; in eap_psk_derive_keys()
/freebsd-12-stable/contrib/gcc/config/i386/
Dgthr-win32.c149 mutex->counter = -1; in __gthr_win32_mutex_init_function()
156 if (InterlockedIncrement (&mutex->counter) == 0 || in __gthr_win32_mutex_lock()
163 InterlockedDecrement (&mutex->counter); in __gthr_win32_mutex_lock()
171 if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0) in __gthr_win32_mutex_trylock()
180 if (InterlockedDecrement (&mutex->counter) >= 0) in __gthr_win32_mutex_unlock()
189 mutex->counter = -1; in __gthr_win32_recursive_mutex_init_function()
199 if (InterlockedIncrement (&mutex->counter) == 0) in __gthr_win32_recursive_mutex_lock()
206 InterlockedDecrement (&mutex->counter); in __gthr_win32_recursive_mutex_lock()
218 InterlockedDecrement (&mutex->counter); in __gthr_win32_recursive_mutex_lock()
228 if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0) in __gthr_win32_recursive_mutex_trylock()
[all …]
/freebsd-12-stable/crypto/openssl/crypto/evp/
De_chacha20_poly1305.c26 unsigned int counter[CHACHA_CTR_SIZE / 4]; member
49 key->counter[i/4] = CHACHA_U8TOU32(iv+i); in chacha_init_key()
75 key->counter[0]++; in chacha_cipher()
76 if (key->counter[0] == 0) in chacha_cipher()
77 key->counter[1]++; in chacha_cipher()
83 ctr32 = key->counter[0]; in chacha_cipher()
106 ChaCha20_ctr32(out, inp, blocks, key->key.d, key->counter); in chacha_cipher()
111 key->counter[0] = ctr32; in chacha_cipher()
112 if (ctr32 == 0) key->counter[1]++; in chacha_cipher()
118 key->key.d, key->counter); in chacha_cipher()
[all …]
/freebsd-12-stable/contrib/ee/
Dee.c552 int counter; local
554 for (counter = 1; counter < 24; counter++)
555 signal(counter, SIG_IGN);
610 counter = 0;
691 int counter; local
698 counter = len_char('\011', scr_horz);
699 for (; counter > 0; counter--)
710 counter = position;
711 while (counter < curr_line->line_length) /* find end of line */
713 counter++;
[all …]
/freebsd-12-stable/contrib/gcc/
Dcoverage.c324 get_coverage_counts (unsigned counter, unsigned expected, in get_coverage_counts() argument
344 elt.ctr = counter; in get_coverage_counts()
358 ctr_names[counter]); in get_coverage_counts()
366 ctr_names[counter]); in get_coverage_counts()
381 coverage_counter_alloc (unsigned counter, unsigned num) in coverage_counter_alloc() argument
389 if (!tree_ctr_tables[counter]) in coverage_counter_alloc()
398 tree_ctr_tables[counter] in coverage_counter_alloc()
400 TREE_STATIC (tree_ctr_tables[counter]) = 1; in coverage_counter_alloc()
401 ASM_GENERATE_INTERNAL_LABEL (buf, "LPBX", counter + 1); in coverage_counter_alloc()
402 DECL_NAME (tree_ctr_tables[counter]) = get_identifier (buf); in coverage_counter_alloc()
[all …]
Dgthr-win32.h344 long counter; member
349 long counter; member
613 mutex->counter = -1; in __gthread_mutex_init_function()
624 if (InterlockedIncrement (&mutex->counter) == 0 || in __gthread_mutex_lock()
631 InterlockedDecrement (&mutex->counter); in __gthread_mutex_lock()
645 if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0) in __gthread_mutex_trylock()
658 if (InterlockedDecrement (&mutex->counter) >= 0) in __gthread_mutex_unlock()
667 mutex->counter = -1; in __gthread_recursive_mutex_init_function()
679 if (InterlockedIncrement (&mutex->counter) == 0) in __gthread_recursive_mutex_lock()
686 InterlockedDecrement (&mutex->counter); in __gthread_recursive_mutex_lock()
[all …]
/freebsd-12-stable/tools/tools/mid/
Dmid-index12 local($counter);
15 $counter = 0;
45 $counter++;
47 if ($debug && $counter % $speedstep == 0) {
48 print STDERR sprintf("\r%7d", $counter);
69 print STDERR sprintf("\r%7d", $counter)
70 if $debug && $counter % $speedstep != 0;
/freebsd-12-stable/crypto/openssl/crypto/modes/
Dctr128.c26 static void ctr128_inc(unsigned char *counter) in ctr128_inc() argument
32 c += counter[n]; in ctr128_inc()
33 counter[n] = (u8)c; in ctr128_inc()
39 static void ctr128_inc_aligned(unsigned char *counter) in ctr128_inc_aligned() argument
49 if (is_endian.little || ((size_t)counter % sizeof(size_t)) != 0) { in ctr128_inc_aligned()
50 ctr128_inc(counter); in ctr128_inc_aligned()
54 data = (size_t *)counter; in ctr128_inc_aligned()
142 static void ctr96_inc(unsigned char *counter) in ctr96_inc() argument
148 c += counter[n]; in ctr96_inc()
149 counter[n] = (u8)c; in ctr96_inc()
/freebsd-12-stable/sys/crypto/chacha20/
Dchacha.c85 chacha_ivsetup(chacha_ctx *x, const u8 *iv, const u8 *counter) in chacha_ivsetup() argument
88 x->input[12] = counter == NULL ? 0 : U8TO32_LITTLE(counter + 0); in chacha_ivsetup()
89 x->input[13] = counter == NULL ? 0 : U8TO32_LITTLE(counter + 4); in chacha_ivsetup()
95 x->input[12] = U8TO32_LITTLE(counter + 0); in chacha_ivsetup()
96 x->input[13] = U8TO32_LITTLE(counter + 4); in chacha_ivsetup()
97 x->input[14] = U8TO32_LITTLE(counter + 8); in chacha_ivsetup()
98 x->input[15] = U8TO32_LITTLE(counter + 12); in chacha_ivsetup()
104 chacha_ctrsave(const chacha_ctx *x, u8 *counter) in chacha_ctrsave() argument
106 U32TO8_LITTLE(counter + 0, x->input[12]); in chacha_ctrsave()
107 U32TO8_LITTLE(counter + 4, x->input[13]); in chacha_ctrsave()
[all …]
/freebsd-12-stable/sys/contrib/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/
Dchacha20_dolbeau-avx2.c54 chacha_ivsetup(chacha_ctx *ctx, const uint8_t *iv, const uint8_t *counter) in chacha_ivsetup() argument
56 ctx->input[12] = counter == NULL ? 0 : LOAD32_LE(counter + 0); in chacha_ivsetup()
57 ctx->input[13] = counter == NULL ? 0 : LOAD32_LE(counter + 4); in chacha_ivsetup()
63 chacha_ietf_ivsetup(chacha_ctx *ctx, const uint8_t *iv, const uint8_t *counter) in chacha_ietf_ivsetup() argument
65 ctx->input[12] = counter == NULL ? 0 : LOAD32_LE(counter); in chacha_ietf_ivsetup()
Dchacha20_dolbeau-ssse3.c49 chacha_ivsetup(chacha_ctx *ctx, const uint8_t *iv, const uint8_t *counter) in chacha_ivsetup() argument
51 ctx->input[12] = counter == NULL ? 0 : LOAD32_LE(counter + 0); in chacha_ivsetup()
52 ctx->input[13] = counter == NULL ? 0 : LOAD32_LE(counter + 4); in chacha_ivsetup()
58 chacha_ietf_ivsetup(chacha_ctx *ctx, const uint8_t *iv, const uint8_t *counter) in chacha_ietf_ivsetup() argument
60 ctx->input[12] = counter == NULL ? 0 : LOAD32_LE(counter); in chacha_ietf_ivsetup()
/freebsd-12-stable/sys/contrib/ncsw/Peripherals/FM/Port/
Dfman_port.c451 enum fman_port_stats_counters counter, in get_rx_stats_reg() argument
456 switch (counter) { in get_rx_stats_reg()
487 enum fman_port_stats_counters counter, in get_tx_stats_reg() argument
492 switch (counter) { in get_tx_stats_reg()
514 enum fman_port_stats_counters counter, in get_oh_stats_reg() argument
519 switch (counter) { in get_oh_stats_reg()
550 enum fman_port_perf_counters counter, in get_rx_perf_reg() argument
555 switch (counter) { in get_rx_perf_reg()
580 enum fman_port_perf_counters counter, in get_tx_perf_reg() argument
585 switch (counter) { in get_tx_perf_reg()
[all …]
/freebsd-12-stable/contrib/wpa/src/crypto/
Daes-ctr.c32 u8 counter[AES_BLOCK_SIZE], buf[AES_BLOCK_SIZE]; in aes_ctr_encrypt() local
37 os_memcpy(counter, nonce, AES_BLOCK_SIZE); in aes_ctr_encrypt()
40 aes_encrypt(ctx, counter, buf); in aes_ctr_encrypt()
49 counter[i]++; in aes_ctr_encrypt()
50 if (counter[i]) in aes_ctr_encrypt()
/freebsd-12-stable/contrib/netbsd-tests/lib/libpthread_dbg/
Dt_threads.c127 int *counter = (int *)arg; in iterateThreads2() local
129 ++(*counter); in iterateThreads2()
194 int *counter = (int *)arg; in iterateThreads3() local
199 ++(*counter); in iterateThreads3()
265 int *counter = (int *)arg; in iterateThreads4() local
272 ++(*counter); in iterateThreads4()
342 int *counter = (int *)arg; in iterateThreads5() local
353 ++(*counter); in iterateThreads5()
424 int *counter = (int *)arg; in iterateThreads6() local
426 ++(*counter); in iterateThreads6()
[all …]
/freebsd-12-stable/sys/compat/linuxkpi/common/include/linux/
Dkref.h53 refcount_init(&kref->refcount.counter, 1); in kref_init()
67 refcount_acquire(&kref->refcount.counter); in kref_get()
74 if (refcount_release(&kref->refcount.counter)) { in kref_put()
86 if (refcount_release(&kref->refcount.counter)) { in kref_put_lock()
101 if (refcount_release(&kref->refcount.counter)) { in kref_sub()
/freebsd-12-stable/tools/tools/netrate/tcpconnect/
Dtcpconnect.c111 u_int64_t counter; in main() local
127 counter = 0; in main()
130 counter++; in main()
132 printf("%ju count\n", (uintmax_t)counter); in main()
133 printf("%ju connections/second\n", (uintmax_t)(counter / SECONDS)); in main()
/freebsd-12-stable/crypto/openssl/crypto/dh/
Ddh_asn1.c49 BIGNUM *counter; member
62 ASN1_SIMPLE(int_dhvparams, counter, BIGNUM)
107 dh->counter = dhx->vparams->counter; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname()
127 if (dh->counter && dh->seed && dh->seedlen > 0) { in i2d_DHxparams()
132 dhv.counter = dh->counter; in i2d_DHxparams()
/freebsd-12-stable/contrib/ntp/sntp/
Dlog.c7 static int counter = 0; variable
30 counter = 1; //counter++; in open_logfile()
40 if(counter == 1){ in cleanup_log()
45 counter = 0; in cleanup_log()
/freebsd-12-stable/contrib/gcclibs/libcpp/
Dpch.c342 if (fwrite (&r->counter, sizeof (r->counter), 1, f) != 1) in cpp_write_pch_deps()
375 if (fwrite (&r->counter, sizeof (r->counter), 1, f) != 1) in cpp_write_pch_state()
443 unsigned int counter; in cpp_valid_state() local
552 if (read (fd, &counter, sizeof (counter)) != sizeof (counter)) in cpp_valid_state()
554 if (counter && r->counter) in cpp_valid_state()
668 unsigned int counter; in cpp_read_state() local
728 if (fread (&counter, sizeof (counter), 1, f) != 1) in cpp_read_state()
731 if (!r->counter) in cpp_read_state()
732 r->counter = counter; in cpp_read_state()
/freebsd-12-stable/sys/amd64/vmm/io/
Dvhpet.c99 static void vhpet_start_timer(struct vhpet *vhpet, int n, uint32_t counter,
253 vhpet_adjust_compval(struct vhpet *vhpet, int n, uint32_t counter) in vhpet_adjust_compval() argument
273 compnext = compval + ((counter - compval) / comprate + 1) * comprate; in vhpet_adjust_compval()
282 uint32_t counter; in vhpet_handler() local
308 counter = vhpet_counter(vhpet, &now); in vhpet_handler()
309 vhpet_start_timer(vhpet, n, counter, now); in vhpet_handler()
338 vhpet_start_timer(struct vhpet *vhpet, int n, uint32_t counter, sbintime_t now) in vhpet_start_timer() argument
343 vhpet_adjust_compval(vhpet, n, counter); in vhpet_start_timer()
353 delta = (vhpet->timer[n].compval - counter) * vhpet->freq_sbt; in vhpet_start_timer()
377 vhpet_stop_counting(struct vhpet *vhpet, uint32_t counter, sbintime_t now) in vhpet_stop_counting() argument
[all …]

12345678910>>...20