Home | History | Annotate | Download | only in bionic

Lines Matching defs:tag

206 uint64_t android_fdsan_create_owner_tag(android_fdsan_owner_type type, uint64_t tag) {
207 if (tag == 0) {
217 result |= tag & mask;
221 const char* android_fdsan_get_tag_type(uint64_t tag) {
222 uint64_t type = tag >> 56;
255 uint64_t high_bits = tag >> 48;
264 uint64_t android_fdsan_get_tag_value(uint64_t tag) {
266 return static_cast<uint64_t>(static_cast<int64_t>(tag << 8) >> 8);
275 uint64_t tag = expected_tag;
276 if (!atomic_compare_exchange_strong(&fde->close_tag, &tag, 0)) {
279 const char* actual_type = android_fdsan_get_tag_type(tag);
280 uint64_t actual_owner = android_fdsan_get_tag_value(tag);
281 if (expected_tag && tag) {
286 } else if (expected_tag && !tag) {
291 } else if (!expected_tag && tag) {
296 } else if (!expected_tag && !tag) {
303 // If we were expecting to close with a tag, abort on EBADF.
324 uint64_t tag = expected_tag;
325 if (!atomic_compare_exchange_strong(&fde->close_tag, &tag, new_tag)) {
326 if (expected_tag && tag) {
330 fd, android_fdsan_get_tag_type(tag), android_fdsan_get_tag_value(tag),
332 } else if (expected_tag && !tag) {
337 } else if (!expected_tag && tag) {
341 fd, android_fdsan_get_tag_type(tag), android_fdsan_get_tag_value(tag));
342 } else if (!expected_tag && !tag) {
345 "fdsan atomic_compare_exchange_strong failed unexpectedly while exchanging owner tag");