problem handling POSIX thread on FreeBSD
John Baldwin
jhb at FreeBSD.org
Wed Jun 29 09:14:04 GMT 2005
On Tuesday 28 June 2005 07:58 pm, Pablo Mora wrote:
> Ok, I understand, but by being threads POSIX should be executed of the
> same one in any type of S.OR?
Not sure I understand the question. What do you mean by S.O? Are you saying
that since the threads are POSIX, that you would expect the program to act
the same on all Operating Systems? That's not an entirely safe assumption to
make in that POSIX only guarantees that things like mutexes work (and it
specifically states that you have to unlock a mutex in the same thread you
locked it, what you were doing would result in undefined behavior). POSIX
doesn't make any guarantees about how threads are scheduled with respect to
one another.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-hackers
mailing list