threads question

Zera William Holladay zholla1 at uic.edu
Tue Mar 15 12:02:23 PST 2005


On Tue, 15 Mar 2005, Michael C. Shultz wrote:
[cut]
> The answer is probably something like what you just said, scope being
> lost when making the call to a shared library. Why is it ok going to a
> static library but not a shared though?

There is probably a race condition, so your code will work *some* of the
time unless you prevent the race condition.  I don't have an answer to
your question, but I don't think it is a valid question.  The scope of
"*priority" can remain valid or invalid for random reasons and thus may
work some of the time, but the only way to guarantee that it works all the
time is to eliminate the race condition by making sure that *property is
valid though the life of the thread.

-Zera


More information about the freebsd-hackers mailing list