Searched refs:counter (Results 1 - 25 of 28) sorted by relevance

12

/fuchsia/zircon/third_party/ulib/musl/src/prng/
H A Drandom.c11 static uint64_t counter; variable
15 uint64_t value = ++counter;
16 if (counter > RAND_MAX || counter > LONG_MAX)
17 counter = 0;
25 counter = seed;
31 return (char*)&counter;
35 return (char*)&counter;
/fuchsia/zircon/system/utest/cobalt-client/
H A Dcounter_test.cpp10 #include <cobalt-client/cpp/counter-internal.h>
11 #include <cobalt-client/cpp/counter.h>
47 BaseCounter counter; local
49 ASSERT_EQ(counter.Load(), 0);
50 counter.Increment();
51 ASSERT_EQ(counter.Load(), 1);
52 counter.Increment();
53 ASSERT_EQ(counter.Load(), 2);
60 BaseCounter counter; local
62 ASSERT_EQ(counter
72 BaseCounter counter; local
85 BaseCounter counter; local
98 BaseCounter* counter; member in struct:cobalt_client::internal::__anon1302::IncrementArgs
119 BaseCounter counter; local
152 BaseCounter* counter; member in struct:cobalt_client::internal::__anon1302::ExchangeArgs
182 BaseCounter counter; local
235 RemoteCounter counter = MakeRemoteCounter(); local
272 RemoteCounter* counter; member in struct:cobalt_client::internal::__anon1302::FlushArgs
311 RemoteCounter counter = MakeRemoteCounter(); local
384 Counter* counter; member in struct:cobalt_client::__anon1303::IncrementArgs
[all...]
H A Dcollector_test.cpp107 // Returns true if the counter was persisted.
108 bool Log(uint64_t metric_id, const RemoteCounter::EventBuffer& counter) override {
110 counters_->InsertOrUpdateEntry(metric_id, counter.metadata()[0].event_type,
111 counter.metadata()[0].event_type_index,
112 [&counter](fbl::unique_ptr<BaseCounter>* persisted) {
116 (*persisted)->Increment(counter.event_data());
159 auto counter = collector.AddCounter(/*metric_id=*/1, /*event_type_index=*/1); local
160 counter.Increment(5);
161 ASSERT_EQ(counter.GetRemoteCount(), 5);
172 auto counter local
228 auto counter = collector.AddCounter(/*metric_id=*/2, /*event_type_index=*/1); local
271 auto counter = collector.AddCounter(/*metric_id=*/2, /*event_type_index=*/1); local
[all...]
/fuchsia/zircon/kernel/tests/
H A Dsync_ipi_tests.cpp40 int* counter = (int*)raw_context; local
41 atomic_add(counter, 1);
48 int counter = 0; local
50 mp_sync_exec(MP_IPI_TARGET_ALL_BUT_LOCAL, 0, counter_task, &counter);
106 int counter = 0; local
111 mp_sync_exec(MP_IPI_TARGET_ALL_BUT_LOCAL, 0, counter_task, &counter);
115 LTRACEF(" Finished signaling all but local (%d)\n", counter);
116 ASSERT((uint)counter == num_cpus - 1);
/fuchsia/zircon/system/ulib/cobalt-client/include/cobalt-client/cpp/
H A Dcollector-internal.h9 #include <cobalt-client/cpp/counter-internal.h>
26 // Returns true if the counter was persisted.
27 virtual bool Log(uint64_t metric_id, const RemoteCounter::EventBuffer& counter) = 0;
H A Dcollector.h7 #include <cobalt-client/cpp/counter.h>
72 // Returns a counter to log events for a given |metric_id| and |event_type_index|
73 // as a raw counter.
82 void LogCounter(internal::RemoteCounter* counter);
H A Dhistogram-internal.h10 #include <cobalt-client/cpp/counter-internal.h>
/fuchsia/zircon/third_party/ulib/uboringssl/include/openssl/
H A Dchacha.h31 // equal. The initial block counter is specified by |counter|.
34 const uint8_t nonce[12], uint32_t counter);
/fuchsia/zircon/system/ulib/cobalt-client/
H A Dcollector.cpp9 #include <cobalt-client/cpp/counter-internal.h>
67 "Exceeded pre-allocated counter capacity.");
84 for (auto& counter : remote_counters_) {
85 LogCounter(&counter);
112 void Collector::LogCounter(RemoteCounter* counter) { argument
113 counter->Flush([this, counter](uint64_t metric_id, const RemoteCounter::EventBuffer& buffer,
115 // Attempt to log data, if we fail, we increase the in process counter by the amount
119 counter->Increment(buffer.event_data());
H A Dcounter.cpp7 #include <cobalt-client/cpp/counter-internal.h>
8 #include <cobalt-client/cpp/counter.h>
28 // Write the current value of the counter to the buffer, and reset it to 0.
H A Drules.mk15 $(LOCAL_DIR)/counter.cpp \
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/fipsmodule/modes/
H A Dctr.c57 // NOTE: the IV/counter CTR mode is big-endian. The code itself
60 // increment counter (128-bit int) by 1
61 static void ctr128_inc(uint8_t *counter) { argument
66 c += counter[n];
67 counter[n] = (uint8_t) c;
74 // The input encrypted as though 128bit counter mode is being used. The extra
76 // contained in *num, and the encrypted counter is kept in ecount_buf. Both
80 // This algorithm assumes that the counter is in the x lower bits of the IV
83 // the counter doesn't overflow into the rest of the IV when incremented.
144 // increment upper 96 bits of 128-bit counter b
145 ctr96_inc(uint8_t *counter) argument
[all...]
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/fipsmodule/rand/
H A Dctrdrbg.c61 OPENSSL_memcpy(drbg->counter.bytes, seed_material + 32, 16);
70 // ctr_inc adds |n| to the last four bytes of |drbg->counter|, treated as a
73 drbg->counter.words[3] =
74 CRYPTO_bswap4(CRYPTO_bswap4(drbg->counter.words[3]) + n);
89 drbg->block(drbg->counter.bytes, temp + i, &drbg->ks);
97 OPENSSL_memcpy(drbg->counter.bytes, temp + 32, 16);
169 drbg->ctr(out, out, num_blocks, &drbg->ks, drbg->counter.bytes);
174 drbg->block(drbg->counter.bytes, out + i, &drbg->ks);
185 drbg->block(drbg->counter.bytes, block, &drbg->ks);
H A Dinternal.h50 } counter; member in struct:__anon1918
/fuchsia/zircon/system/utest/fbl/
H A Dref_ptr_tests.cpp62 RefCallCounter counter;
63 RefCallPtr ptr = fbl::AdoptRef<RefCallCounter>(&counter);
65 EXPECT_TRUE(&counter == ptr.get(), ".get() should point to object");
67 EXPECT_TRUE(&counter == &(*ptr), "operator*");
70 EXPECT_EQ(0, counter.add_ref_calls());
71 EXPECT_EQ(0, counter.release_calls());
78 EXPECT_EQ(1, counter.add_ref_calls());
79 EXPECT_EQ(0, counter.release_calls());
83 EXPECT_EQ(1, counter.add_ref_calls());
84 EXPECT_EQ(1, counter
[all...]
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/chacha/
H A Dchacha.c37 const uint32_t key[8], const uint32_t counter[4]);
41 uint32_t counter) {
44 uint32_t counter_nonce[4]; counter_nonce[0] = counter;
121 uint32_t counter) {
143 input[12] = counter;
39 CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len, const uint8_t key[32], const uint8_t nonce[12], uint32_t counter) argument
119 CRYPTO_chacha_20(uint8_t *out, const uint8_t *in, size_t in_len, const uint8_t key[32], const uint8_t nonce[12], uint32_t counter) argument
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/cipher_extra/
H A De_aesgcmsiv.c189 // initial counter is constructed from the given |tag| as required by
280 // writes |in_len| & 15 bytes to |out| + |in_len|, based on an initial counter
289 } counter; local
290 OPENSSL_memcpy(&counter, tag, sizeof(counter));
291 counter.c[15] |= 0x80;
292 counter.u32[0] += in_len / 16;
295 aes128gcmsiv_ecb_enc_block(&counter.c[0], &counter.c[0], enc_key_expanded);
297 aes256gcmsiv_ecb_enc_block(&counter
611 } counter; local
699 uint8_t counter[AES_BLOCK_SIZE]; local
[all...]
/fuchsia/zircon/system/ulib/trace-engine/
H A Dcontext_impl.h112 // The number of bits in the wrapped counter.
113 // It important that this counter not wrap (well, technically it can,
116 // The current values allow for a 20 bit counter which is plenty.
118 // offset_plus_counter value is printed in hex the counter is easily read.
174 static uint64_t MakeOffsetPlusCounter(uintptr_t offset, uint32_t counter) { argument
175 return offset | (static_cast<uint64_t>(counter) << kWrappedCounterShift);
237 // The generation counter associated with this context to distinguish
279 // plus a wrapped counter. These are combined into one so that they can
283 // the wrapped counter. Bit zero of this counter i
[all...]
/fuchsia/zircon/system/dev/misc/cpu-trace/
H A Dintel-pm.c32 // Individual bits in the fixed counter enable field.
44 // Verify each fixed counter regnum < IPM_MAX_FIXED_COUNTERS.
225 // Map a fixed counter event id to its h/w register number.
453 // The maximum value the counter can have before overflowing.
472 unsigned counter = ipm_fixed_counter_number(id);
474 if (counter == IPM_MAX_FIXED_COUNTERS ||
475 counter >= countof(ocfg->fixed_ids) ||
476 counter >= ss->max_num_fixed) {
480 if (ss->have_fixed[counter]) {
482 __func__, counter);
470 unsigned counter = ipm_fixed_counter_number(id); local
[all...]
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/chacha/asm/
H A Dchacha-x86_64.pl74 ($out,$inp,$len,$key,$counter)=("%rdi","%rsi","%rdx","%rcx","%r8");
255 movdqu ($counter),%xmm3
303 paddd %xmm4,%xmm3 # increment counter
456 movdqu ($counter),$d
464 mov \$10,$counter # reuse $counter
474 mov \$10,$counter
492 &dec ($counter);
531 xor $counter,$counter
[all...]
/fuchsia/zircon/kernel/platform/pc/
H A Dtimer.cpp127 uint64_t counter = hpet_get_value(); local
128 time = u64_mul_u64_fp32_64(counter, ns_per_hpet);
227 * timer 0, mode 2, binary counter, LSB followed by MSB
258 // Stop the PIT by starting a mode change but not writing a counter
614 /* Enable interrupt mode that will stop the decreasing counter of the PIT */
/fuchsia/zircon/system/utest/fit/
H A Ddefer_tests.cpp17 balance(int* counter) argument
18 : counter_(counter) {
/fuchsia/zircon/system/ulib/trace-reader/include/trace-reader/
H A Drecords.h361 explicit EventData(Counter counter) argument
362 : type_(EventType::kCounter), counter_(fbl::move(counter)) {}
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/fipsmodule/modes/asm/
H A Daesni-gcm-x86_64.pl81 ($counter,$rounds,$ret,$const,$in0,$end0)=("%ebx","%ebp","%r10","%r11","%r14","%r15");
105 add \$`6<<24`,$counter
108 vpaddb $T2,$inout5,$T1 # next counter value
113 vmovdqu $T1,($ivp) # save next counter value
334 vpshufb $Ii,$T1,$Z2 # byte-swap counter
347 vpaddd $Z1,$inout4,$T1 # byte-swapped next counter value
350 vpshufb $Ii,$T1,$T1 # next counter value
370 vmovdqu ($ivp),$T1 # load next counter value
467 vmovdqu ($ivp),$T1 # input counter value
469 mov 12($ivp),$counter
[all...]
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/fipsmodule/cipher/
H A De_aes.c393 // increment counter (64-bit int) by 1
394 static void ctr64_inc(uint8_t *counter) { argument
400 c = counter[n];
402 counter[n] = c;

Completed in 319 milliseconds

12