Home
last modified time | relevance | path

Searched refs:new (Results 1 – 25 of 164) sorted by relevance

1234567

/tools/include/linux/
A Drefcount.h83 unsigned int old, new, val = atomic_read(&r->refs); in refcount_inc_not_zero() local
86 new = val + 1; in refcount_inc_not_zero()
91 if (unlikely(!new)) in refcount_inc_not_zero()
94 old = atomic_cmpxchg_relaxed(&r->refs, val, new); in refcount_inc_not_zero()
101 REFCOUNT_WARN(new == UINT_MAX, "refcount_t: saturated; leaking memory.\n"); in refcount_inc_not_zero()
128 unsigned int old, new, val = atomic_read(&r->refs); in refcount_sub_and_test() local
134 new = val - i; in refcount_sub_and_test()
135 if (new > val) { in refcount_sub_and_test()
136 REFCOUNT_WARN(new > val, "refcount_t: underflow; use-after-free.\n"); in refcount_sub_and_test()
140 old = atomic_cmpxchg_release(&r->refs, val, new); in refcount_sub_and_test()
[all …]
A Dlist.h42 next->prev = new; in __list_add()
43 new->next = next; in __list_add()
44 new->prev = prev; in __list_add()
45 prev->next = new; in __list_add()
126 new->next = old->next; in list_replace()
127 new->next->prev = new; in list_replace()
128 new->prev = old->prev; in list_replace()
129 new->prev->next = new; in list_replace()
135 list_replace(old, new); in list_replace_init()
700 if (new->first) in hlist_move_list()
[all …]
A Drbtree_augmented.h31 void (*copy)(struct rb_node *old, struct rb_node *new);
32 void (*rotate)(struct rb_node *old, struct rb_node *new);
36 void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
92 RBSTRUCT *new = rb_entry(rb_new, RBSTRUCT, RBFIELD); \
93 new->RBAUGMENTED = old->RBAUGMENTED; \
99 RBSTRUCT *new = rb_entry(rb_new, RBSTRUCT, RBFIELD); \
100 new->RBAUGMENTED = old->RBAUGMENTED; \
171 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() argument
176 WRITE_ONCE(parent->rb_left, new); in __rb_change_child()
178 WRITE_ONCE(parent->rb_right, new); in __rb_change_child()
[all …]
/tools/testing/selftests/bpf/
A Dbpf_atomic.h47 #define cmpxchg(p, old, new) __sync_val_compare_and_swap((p), old, new) argument
49 #define try_cmpxchg(p, pold, new) \ argument
52 __unqual_typeof(*(p)) __r = cmpxchg(p, __o, new); \
58 #define try_cmpxchg_relaxed(p, pold, new) try_cmpxchg(p, pold, new) argument
60 #define try_cmpxchg_acquire(p, pold, new) try_cmpxchg(p, pold, new) argument
134 #define atomic_try_cmpxchg_relaxed(p, pold, new) \ argument
135 try_cmpxchg_relaxed(&(p)->counter, pold, new)
137 #define atomic_try_cmpxchg_acquire(p, pold, new) \ argument
138 try_cmpxchg_acquire(&(p)->counter, pold, new)
/tools/perf/util/
A Dlock-contention.c73 struct lock_stat *ret, *new; in lock_stat_findnew() local
80 new = zalloc(sizeof(struct lock_stat)); in lock_stat_findnew()
81 if (!new) in lock_stat_findnew()
84 new->addr = addr; in lock_stat_findnew()
85 new->name = strdup(name); in lock_stat_findnew()
86 if (!new->name) { in lock_stat_findnew()
87 free(new); in lock_stat_findnew()
91 new->flags = flags; in lock_stat_findnew()
92 new->wait_time_min = ULLONG_MAX; in lock_stat_findnew()
94 hlist_add_head(&new->hash_entry, entry); in lock_stat_findnew()
[all …]
A Dordered-events.c21 u64 timestamp = new->timestamp; in queue_event()
25 oe->last = new; in queue_event()
142 list_del_init(&new->list); in alloc_event()
161 new = &oe->buffer->event[0]; in alloc_event()
167 new->event = new_event; in alloc_event()
168 return new; in alloc_event()
175 struct ordered_event *new; in ordered_events__new_event() local
178 if (new) { in ordered_events__new_event()
179 new->timestamp = timestamp; in ordered_events__new_event()
180 queue_event(oe, new); in ordered_events__new_event()
[all …]
A Dmaps.c502 if (map__end(new) < map__start(new)) in __maps__insert()
505 map__set_kmap_maps(new, maps); in __maps__insert()
840 dso__name(map__dso(new))); in __maps__fixup_overlap_and_insert()
843 map__fprintf(new, fp); in __maps__fixup_overlap_and_insert()
924 maps_by_name[ni] = map__get(new); in __maps__fixup_overlap_and_insert()
951 map__set_kmap_maps(new, maps); in __maps__fixup_overlap_and_insert()
1016 if (!new) in maps__copy_from()
1021 dest_maps_by_address[i] = new; in maps__copy_from()
1028 map__put(new); in maps__copy_from()
1047 if (!new) in maps__copy_from()
[all …]
A Dcallchain.c537 new = zalloc(sizeof(*new)); in create_child()
538 if (!new) { in create_child()
565 return new; in create_child()
652 if (new == NULL) in add_child()
664 free(new); in add_child()
671 new->count = 1; in add_child()
672 return new; in add_child()
824 if (new == NULL) in split_add_child()
859 if (new == NULL) in split_add_child()
1558 new = malloc(sizeof(*new)); in callchain_node__make_parent_list()
[all …]
/tools/testing/selftests/bpf/progs/
A Dsetget_sockopt.c26 int new; member
44 { .opt = SO_RCVLOWAT, .new = 8123, .expected = 8123, },
45 { .opt = SO_MARK, .new = 0xeb9f, .expected = 0xeb9f, },
98 int old, tmp, new, opt = t->opt; in bpf_test_sockopt_flip() local
111 new = !old; in bpf_test_sockopt_flip()
112 if (bpf_setsockopt(ctx, level, opt, &new, sizeof(new))) in bpf_test_sockopt_flip()
115 tmp != new) in bpf_test_sockopt_flip()
128 int old, tmp, new, expected, opt; in bpf_test_sockopt_int() local
131 new = t->new; in bpf_test_sockopt_int()
138 old == new) in bpf_test_sockopt_int()
[all …]
A Dtest_probe_user.c12 struct sockaddr_in new; in handle_sys_connect_common() local
15 __builtin_memset(&new, 0xab, sizeof(new)); in handle_sys_connect_common()
16 bpf_probe_write_user(uservaddr, &new, sizeof(new)); in handle_sys_connect_common()
A Dnormal_map_btf.c36 struct node_data *new; in add_to_list_in_array() local
46 new = bpf_obj_new(typeof(*new)); in add_to_list_in_array()
47 if (!new) in add_to_list_in_array()
51 bpf_list_push_back(&value->head, &new->node); in add_to_list_in_array()
A Dmap_in_map_btf.c48 struct node_data *new; in add_to_list_in_inner_array() local
63 new = bpf_obj_new(typeof(*new)); in add_to_list_in_inner_array()
64 if (!new) in add_to_list_in_inner_array()
68 bpf_list_push_back(&value->head, &new->node); in add_to_list_in_inner_array()
A Dpreempted_bpf_ma_op.c48 struct bin_data *old, *new; in add_array() local
55 new = bpf_obj_new(typeof(*new)); in add_array()
56 if (!new) { in add_array()
61 old = bpf_kptr_xchg(&value->data, new); in add_array()
A Dtest_bpf_ma.c60 void *old, *new; in batch_alloc() local
69 new = bpf_obj_new_impl(data_btf_ids[idx], NULL); in batch_alloc()
70 if (!new) { in batch_alloc()
74 old = bpf_kptr_xchg(&value->data, new); in batch_alloc()
110 void *old, *new; in batch_percpu_alloc() local
120 new = bpf_percpu_obj_new_impl(percpu_data_btf_ids[idx], NULL); in batch_percpu_alloc()
121 if (!new) in batch_percpu_alloc()
124 old = bpf_kptr_xchg(&value->data, new); in batch_percpu_alloc()
/tools/arch/x86/include/asm/
A Dcmpxchg.h35 #define __raw_cmpxchg(ptr, old, new, size, lock) \ argument
39 __typeof__(*(ptr)) __new = (new); \
83 #define __cmpxchg(ptr, old, new, size) \ argument
84 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
86 #define cmpxchg(ptr, old, new) \ argument
87 __cmpxchg(ptr, old, new, sizeof(*(ptr)))
/tools/usb/usbip/libsrc/
A Dlist.h40 static inline void __list_add(struct list_head *new, in __list_add() argument
44 next->prev = new; in __list_add()
45 new->next = next; in __list_add()
46 new->prev = prev; in __list_add()
47 prev->next = new; in __list_add()
58 static inline void list_add(struct list_head *new, struct list_head *head) in list_add() argument
60 __list_add(new, head, head->next); in list_add()
/tools/include/nolibc/
A Dsys.h238 int sys_dup2(int old, int new) in sys_dup2() argument
241 return my_syscall3(__NR_dup3, old, new, 0); in sys_dup2()
243 return my_syscall2(__NR_dup2, old, new); in sys_dup2()
250 int dup2(int old, int new) in dup2() argument
252 return __sysret(sys_dup2(old, new)); in dup2()
262 int sys_dup3(int old, int new, int flags) in sys_dup3() argument
268 int dup3(int old, int new, int flags) in dup3() argument
573 return my_syscall2(__NR_link, old, new); in sys_link()
580 int link(const char *old, const char *new) in link() argument
582 return __sysret(sys_link(old, new)); in link()
[all …]
/tools/testing/ktest/examples/include/
A Dmin-config.conf49 OUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min-net
57 OUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min
59 MIN_CONFIG = ${CONFIG_DIR}/config-new-min-net
/tools/lib/
A Drbtree.c75 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() argument
79 new->__rb_parent_color = old->__rb_parent_color; in __rb_rotate_set_parents()
80 rb_set_parent_color(old, new, color); in __rb_rotate_set_parents()
81 __rb_change_child(old, new, parent, root); in __rb_rotate_set_parents()
228 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() argument
411 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() argument
545 void rb_replace_node(struct rb_node *victim, struct rb_node *new, in rb_replace_node() argument
551 *new = *victim; in rb_replace_node()
555 rb_set_parent(victim->rb_left, new); in rb_replace_node()
557 rb_set_parent(victim->rb_right, new); in rb_replace_node()
[all …]
/tools/testing/selftests/futex/functional/
A Dfutex_numa.c39 struct futex_numa_32 new, old = { in futex_numa_32_lock() local
44 new = old; in futex_numa_32_lock()
47 new.node = fnode; in futex_numa_32_lock()
51 new.val |= N_WAITERS; in futex_numa_32_lock()
53 new.val |= N_LOCK; in futex_numa_32_lock()
56 if (old.full == new.full) in futex_numa_32_lock()
64 &old.full, new.full, in futex_numa_32_lock()
78 futex2_wait(lock, new.val, fflags, NULL, 0); in futex_numa_32_lock()
/tools/testing/selftests/kvm/x86/
A Dset_sregs_test.c26 struct kvm_sregs new; \
33 memcpy(&new, &orig, sizeof(sregs)); \
34 new.cr |= bit; \
36 rc = _vcpu_sregs_set(vcpu, &new); \
40 vcpu_sregs_get(vcpu, &new); \
41 TEST_ASSERT(!memcmp(&new, &orig, sizeof(new)), "KVM modified sregs"); \
/tools/objtool/
A Dspecial.c23 unsigned char size, orig, new; member
36 .new = ALT_NEW_OFFSET,
45 .new = JUMP_NEW_OFFSET,
52 .new = EX_NEW_OFFSET,
98 new_reloc = find_reloc_by_dest(elf, sec, offset + entry->new); in get_alt_entry()
100 ERROR_FUNC(sec, offset + entry->new, "can't find new reloc"); in get_alt_entry()
/tools/perf/scripts/python/
A Dsched-migration.py82 def __init__(self, new): argument
83 self.new = new
134 if new in self.tasks:
141 def migrate_in(self, new): argument
142 return self.__migrate_in(new, RunqueueMigrateIn(new))
144 def wake_up(self, new): argument
145 return self.__migrate_in(new, RunqueueEventWakeup(new))
147 def wake_up_new(self, new): argument
148 return self.__migrate_in(new, RunqueueEventFork(new))
195 out_rq = old_rq.migrate_out(new)
[all …]
/tools/testing/selftests/bpf/map_tests/
A Dtask_storage_map.c59 cpu_set_t old, new; in test_task_storage_map_stress_lookup() local
92 CPU_ZERO(&new); in test_task_storage_map_stress_lookup()
93 CPU_SET(cpu, &new); in test_task_storage_map_stress_lookup()
94 sched_setaffinity(getpid(), sizeof(new), &new); in test_task_storage_map_stress_lookup()
/tools/testing/selftests/filesystems/fat/
A Drun_fat_tests.sh48 echo new | sudo tee "${new_path}" >/dev/null 2>&1
51 grep new "${old_path}" >/dev/null 2>&1
64 echo new | sudo tee "${new_path}" >/dev/null 2>&1
67 grep new "${old_path}" >/dev/null 2>&1

Completed in 35 milliseconds

1234567