Lines Matching refs:cookie

5  * address is used to compute the cookie of the task.
23 static void sched_core_put_cookie(unsigned long cookie)
25 struct sched_core_cookie *ptr = (void *)cookie;
33 static unsigned long sched_core_get_cookie(unsigned long cookie)
35 struct sched_core_cookie *ptr = (void *)cookie;
40 return cookie;
44 * sched_core_update_cookie - replace the cookie on a task
46 * @cookie: the new cookie
48 * Effectively exchange the task cookie; caller is responsible for lifetimes on
51 * Returns: the old cookie
54 unsigned long cookie)
63 * Since creating a cookie implies sched_core_get(), and we cannot set
64 * a cookie until after we've created it, similarly, we cannot destroy
65 * a cookie until after we've removed it, we must have core scheduling
68 SCHED_WARN_ON((p->core_cookie || cookie) && !sched_core_enabled(rq));
74 p->core_cookie = cookie;
77 * Consider the cases: !prev_cookie and !cookie.
79 if (cookie && task_on_rq_queued(p))
84 * the cookie change, so enter the scheduler on its CPU to schedule it
87 * Note that it is possible that as a result of this cookie change, the
101 unsigned long cookie, flags;
104 cookie = sched_core_get_cookie(p->core_cookie);
107 return cookie;
121 static void __sched_core_set(struct task_struct *p, unsigned long cookie)
123 cookie = sched_core_get_cookie(cookie);
124 cookie = sched_core_update_cookie(p, cookie);
125 sched_core_put_cookie(cookie);
132 unsigned long cookie = 0, id = 0;
176 cookie = sched_core_clone_cookie(task);
177 if (cookie) {
179 ptr_to_hashval((void *)cookie, &id);
185 cookie = sched_core_alloc_cookie();
186 if (!cookie) {
193 cookie = sched_core_clone_cookie(current);
201 cookie = sched_core_clone_cookie(task);
202 __sched_core_set(current, cookie);
211 __sched_core_set(task, cookie);
226 __sched_core_set(p, cookie);
232 sched_core_put_cookie(cookie);