Lines Matching refs:ll
47 smb_llist_t *ll, in smb_llist_constructor() argument
51 rw_init(&ll->ll_lock, NULL, RW_DEFAULT, NULL); in smb_llist_constructor()
52 mutex_init(&ll->ll_mutex, NULL, MUTEX_DEFAULT, NULL); in smb_llist_constructor()
53 list_create(&ll->ll_list, size, offset); in smb_llist_constructor()
54 list_create(&ll->ll_deleteq, sizeof (smb_dtor_t), in smb_llist_constructor()
56 ll->ll_count = 0; in smb_llist_constructor()
57 ll->ll_wrop = 0; in smb_llist_constructor()
58 ll->ll_deleteq_count = 0; in smb_llist_constructor()
59 ll->ll_flushing = B_FALSE; in smb_llist_constructor()
67 smb_llist_t *ll) in smb_llist_destructor() argument
71 ASSERT(ll->ll_count == 0); in smb_llist_destructor()
72 ASSERT(ll->ll_deleteq_count == 0); in smb_llist_destructor()
74 rw_destroy(&ll->ll_lock); in smb_llist_destructor()
75 list_destroy(&ll->ll_list); in smb_llist_destructor()
76 list_destroy(&ll->ll_deleteq); in smb_llist_destructor()
77 mutex_destroy(&ll->ll_mutex); in smb_llist_destructor()
81 smb_llist_enter(smb_llist_t *ll, krw_t mode) in smb_llist_enter() argument
83 rw_enter(&ll->ll_lock, mode); in smb_llist_enter()
90 smb_llist_exit(smb_llist_t *ll) in smb_llist_exit() argument
92 rw_exit(&ll->ll_lock); in smb_llist_exit()
107 smb_llist_t *ll) in smb_llist_upgrade() argument
111 if (rw_tryupgrade(&ll->ll_lock) != 0) { in smb_llist_upgrade()
114 wrop = ll->ll_wrop; in smb_llist_upgrade()
115 rw_exit(&ll->ll_lock); in smb_llist_upgrade()
116 rw_enter(&ll->ll_lock, RW_WRITER); in smb_llist_upgrade()
117 return (wrop != ll->ll_wrop); in smb_llist_upgrade()
128 smb_llist_t *ll, in smb_llist_insert_head() argument
131 list_insert_head(&ll->ll_list, obj); in smb_llist_insert_head()
132 ++ll->ll_wrop; in smb_llist_insert_head()
133 ++ll->ll_count; in smb_llist_insert_head()
145 smb_llist_t *ll, in smb_llist_insert_tail() argument
148 list_insert_tail(&ll->ll_list, obj); in smb_llist_insert_tail()
149 ++ll->ll_wrop; in smb_llist_insert_tail()
150 ++ll->ll_count; in smb_llist_insert_tail()
161 smb_llist_t *ll, in smb_llist_remove() argument
164 list_remove(&ll->ll_list, obj); in smb_llist_remove()
165 ++ll->ll_wrop; in smb_llist_remove()
166 --ll->ll_count; in smb_llist_remove()
176 smb_llist_t *ll) in smb_llist_get_count() argument
178 return (ll->ll_count); in smb_llist_get_count()