Function report |
Source Code:lib\lru_cache.c |
Create Date:2022-07-28 07:16:51 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__lc_get
Proto:static struct lc_element *__lc_get(struct lru_cache *lc, unsigned int enr, unsigned int flags)
Type:struct lc_element
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct lru_cache * | lc | |
| unsigned int | enr | |
| unsigned int | flags |
| 365 | his is developers aid only.* it catches concurrent access (lack of locking on the users part) () |
| 366 | If see below: flag-bits for lru_cache & LC_STARVING Then |
| 376 | If e Then |
| 391 | ++hits |
| 392 | If refcnt++ == 0 Then number of elements currently on in_use list ++ |
| 399 | ++misses |
| 400 | If Not (flags & LC_GET_MAY_CHANGE) Then RETURN(NULL) |
| 418 | If Not lc_unused_element_available(lc) Then |
| 420 | RETURN(NULL) |
| 426 | If number of elements currently on to_be_changed list >= allow to accumulate a few (index:label) changes, * but no more than max_pending_changes Then RETURN(NULL) |
| 429 | e = lc_prepare_for_change(lc, enr) |
| Name | Describe |
|---|---|
| lc_get | lc_get - get element by label, maybe change the active set*@lc: the lru cache to operate on*@enr: the label to look up* Finds an element in the cache, increases its usage count,* "touches" and returns it |
| lc_get_cumulative | lc_get_cumulative - like lc_get; also finds to-be-changed elements*@lc: the lru cache to operate on*@enr: the label to look up* Unlike lc_get this also returns the element for @enr, if it is belonging to* a pending transaction, so the return values are |
| lc_try_get | lc_try_get - get element by label, if present; do not change the active set*@lc: the lru cache to operate on*@enr: the label to look up* Finds an element in the cache, increases its usage count,* "touches" and returns it |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |