On 04/06/2010 10:31 PM, Thomas Gleixner wrote:
quoted text >
>> That gives you something along the lines of
>>
>> runaddr = find_run_flag(lock);
>> do {
>> while(*runaddr == RUNNING) {
>> if (trylock(lock))
>> return WHOOPEE;
>> cpu relax
>> }
>> yield (_on(thread));
>>
> That would require a new yield_to_target() syscall, which either
> blocks the caller when the target thread is not runnable or returns an
> error code which signals to go into the slow path.
>
Note, directed yield is something that kvm wants for its own ends. As
an internal kernel api, not a syscall, but it's apparently useful.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
--
unsubscribe notice To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Messages in current thread:
Re: [PATCH V2 0/6][RFC] futex: FUTEX_LOCK with optional ad ... , Avi Kivity , (Tue Apr 6, 10:33 pm)