Home
last modified time | relevance | path

Searched refs:unlikely (Results 1 – 25 of 35) sorted by relevance

12

/DragonOS-0.1.8/kernel/src/debug/
Dbug.h14 if (unlikely(__ret_bug_on)) \
16 unlikely(__ret_bug_on); \
25 if (unlikely(__ret_warn_on)) \
27 unlikely(__ret_warn_on); \
38 if (unlikely(__ret_warn_once && !__warned)) \
43 unlikely(__ret_warn_once); \
48 if (unlikely(__ret_warn_on)) \
50 unlikely(__ret_warn_on); \
/DragonOS-0.1.8/kernel/src/libs/
Dkfifo.c54 if (unlikely(fifo->size + size > fifo->total_size)) in kfifo_in()
56 if (unlikely(from == NULL)) in kfifo_in()
88 if (unlikely(to == NULL)) // 判断目标地址是否为空 in kfifo_out()
90 if (unlikely(size > fifo->size)) // 判断队列中是否有这么多数据 in kfifo_out()
122 if (unlikely(to == NULL)) // 判断目标地址是否为空 in kfifo_out_peek()
124 if (unlikely(size > fifo->size)) // 判断队列中是否有这么多数据 in kfifo_out_peek()
Didr.c102 if (unlikely(new_one == NULL)) in idr_preload()
177 if (unlikely(pos < 0)) in __idr_get_empty_slot()
216 if (unlikely(NULL == stk[0] || NULL == idp->top)) in __idr_mark_full()
251 if (unlikely(idp->top == NULL || __id < 0)) in __idr_get_path()
261 if (unlikely((__id >> ((layer + 1ull) * IDR_BITS)) > 0)) in __idr_get_path()
273 if (unlikely(((cur_layer->bitmap >> layer_id) & 1) == 0)) in __idr_get_path()
297 if (unlikely(NULL == stk[0] || NULL == idp->top)) in __idr_erase_full()
403 if (unlikely(idp->top == NULL || __id < 0)) in idr_remove()
425 if (unlikely(NULL == idp->top)) in __idr_remove_all_with_free()
492 if (unlikely(NULL == idp->top)) in idr_remove_all()
[all …]
Dprintk.rs10 intrinsics::{likely, unlikely},
113 if unlikely(!self.allow_alloc()) { in __write_string()
124 if unlikely(!self.allow_alloc()) { in __write_string_color()
Dlz4.c180 #ifndef unlikely
181 #define unlikely(expr) expect((expr) != 0, 0) macro
1249 if (unlikely(forwardIp > mflimitPlusOne)) in LZ4_compress_generic_validated()
1276 if (unlikely(forwardIp > mflimitPlusOne)) in LZ4_compress_generic_validated()
1343 while (((ip > anchor) & (match > lowLimit)) && (unlikely(ip[-1] == match[-1]))) in LZ4_compress_generic_validated()
1354 (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength / 255) > olimit))) in LZ4_compress_generic_validated()
1359 …(unlikely(op + (litLength + 240) / 255 /* litlen */ + litLength /* literals */ + 2 /* offset */ + … in LZ4_compress_generic_validated()
1443 (unlikely(op + (1 + LASTLITERALS) + (matchCode + 240) / 255 > olimit))) in LZ4_compress_generic_validated()
1452 if (unlikely(ip <= filledIp)) in LZ4_compress_generic_validated()
2190 if (initial_check && unlikely((*ip) >= lencheck)) in read_variable_length()
[all …]
Dmutex.c73 if (unlikely(!mutex_is_locked(lock))) in mutex_unlock()
Dbitree.c85 if (unlikely(last_node == NULL)) in bt_insert()
/DragonOS-0.1.8/kernel/src/mm/
Dsyscall.rs1 use core::intrinsics::unlikely;
174 if unlikely(verify_area(start_vaddr, len).is_err()) { in munmap()
177 if unlikely(len == 0) { in munmap()
207 if unlikely(verify_area(start_vaddr, len).is_err()) { in mprotect()
210 if unlikely(len == 0) { in mprotect()
Dc_adapter.rs3 use core::intrinsics::unlikely;
97 if unlikely(guard.contains_key(&vaddr)) { in do_kmalloc()
Dmod.rs12 intrinsics::unlikely,
495 if unlikely(end.data() <= start.data()) { in between()
616 if unlikely(end.data() < addr.data()) { in verify_area()
/DragonOS-0.1.8/kernel/src/libs/libUI/
Dscreen_manager.c29 if (unlikely(__scm_double_buffer_enabled == false)) in __create_buffer()
66 if (unlikely(buf == &video_frame_buffer_info || buf == NULL)) in __destroy_buffer()
68 if (unlikely(buf->vaddr == NULL)) in __destroy_buffer()
70 if (unlikely(verify_area(buf->vaddr, buf->size) == true)) in __destroy_buffer()
129 if (unlikely(__scm_alloc_enabled == false)) in scm_register_alloc()
Dtextui.c147 if (unlikely(window->vline_operating == window->vlines_num)) in __textui_new_line()
158 if (unlikely(window->top_vline >= window->vlines_num)) in __textui_new_line()
216 if (unlikely(character == '\0')) in textui_putchar_window()
231 if (unlikely(character == '\n')) in textui_putchar_window()
269 if (unlikely(window->vline_operating < 0)) in textui_putchar_window()
276 if (unlikely(window->top_vline < 0)) in textui_putchar_window()
Dtextui-render.c78 if (unlikely(vline_id >= window->vlines_num && (start + count) > window->chars_per_line)) in textui_refresh_characters()
86 if (unlikely(actual_line_id < 0 || actual_line_id >= __textui_get_actual_lines())) in textui_refresh_characters()
/DragonOS-0.1.8/kernel/src/ktest/
Dktest_utils.h8 if (unlikely(!(__condition))) \
/DragonOS-0.1.8/kernel/src/common/
Derr.h6 #define IS_ERR_VALUE(x) unlikely((x) >= (uint64_t)-MAX_ERRNO)
Dcompiler.h6 #define unlikely(x) __builtin_expect(!!(x), 0) macro
/DragonOS-0.1.8/kernel/src/mm/allocator/
Dkernel_allocator.rs9 intrinsics::unlikely,
34 if unlikely(virt_addr.is_null()) { in alloc_in_buddy()
Dpage_frame.rs2 intrinsics::unlikely,
68 if unlikely(self.current == self.end) { in next()
142 if unlikely(self.current == self.end) { in next()
/DragonOS-0.1.8/kernel/src/arch/x86_64/include/asm/
Dcmpxchg.h75 if (unlikely(is_success == false)) \
/DragonOS-0.1.8/kernel/src/driver/hid/
Dhidparse.c246 if (unlikely(offset_ptr == NULL)) in hid_parse()
395 if (unlikely(upage == NULL || upage->types == NULL)) in hid_get_usage_type()
421 if (unlikely(upage == NULL)) in hid_get_usage_page_str()
439 if (unlikely(upage == NULL)) in hid_get_usage_type_str()
463 if (unlikely(usage_type == NULL)) in hid_get_usage_type_str()
/DragonOS-0.1.8/kernel/src/driver/tty/
Dmod.rs1 use core::intrinsics::unlikely;
177 if unlikely(self.stdin_should_return(x)) { in read_stdin()
/DragonOS-0.1.8/kernel/src/exception/
Dsoftirq.rs3 intrinsics::unlikely,
199 if unlikely(prev_count != current_pcb().preempt_count) { in do_softirq()
/DragonOS-0.1.8/kernel/src/driver/video/
Dvideo.c84 if (unlikely(video_daemon_pcb == NULL)) in video_refresh_framebuffer()
/DragonOS-0.1.8/kernel/src/time/
Dtimer.rs3 intrinsics::unlikely,
118 if unlikely(r.is_err()) { in run()
/DragonOS-0.1.8/kernel/src/driver/timers/HPET/
DHPET.c87 if (unlikely(rs_clock() >= (video_refresh_expire_jiffies + (1 << 17)))) in HPET_handler()

12