| /libevent-2.1.12/ |
| H A D | evutil_rand.c | 72 ev_arc4random_buf(void *buf, size_t n) in ev_arc4random_buf() argument 75 arc4random_buf(buf, n); in ev_arc4random_buf() 91 arc4random_buf(buf, n); in ev_arc4random_buf() 103 n -= n_bytes; in ev_arc4random_buf() 105 while (n >= 4) { in ev_arc4random_buf() 108 n -= 4; in ev_arc4random_buf() 110 if (n) { in ev_arc4random_buf() 112 memcpy(b, &u, n); in ev_arc4random_buf() 182 arc4random_buf(buf, n); in ev_arc4random_buf() 190 ev_arc4random_buf(buf, n); in evutil_secure_rng_get_bytes() [all …]
|
| H A D | arc4random.c | 102 int n; in arc4_init() local 104 for (n = 0; n < 256; n++) in arc4_init() 105 rs.s[n] = n; in arc4_init() 113 int n; in arc4_addrandom() local 117 for (n = 0; n < 256; n++) { in arc4_addrandom() 179 size_t len, n; in arc4_seed_getrandom() local 216 size_t len, n; in arc4_seed_sysctl_bsd() local 264 if (n<=0) in arc4_seed_proc_sys_kernel_random_uuid() 297 size_t n; in arc4_seed_urandom_helper_() local 304 if (n != sizeof(buf)) in arc4_seed_urandom_helper_() [all …]
|
| H A D | minheap-internal.h | 42 unsigned n, a; member 73 if (s->n == UINT32_MAX || min_heap_reserve_(s, s->n + 1)) in min_heap_push_() 75 min_heap_shift_up_(s, s->n++, e); in min_heap_push_() 81 if (s->n) in min_heap_pop_() 84 min_heap_shift_down_(s, 0u, s->p[--s->n]); in min_heap_pop_() 100 struct event *last = s->p[--s->n]; in min_heap_erase_() 133 int min_heap_reserve_(min_heap_t* s, unsigned n) in min_heap_reserve_() argument 135 if (s->a < n) in min_heap_reserve_() 139 if (a < n) in min_heap_reserve_() 140 a = n; in min_heap_reserve_() [all …]
|
| H A D | strlcpy.c | 55 register size_t n = siz; local 58 if (n != 0 && --n != 0) { 62 } while (--n != 0); 66 if (n == 0) {
|
| H A D | buffer.c | 636 int n; in evbuffer_add_iovec() local 644 for (n = 0; n < n_vec; n++) { in evbuffer_add_iovec() 652 for (n = 0; n < n_vec; n++) { in evbuffer_add_iovec() 689 n = 1; in evbuffer_reserve_space() 699 return n; in evbuffer_reserve_space() 706 int n = 0; in advance_last_with_data() local 718 ++n; in advance_last_with_data() 720 return n; in advance_last_with_data() 1177 n = -1; in evbuffer_remove() 2287 int n; in evbuffer_read() local [all …]
|
| H A D | ratelim-internal.h | 91 #define ev_token_bucket_decrement_read(b,n) \ argument 93 (b)->read_limit -= (n); \ 96 #define ev_token_bucket_decrement_write(b,n) \ argument 98 (b)->write_limit -= (n); \
|
| H A D | bufferevent_pair.c | 157 size_t n; in be_pair_transfer() local 165 n = dst->wm_read.high - dst_size; in be_pair_transfer() 166 evbuffer_remove_buffer(src->output, dst->input, n); in be_pair_transfer() 170 n = evbuffer_get_length(src->output); in be_pair_transfer() 174 n = evbuffer_get_length(src->output); in be_pair_transfer() 178 if (n) { in be_pair_transfer()
|
| H A D | event_iocp.c | 253 int n; in event_iocp_shutdown_() local 265 n = port->n_live_threads; in event_iocp_shutdown_() 267 if (n == 0) { in event_iocp_shutdown_() 278 ev_uintptr_t key, ev_uint32_t n) in event_iocp_activate_overlapped_() argument 282 r = PostQueuedCompletionStatus(port->port, n, key, &o->overlapped); in event_iocp_activate_overlapped_()
|
| H A D | signal.c | 136 ev_ssize_t n; in evsig_cb() local 147 n = recv(fd, signals, sizeof(signals), 0); in evsig_cb() 149 n = read(fd, signals, sizeof(signals)); in evsig_cb() 151 if (n == -1) { in evsig_cb() 156 } else if (n == 0) { in evsig_cb() 160 for (i = 0; i < n; ++i) { in evsig_cb()
|
| H A D | mm-internal.h | 82 #define mm_calloc(n, sz) calloc((n), (sz))
|
| H A D | ht-internal.h | 390 unsigned n, i; \ 408 for (n = i = 0; i < head->hth_table_length; ++i) { \ 414 ++n; \ 417 if (n != head->hth_n_entries) \ 425 #define HT_FIND_OR_INSERT_(name, field, hashfn, head, eltype, elm, var, y, n) \ argument 437 n; \
|
| H A D | evutil.c | 490 int n; in evutil_strtoll() 494 n = sscanf(s, "%lld", &r); in evutil_strtoll() 502 if (n != 1) in evutil_strtoll() 893 int n; in parse_numeric_servname() local 896 if (n>=0 && n <= 65535 && servname[0] && endptr && !endptr[0]) in parse_numeric_servname() 897 return n; in parse_numeric_servname() 910 if (n>=0) in evutil_parse_servname() 911 return n; in evutil_parse_servname() 2409 while (n--) { in evutil_ascii_strncasecmp() 2576 unsigned n; in evutil_load_windows_system_library_() local [all …]
|
| H A D | evutil_time.c | 75 #define U64_LITERAL(n) n##ui64 in evutil_gettimeofday() argument 77 #define U64_LITERAL(n) n##llu in evutil_gettimeofday()
|
| /libevent-2.1.12/cmake/ |
| H A D | CheckWorkingKqueue.cmake | 16 int n; 27 while ((n = write(fd[1], buf, sizeof(buf))) == sizeof(buf)) 37 n = kevent(kq, &ev, 1, NULL, 0, NULL); 38 if (n == -1) 45 n = kevent(kq, NULL, 0, &ev, 1, &ts); 46 if (n == -1 || n == 0)
|
| H A D | CheckPrototypeDefinition.cmake | 29 set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n") 47 "${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n") 72 …ermining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n" 73 "${OUTPUT}\n\n") 78 …ermining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n" 79 "${OUTPUT}\n\n${_SOURCE}\n\n")
|
| /libevent-2.1.12/test/ |
| H A D | tinytest.c | 416 int i, j, n, r; local 419 n = 0; 424 n += r; 426 return n; 437 int n = 0; local 445 ++n; 451 ++n; 457 return n; 469 int i, j, n=0; local 513 n += r; [all …]
|
| H A D | bench.c | 81 ev_ssize_t n; in read_cb() local 83 n = recv(fd, (char*)&ch, sizeof(ch), 0); in read_cb() 84 if (n >= 0) in read_cb() 85 count += n; in read_cb() 91 n = send(pipes[2 * widx + 1], "e", 1, 0); in read_cb() 92 if (n != 1) in read_cb()
|
| H A D | regress_zlib.c | 137 int res, n; in zlib_input_filter() local 143 n = evbuffer_peek(src, -1, NULL, v_in, 1); in zlib_input_filter() 144 if (n) { in zlib_input_filter() 191 int res, n; in zlib_output_filter() local 197 n = evbuffer_peek(src, -1, NULL, v_in, 1); in zlib_output_filter() 198 if (n) { in zlib_output_filter()
|
| H A D | regress_buffer.c | 130 int n = 0; in evbuffer_get_waste() local 136 ++n; in evbuffer_get_waste() 142 ++n; in evbuffer_get_waste() 151 ++n; in evbuffer_get_waste() 161 ++n; in evbuffer_get_waste() 606 int n, i; in test_evbuffer_reserve2() local 704 int n; in test_evbuffer_reserve_many() local 1693 n = 0; in test_evbuffer_iterative() 1708 n++; in test_evbuffer_iterative() 2247 int n; in test_evbuffer_prepend() local [all …]
|
| H A D | regress_iocp.c | 122 dummy_cb(struct event_overlapped *o, uintptr_t key, ev_ssize_t n, int ok) in dummy_cb() argument 130 d_o->sizes[d_o->call_count] = n; in dummy_cb() 139 pair_is_in(struct dummy_overlapped *o, uintptr_t key, ev_ssize_t n) in pair_is_in() argument 145 if (o->keys[i] == key && o->sizes[i] == n) { in pair_is_in() 311 size_t n; in test_iocp_bufferevent_async() local 333 n = bufferevent_read(bea2, buf, sizeof(buf)-1); in test_iocp_bufferevent_async() 334 buf[n]='\0'; in test_iocp_bufferevent_async()
|
| H A D | test-changelist.c | 85 ev_int64_t n = ft->dwHighDateTime; in filetime_to_100nsec() local 86 n <<= 32; in filetime_to_100nsec() 87 n += ft->dwLowDateTime; in filetime_to_100nsec() 88 return n; in filetime_to_100nsec()
|
| H A D | bench_httpclient.c | 77 size_t n = evbuffer_get_length(input); in readcb() local 79 ri->n_read += n; in readcb() 80 evbuffer_drain(input, n); in readcb()
|
| H A D | test-time.c | 55 rand_int(int n) in rand_int() argument 57 return evutil_weakrand_(&weakrand_state) % n; in rand_int()
|
| H A D | regress_finalize.c | 164 tfff_malloc(size_t n) in tfff_malloc() argument 166 return malloc(n); in tfff_malloc() 360 int n; 374 n = event_callback_finalize_many(base, 4, array,
|
| /libevent-2.1.12/sample/ |
| H A D | dns-example.c | 61 char *n = (char*)orig; in main_callback() local 65 printf("%s: %s\n", n, debug_ntoa(((u32*)addrs)[i])); in main_callback() 67 printf("%s: %s\n", n, ((char**)addrs)[i]); in main_callback() 71 printf("%s: No answer (%d)\n", n, result); in main_callback()
|