Changes in uspace/srv/vfs/vfs_lookup.c [b72efe8:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_lookup.c
rb72efe8 r79ae36dd 50 50 51 51 FIBRIL_MUTEX_INITIALIZE(plb_mutex); 52 LIST_INITIALIZE(plb_ entries); /**< PLB entry ring buffer. */52 LIST_INITIALIZE(plb_head); /**< PLB entry ring buffer. */ 53 53 uint8_t *plb = NULL; 54 54 … … 102 102 size_t last; /* the last free index */ 103 103 104 if (list_empty(&plb_ entries)) {104 if (list_empty(&plb_head)) { 105 105 first = 0; 106 106 last = PLB_SIZE - 1; 107 107 } else { 108 plb_entry_t *oldest = list_get_instance( 109 list_first(&plb_entries),plb_entry_t, plb_link);110 plb_entry_t *newest = list_get_instance( 111 list_last(&plb_entries),plb_entry_t, plb_link);108 plb_entry_t *oldest = list_get_instance(plb_head.next, 109 plb_entry_t, plb_link); 110 plb_entry_t *newest = list_get_instance(plb_head.prev, 111 plb_entry_t, plb_link); 112 112 113 113 first = (newest->index + newest->len) % PLB_SIZE; … … 145 145 * buffer. 146 146 */ 147 list_append(&entry.plb_link, &plb_ entries);147 list_append(&entry.plb_link, &plb_head); 148 148 149 149 fibril_mutex_unlock(&plb_mutex);
Note:
See TracChangeset
for help on using the changeset viewer.