Turnstone Operating System
|
binarysearch interface More...
#include <types.h>
Macros | |
#define | ___BINARYSEARCH_H 0 |
Typedefs | |
typedef int8_t(* | binarysearch_comparator_f) (const void *item1, const void *item2) |
item comparator More... | |
Functions | |
void * | binarysearch (void *list, uint64_t size, uint64_t item_size, void *key, binarysearch_comparator_f cmp) |
binarsearch More... | |
binarysearch interface
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
#define ___BINARYSEARCH_H 0 |
macro for avoiding multiple inclusion
typedef int8_t(* binarysearch_comparator_f) (const void *item1, const void *item2) |
item comparator
[in] | item1 | first item |
[in] | item2 | second item |
void * binarysearch | ( | void * | list, |
uint64_t | size, | ||
uint64_t | item_size, | ||
void * | key, | ||
binarysearch_comparator_f | cmp | ||
) |
binarsearch
[in] | list | list to search |
[in] | size | list size |
[in] | item_size | each item size in list |
[in] | key | to search |
[in] | cmp | binarsearch comparator binarysearch_comparator_f |