include/linux/bsearch.h
0 → 100644
+9
−0
+2
−1
lib/bsearch.c
0 → 100644
+53
−0
Loading
Gitlab 现已全面支持 git over ssh 与 git over https。通过 HTTPS 访问请配置带有 read_repository / write_repository 权限的 Personal access token。通过 SSH 端口访问请使用 22 端口或 13389 端口。如果使用CAS注册了账户但不知道密码,可以自行至设置中更改;如有其他问题,请发邮件至 service@cra.moe 寻求协助。
There a large number hand-coded binary searches in the kernel (run "git grep search | grep binary" to find many of them). Since in my experience, hand-coding binary searches can be error-prone, it seems worth cleaning this up by providing a generic binary search function. This generic binary search implementation comes from Ksplice. It has the same basic API as the C library bsearch() function. Ksplice uses it in half a dozen places with 4 different comparison functions, and I think our code is substantially cleaner because of this. Signed-off-by:Tim Abbott <tabbott@ksplice.com> Extra-bikeshedding-by:
Alan Jenkins <alan-jenkins@tuffmail.co.uk> Extra-bikeshedding-by:
André Goddard Rosa <andre.goddard@gmail.com> Extra-bikeshedding-by:
Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Alessio Igor Bogani <abogani@kernel.org> Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au>
CRA Git | Maintained and supported by SUSTech CRA and CCSE