Lines Matching refs:u

114 	} u;  member
158 || (last != -1 && sem->u.used.last_acquirer != last) in dump_sem_list()
159 || (name != NULL && strstr(sem->u.used.name, name) == NULL) in dump_sem_list()
160 || (owner != -1 && sem->u.used.owner != owner)) in dump_sem_list()
165 " %s\n", sem, sem->id, sem->u.used.count, in dump_sem_list()
166 sem->u.used.owner, in dump_sem_list()
167 sem->u.used.last_acquirer > 0 ? sem->u.used.last_acquirer : 0, in dump_sem_list()
168 sem->u.used.name); in dump_sem_list()
181 kprintf("name: '%s'\n", sem->u.used.name); in dump_sem()
182 kprintf("owner: %" B_PRId32 "\n", sem->u.used.owner); in dump_sem()
183 kprintf("count: %" B_PRId32 "\n", sem->u.used.count); in dump_sem()
195 set_debug_variable("_owner", sem->u.used.owner); in dump_sem()
199 sem->u.used.last_acquirer, sem->u.used.last_acquire_count); in dump_sem()
201 sem->u.used.last_releaser, sem->u.used.last_release_count); in dump_sem()
203 if (sem->u.used.last_releaser != 0) in dump_sem()
204 set_debug_variable("_releaser", sem->u.used.last_releaser); in dump_sem()
208 kprintf("last acquired by: %" B_PRId32 "\n", sem->u.used.last_acquirer); in dump_sem()
211 if (sem->u.used.last_acquirer != 0) in dump_sem()
212 set_debug_variable("_acquirer", sem->u.used.last_acquirer); in dump_sem()
216 kprintf("next: %p\n", sem->u.unused.next); in dump_sem()
217 kprintf("next_id: %" B_PRId32 "\n", sem->u.unused.next_id); in dump_sem()
255 if (sSems[i].u.used.name != NULL in dump_sem_info()
256 && strcmp(argv[1], sSems[i].u.used.name) == 0) { in dump_sem_info()
283 sem->u.unused.next_id = slot; in free_sem_slot()
285 sem->u.unused.next_id = nextID; in free_sem_slot()
288 sFreeSemsTail->u.unused.next = sem; in free_sem_slot()
292 sem->u.unused.next = NULL; in free_sem_slot()
299 if (sem->u.used.select_infos) in notify_sem_select_events()
300 notify_select_events_list(sem->u.used.select_infos, events); in notify_sem_select_events()
311 info->team = sem->u.used.owner; in fill_sem_info()
312 strlcpy(info->name, sem->u.used.name, sizeof(info->name)); in fill_sem_info()
313 info->count = sem->u.used.count; in fill_sem_info()
314 info->latest_holder = sem->u.used.last_acquirer; in fill_sem_info()
326 KTRACE("delete_sem(sem: %ld)", sem.u.used.id); in uninit_sem_locked()
329 sem.u.used.select_infos = NULL; in uninit_sem_locked()
339 *_name = sem.u.used.name; in uninit_sem_locked()
340 sem.u.used.name = NULL; in uninit_sem_locked()
371 && sSems[slot].u.used.owner == team_get_kernel_team_id()) { in delete_sem_internal()
377 if (sSems[slot].u.used.owner >= 0) { in delete_sem_internal()
378 list_remove_link(&sSems[slot].u.used.team_link); in delete_sem_internal()
379 sSems[slot].u.used.owner = -1; in delete_sem_internal()
503 sFreeSemsHead = sem->u.unused.next; in create_sem_etc()
509 sem->id = sem->u.unused.next_id; in create_sem_etc()
510 sem->u.used.count = count; in create_sem_etc()
511 sem->u.used.net_count = count; in create_sem_etc()
513 sem->u.used.name = tempName; in create_sem_etc()
514 sem->u.used.owner = team->id; in create_sem_etc()
515 sem->u.used.select_infos = NULL; in create_sem_etc()
518 list_add_item(&team->sem_list, &sem->u.used.team_link); in create_sem_etc()
553 && sSems[slot].u.used.owner == team_get_kernel_team_id()) { in select_sem()
560 info->next = sSems[slot].u.used.select_infos; in select_sem()
561 sSems[slot].u.used.select_infos = info; in select_sem()
563 if (sSems[slot].u.used.count > 0) in select_sem()
586 select_info** infoLocation = &sSems[slot].u.used.select_infos; in deselect_sem()
610 sem->u.used.count += entry->count; in remove_thread_from_sem()
624 if (entry->count > sem->u.used.net_count) in remove_thread_from_sem()
628 sem->u.used.net_count -= entry->count; in remove_thread_from_sem()
632 sem->u.used.count += entry->count; in remove_thread_from_sem()
640 if (sem->u.used.count > 0) in remove_thread_from_sem()
761 && sSems[slot].u.used.owner == team_get_kernel_team_id()) { in switch_sem_etc()
770 if (sSems[slot].u.used.count - count < 0) { in switch_sem_etc()
784 if ((sSems[slot].u.used.count -= count) < 0) { in switch_sem_etc()
789 " name = %s\n", id, sSems[slot].u.used.name, thread, thread->name)); in switch_sem_etc()
796 sSems[slot].u.used.count += count; in switch_sem_etc()
837 sSems[slot].u.used.last_acquirer = thread_get_current_thread_id(); in switch_sem_etc()
839 sSems[slot].u.used.last_acquire_count = count; in switch_sem_etc()
846 "thread %ld (%s)\n", id, sSems[slot].u.used.name, thread->id, in switch_sem_etc()
851 sSems[slot].u.used.net_count -= count; in switch_sem_etc()
852 sSems[slot].u.used.last_acquirer = thread_get_current_thread_id(); in switch_sem_etc()
854 sSems[slot].u.used.last_acquire_count = count; in switch_sem_etc()
902 && sSems[slot].u.used.owner == team_get_kernel_team_id()) { in release_sem_etc()
911 sSems[slot].u.used.last_acquirer = -sSems[slot].u.used.last_acquirer; in release_sem_etc()
913 sSems[slot].u.used.last_releaser = thread_get_current_thread_id(); in release_sem_etc()
914 sSems[slot].u.used.last_release_count = count; in release_sem_etc()
922 count = sSems[slot].u.used.net_count - sSems[slot].u.used.count; in release_sem_etc()
939 sSems[slot].u.used.count += count; in release_sem_etc()
940 sSems[slot].u.used.net_count += count; in release_sem_etc()
949 if (entry->count > (sSems[slot].u.used.net_count + count)) { in release_sem_etc()
950 sSems[slot].u.used.count += count; in release_sem_etc()
951 sSems[slot].u.used.net_count += count; in release_sem_etc()
958 sSems[slot].u.used.count += delta; in release_sem_etc()
959 sSems[slot].u.used.net_count += delta - entry->count; in release_sem_etc()
964 sSems[slot].u.used.count += entry->count; in release_sem_etc()
971 if (sSems[slot].u.used.count > 0) in release_sem_etc()
1006 *_count = sSems[slot].u.used.count; in get_sem_count()
1074 if (sem->id != -1 && sem->u.used.owner == team->id) { in _get_next_sem_info()
1117 list_remove_link(&sSems[slot].u.used.team_link); in set_sem_owner()
1118 list_add_item(&newTeam->sem_list, &sSems[slot].u.used.team_link); in set_sem_owner()
1120 sSems[slot].u.used.owner = newTeam->id; in set_sem_owner()
1136 return sSems[slot].u.used.name; in sem_get_name_unsafe()