Messages in this thread |  | | Date | Tue, 10 Feb 2015 08:54:36 -0600 | From | Josh Poimboeuf <> | Subject | Re: [RFC PATCH 5/9] sched: move task rq locking functions to sched.h |
| |
On Tue, Feb 10, 2015 at 07:48:17PM +0900, Masami Hiramatsu wrote: > (2015/02/10 2:31), Josh Poimboeuf wrote: > > Move task_rq_lock/unlock() to sched.h so they can be used elsewhere. > > The livepatch code needs to lock each task's rq in order to safely > > examine its stack and switch it to a new patch universe. > > Hmm, why don't you just expose (extern in sched.h) those?
One reason was because task_rq_unlock was already static inline, and I didn't want to un-inline it. But that's probably a dumb reason, since I inlined task_rq_lock and it wasn't inlined before.
But also, there are some other inlined locking functions in sched.h: double_lock_balance, double_rq_lock, double_lock_irq, etc. So it just seemed to "fit" better there.
Either way works for me. I'll ask some scheduler people.
-- Josh
|  |