Summary: | strange app behaviour with NPTL enabled | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | barthek <gejzer> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | High | ||
Version: | 2005.0 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
barthek
2005-05-10 12:35:32 UTC
i dont see anything wrong with the differences, logically the code could produce either right ? you are right, but what if i need this dummy pthreaded program to output exactly the pattern i need ? (o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.) i expect that if i mutex_lock() and then fflush() i would receive output above. i played with placing fflush() between mutex_lock() and mutex_unlock() with different effects which were all different from the original behaviour what would be the proper way of doing it ? if you rely on threads to execute in a certain order and dont setup locks in order to achieve that, your code is broken already so in this case, the code is broken if you need it to output in that exact order thanks for the comment and sorry for taking your time |