Re: pthread_mutex_unlock (was Re: sched_yield() makes OpenLDAP slow)

From: Nikita Danilov
Date: Thu Jan 26 2006 - 05:43:00 EST


Howard Chu writes:

[...]

>
> But then we have to deal with you folks' bizarre notion that
> sched_yield() can legitimately be a no-op, which also defies the POSIX
> spec. Again, in SUSv3 "The /sched_yield/() function shall force the
> running thread to relinquish the processor until it again becomes the
> head of its thread list. It takes no arguments." There is no language
> here saying "sched_yield *may* do nothing at all." There are of course

As have been pointed to you already, while there is no such language,
the effect may be the same, if --for example-- scheduling policy decides
to put current thread back to "the head of its thread list" immediately
after sched_yield(). Which is a valid behavior for SCHED_OTHER.

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/