Lines Matching refs:used

107 		} used;
118 ThreadQueue queue; // should be in u.used, but has a constructor
158 || (last != -1 && sem->u.used.last_acquirer != last)
159 || (name != NULL && strstr(sem->u.used.name, name) == NULL)
160 || (owner != -1 && sem->u.used.owner != owner))
165 " %s\n", sem, sem->id, sem->u.used.count,
166 sem->u.used.owner,
167 sem->u.used.last_acquirer > 0 ? sem->u.used.last_acquirer : 0,
168 sem->u.used.name);
181 kprintf("name: '%s'\n", sem->u.used.name);
182 kprintf("owner: %" B_PRId32 "\n", sem->u.used.owner);
183 kprintf("count: %" B_PRId32 "\n", sem->u.used.count);
195 set_debug_variable("_owner", sem->u.used.owner);
199 sem->u.used.last_acquirer, sem->u.used.last_acquire_count);
201 sem->u.used.last_releaser, sem->u.used.last_release_count);
203 if (sem->u.used.last_releaser != 0)
204 set_debug_variable("_releaser", sem->u.used.last_releaser);
208 kprintf("last acquired by: %" B_PRId32 "\n", sem->u.used.last_acquirer);
211 if (sem->u.used.last_acquirer != 0)
212 set_debug_variable("_acquirer", sem->u.used.last_acquirer);
255 if (sSems[i].u.used.name != NULL
256 && strcmp(argv[1], sSems[i].u.used.name) == 0) {
275 is used.
299 if (sem->u.used.select_infos)
300 notify_select_events_list(sem->u.used.select_infos, events);
311 info->team = sem->u.used.owner;
312 strlcpy(info->name, sem->u.used.name, sizeof(info->name));
313 info->count = sem->u.used.count;
314 info->latest_holder = sem->u.used.last_acquirer;
326 KTRACE("delete_sem(sem: %ld)", sem.u.used.id);
329 sem.u.used.select_infos = NULL;
339 *_name = sem.u.used.name;
340 sem.u.used.name = NULL;
371 && sSems[slot].u.used.owner == team_get_kernel_team_id()) {
377 if (sSems[slot].u.used.owner >= 0) {
378 list_remove_link(&sSems[slot].u.used.team_link);
379 sSems[slot].u.used.owner = -1;
510 sem->u.used.count = count;
511 sem->u.used.net_count = count;
513 sem->u.used.name = tempName;
514 sem->u.used.owner = team->id;
515 sem->u.used.select_infos = NULL;
518 list_add_item(&team->sem_list, &sem->u.used.team_link);
553 && sSems[slot].u.used.owner == team_get_kernel_team_id()) {
560 info->next = sSems[slot].u.used.select_infos;
561 sSems[slot].u.used.select_infos = info;
563 if (sSems[slot].u.used.count > 0)
586 select_info** infoLocation = &sSems[slot].u.used.select_infos;
610 sem->u.used.count += entry->count;
624 if (entry->count > sem->u.used.net_count)
628 sem->u.used.net_count -= entry->count;
632 sem->u.used.count += entry->count;
640 if (sem->u.used.count > 0)
761 && sSems[slot].u.used.owner == team_get_kernel_team_id()) {
770 if (sSems[slot].u.used.count - count < 0) {
784 if ((sSems[slot].u.used.count -= count) < 0) {
789 " name = %s\n", id, sSems[slot].u.used.name, thread, thread->name));
796 sSems[slot].u.used.count += count;
837 sSems[slot].u.used.last_acquirer = thread_get_current_thread_id();
839 sSems[slot].u.used.last_acquire_count = count;
846 "thread %ld (%s)\n", id, sSems[slot].u.used.name, thread->id,
851 sSems[slot].u.used.net_count -= count;
852 sSems[slot].u.used.last_acquirer = thread_get_current_thread_id();
854 sSems[slot].u.used.last_acquire_count = count;
902 && sSems[slot].u.used.owner == team_get_kernel_team_id()) {
911 sSems[slot].u.used.last_acquirer = -sSems[slot].u.used.last_acquirer;
913 sSems[slot].u.used.last_releaser = thread_get_current_thread_id();
914 sSems[slot].u.used.last_release_count = count;
922 count = sSems[slot].u.used.net_count - sSems[slot].u.used.count;
939 sSems[slot].u.used.count += count;
940 sSems[slot].u.used.net_count += count;
949 if (entry->count > (sSems[slot].u.used.net_count + count)) {
950 sSems[slot].u.used.count += count;
951 sSems[slot].u.used.net_count += count;
958 sSems[slot].u.used.count += delta;
959 sSems[slot].u.used.net_count += delta - entry->count;
964 sSems[slot].u.used.count += entry->count;
971 if (sSems[slot].u.used.count > 0)
1006 *_count = sSems[slot].u.used.count;
1074 if (sem->id != -1 && sem->u.used.owner == team->id) {
1117 list_remove_link(&sSems[slot].u.used.team_link);
1118 list_add_item(&newTeam->sem_list, &sSems[slot].u.used.team_link);
1120 sSems[slot].u.used.owner = newTeam->id;
1126 must make sure that the semaphore remains alive as long as the name is used.
1136 return sSems[slot].u.used.name;