• Home
  • Raw
  • Download

Lines Matching refs:idx

24 	int idx;  in get_free_idx()  local
26 for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++) in get_free_idx()
27 if (desc_empty(&t->tls_array[idx])) in get_free_idx()
28 return idx + GDT_ENTRY_TLS_MIN; in get_free_idx()
84 static void set_tls_desc(struct task_struct *p, int idx, in set_tls_desc() argument
88 struct desc_struct *desc = &t->tls_array[idx - GDT_ENTRY_TLS_MIN]; in set_tls_desc()
114 int do_set_thread_area(struct task_struct *p, int idx, in do_set_thread_area() argument
127 if (idx == -1) in do_set_thread_area()
128 idx = info.entry_number; in do_set_thread_area()
134 if (idx == -1 && can_allocate) { in do_set_thread_area()
135 idx = get_free_idx(); in do_set_thread_area()
136 if (idx < 0) in do_set_thread_area()
137 return idx; in do_set_thread_area()
138 if (put_user(idx, &u_info->entry_number)) in do_set_thread_area()
142 if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX) in do_set_thread_area()
145 set_tls_desc(p, idx, &info, 1); in do_set_thread_area()
152 modified_sel = (idx << 3) | 3; in do_set_thread_area()
201 static void fill_user_desc(struct user_desc *info, int idx, in fill_user_desc() argument
206 info->entry_number = idx; in fill_user_desc()
220 int do_get_thread_area(struct task_struct *p, int idx, in do_get_thread_area() argument
226 if (idx == -1 && get_user(idx, &u_info->entry_number)) in do_get_thread_area()
229 if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX) in do_get_thread_area()
232 index = idx - GDT_ENTRY_TLS_MIN; in do_get_thread_area()
236 fill_user_desc(&info, idx, &p->thread.tls_array[index]); in do_get_thread_area()