Searched refs:state (Results 1 - 25 of 40) sorted by relevance

12

/bionic/libc/bionic/
H A Dmbrtoc16.cpp36 static inline bool mbspartialc16(const mbstate_t* state) { argument
37 return mbstate_get_byte(state, 3) != 0;
41 size_t nconv, mbstate_t* state) {
45 mbstate_set_byte(state, 0, trail & 0x00ff);
46 mbstate_set_byte(state, 1, (trail & 0xff00) >> 8);
47 mbstate_set_byte(state, 3, nconv & 0xff);
54 static size_t finish_surrogate(char16_t* pc16, mbstate_t* state) { argument
55 char16_t trail = mbstate_get_byte(state, 1) << 8 |
56 mbstate_get_byte(state, 0);
58 return reset_and_return(mbstate_get_byte(state,
40 begin_surrogate(char32_t c32, char16_t* pc16, size_t nconv, mbstate_t* state) argument
63 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local
[all...]
H A D__cxa_guard.cpp52 int volatile state; member in union:_guard_t
65 int volatile state; member in union:_guard_t
81 if (__bionic_cmpxchg(0, pending, &gv->state) == 0) {
85 __bionic_cmpxchg(pending, waiting, &gv->state); // Indicate there is a waiter
86 __futex_wait(&gv->state, waiting, NULL);
88 if (gv->state != ready) {
102 if (__bionic_cmpxchg(pending, ready, &gv->state) == 0) {
106 gv->state = ready;
107 __futex_wake(&gv->state, 0x7fffffff);
112 gv->state
[all...]
H A Dmbrtoc32.cpp38 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local
40 // We should never get to a state which has all 4 bytes of the sequence set.
41 // Full state verification is done when decoding the sequence (after we have
43 if (mbstate_get_byte(state, 3) != 0) {
44 return reset_and_return_illegal(EINVAL, state);
58 if (mbsinit(state) && (((ch = static_cast<uint8_t>(*s)) & ~0x7f) == 0)) {
80 // The first byte in the state (if any) tells the length.
81 size_t bytes_so_far = mbstate_bytes_so_far(state);
82 ch = bytes_so_far > 0 ? mbstate_get_byte(state, 0) : static_cast<uint8_t>(*s);
101 return reset_and_return_illegal(EILSEQ, state);
[all...]
H A Dc16rtomb.cpp45 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local
46 if (mbsinit(state)) {
49 mbstate_set_byte(state, 3, (c32 & 0xff0000) >> 16);
50 mbstate_set_byte(state, 2, (c32 & 0x00ff00) >> 8);
53 return reset_and_return_illegal(EINVAL, state);
55 return c32rtomb(s, static_cast<char32_t>(c16), state);
59 return reset_and_return_illegal(EINVAL, state);
62 char32_t c32 = ((mbstate_get_byte(state, 3) << 16) |
63 (mbstate_get_byte(state, 2) << 8) |
65 return reset_and_return(c32rtomb(s, c32, NULL), state);
[all...]
H A Dc32rtomb.cpp37 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local
41 return reset_and_return(1, state);
46 // shift state. Since shift states are not supported, only the null byte is
50 reset_and_return(1, state);
53 if (!mbsinit(state)) {
54 return reset_and_return_illegal(EILSEQ, state);
H A Dstubs.cpp44 // Thread-specific state for the non-reentrant functions.
125 stubs_state_t* state = static_cast<stubs_state_t*>(ptr); local
126 free(state);
151 static passwd* android_iinfo_to_passwd(stubs_state_t* state, argument
153 snprintf(state->dir_buffer_, sizeof(state->dir_buffer_), "/");
154 snprintf(state->sh_buffer_, sizeof(state->sh_buffer_), "/system/bin/sh");
156 passwd* pw = &state->passwd_;
160 pw->pw_dir = state
174 android_id_to_passwd(stubs_state_t* state, unsigned id) argument
183 android_name_to_passwd(stubs_state_t* state, const char* name) argument
296 app_id_to_passwd(uid_t uid, stubs_state_t* state) argument
329 app_id_to_group(gid_t gid, stubs_state_t* state) argument
348 stubs_state_t* state = __stubs_state(); local
361 stubs_state_t* state = __stubs_state(); local
389 stubs_state_t* state = __stubs_state(); local
403 stubs_state_t* state = __stubs_state(); local
[all...]
H A Dwchar.cpp42 // The state is the UTF-8 sequence. We only support <= 4-bytes sequences so LP32
45 // intermediary state).
47 // The C standard leaves the conversion state undefined after a bad conversion.
49 // state we always reset the conversion state when encountering illegal
62 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local
65 return mbrtoc32(reinterpret_cast<char32_t*>(pwc), s, n, state);
70 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local
79 if ((nmc > 0) && (mbstate_bytes_so_far(state) > 0)
81 return reset_and_return_illegal(EILSEQ, state);
152 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local
160 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local
[all...]
H A Dpthread_rwlock.cpp119 rwlock->state = 0;
128 if (rwlock->state != 0) {
146 int32_t cur_state = rwlock->state; // C++11 relaxed atomic read
149 done = __sync_bool_compare_and_swap(&rwlock->state, cur_state, cur_state + 1); // C++11 memory_order_aquire
155 // To avoid losing wake ups the pending_readers update and the state read should be
158 int ret = __futex_wait_ex(&rwlock->state, rwlock_is_shared(rwlock), cur_state, rel_timeout);
179 int32_t cur_state = rwlock->state;
181 // Change state from 0 to -1.
182 done = __sync_bool_compare_and_swap(&rwlock->state, 0 /* cur state */,
[all...]
H A Ddebug_stacktrace.cpp96 stack_crawl_state_t* state = static_cast<stack_crawl_state_t*>(arg); local
101 if (ip != 0 && !state->have_skipped_self) {
102 state->have_skipped_self = true;
124 state->frames[state->frame_count++] = ip;
125 return (state->frame_count >= state->max_depth) ? _URC_END_OF_STACK : _URC_NO_REASON;
131 stack_crawl_state_t state(frames, max_depth);
132 _Unwind_Backtrace(trace_function, &state);
133 return state
[all...]
H A Dpthread_attr.cpp55 int pthread_attr_setdetachstate(pthread_attr_t* attr, int state) { argument
56 if (state == PTHREAD_CREATE_DETACHED) {
58 } else if (state == PTHREAD_CREATE_JOINABLE) {
66 int pthread_attr_getdetachstate(const pthread_attr_t* attr, int* state) { argument
67 *state = (attr->flags & PTHREAD_ATTR_FLAG_DETACHED) ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE;
/bionic/tests/
H A Dstring_test.cpp181 // Calculate input lengths and fill state.len with them.
199 StringTestState<char> state(SMALL);
200 for (size_t i = 1; i < state.n; i++) {
202 state.NewIteration();
204 memset(state.ptr2, '\2', state.MAX_LEN);
205 state.ptr2[state.MAX_LEN - 1] = '\0';
206 memcpy(state.ptr, state
[all...]
/bionic/libc/upstream-netbsd/common/lib/libc/stdlib/
H A Drandom.c76 * rand()/srand() like interface, this package also has a special state info
80 * that much state information. Good sizes for the amount of state
81 * information are 32, 64, 128, and 256 bytes. The state can be switched by
83 * with initstate(). By default, the package runs with 128 bytes of state
85 * congruential generator. If the amount of state information is less than
88 * Internally, the state information is treated as an array of ints; the
90 * integer); the remainder of the array is the state information for the
91 * R.N.G. Thus, 32 bytes of state information will give 7 ints worth of
92 * state informatio
248 static int *state = &randtbl[1]; variable
[all...]
/bionic/libc/kernel/uapi/linux/netfilter/
H A Dnf_conntrack_sctp.h37 enum sctp_conntrack state; member in struct:ip_ct_sctp
/bionic/libc/upstream-netbsd/android/include/sys/
H A Dsha1.h19 uint32_t state[5]; member in struct:__anon891
/bionic/libc/dns/net/
H A Dbase64.c221 int state, ch; local
227 state = 0;
241 switch (state) {
248 state = 1;
260 state = 2;
272 state = 3;
281 state = 0;
295 switch (state) {
335 if (state != 0)
/bionic/libc/kernel/tools/
H A Dupdate_all.py81 state = "unchanged" variable
83 state = "edited" variable
85 state = "added" variable
87 str = "cleaning: %-*s -> %-*s (%s)" % ( 35, "<original>" + path[len(original_dir):], 35, dst_path, state )
/bionic/libc/kernel/uapi/linux/raid/
H A Dmd_u.h75 int state; member in struct:mdu_array_info_s
96 int state; member in struct:mdu_disk_info_s
104 int state; member in struct:mdu_start_info_s
H A Dmd_p.h60 __u32 state; member in struct:mdp_device_descriptor_s
92 __u32 state; member in struct:mdp_superblock_s
/bionic/libc/kernel/uapi/linux/
H A Dax25.h107 unsigned int state; member in struct:ax25_info_struct_deprecated
119 unsigned int state; member in struct:ax25_info_struct
H A Dif_bonding.h72 __s8 state; member in struct:ifslave
H A Dif_bridge.h96 __u8 state; member in struct:__port_info
181 __u8 state; member in struct:br_mdb_entry
H A Dmsdos_fs.h127 __u8 state; member in struct:fat_boot_sector::__anon481::__anon482
146 __u8 state; member in struct:fat_boot_sector::__anon481::__anon483
/bionic/libc/tzcode/
H A Dlocaltime.c114 struct state { struct
160 static void gmtload(struct state * sp);
162 struct tm * tmp, struct state * sp); // android-changed: added sp.
164 struct tm * tmp, struct state * sp); // android-changed: added sp.
176 int_fast32_t, struct tm *, struct state *), // android-changed: added state*.
177 int_fast32_t, struct state * sp); // android-changed: added sp.
180 int_fast32_t, struct tm*, struct state *), // android-changed: added state*.
181 int_fast32_t offset, int * okayp, struct state * s
1713 time2sub(struct tm * const tmp, struct tm *(*const funcp)(const time_t*, int_fast32_t, struct tm*, struct state*), const int_fast32_t offset, int * const okayp, const int do_norm_secs, struct state * sp) argument
[all...]
/bionic/libc/upstream-netbsd/common/lib/libc/hash/sha1/
H A Dsha1.c150 void SHA1Transform(uint32_t state[5], const uint8_t buffer[64]) argument
160 _DIAGASSERT(state != 0);
169 /* Copy context->state[] to working vars */
170 a = state[0];
171 b = state[1];
172 c = state[2];
173 d = state[3];
174 e = state[4];
205 /* Add the working vars back into context.state[] */
206 state[
[all...]
/bionic/libc/kernel/uapi/sound/
H A Dsb16_csp.h79 unsigned short state; member in struct:snd_sb_csp_info

Completed in 536 milliseconds

12