Skip to contentSkip to conversation

pthread_cond_init: Fix a problem making the case sometimes passed and sometimes failed.

PATCH Cyril Hrubis 1 participant 1 message Jun 30, 2011 2 messages not in the archive

lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive

Hi!

Quoted 6 lines

I'm sorry. Here, I made a mistake.
sched_yield() is a system call, which calls schedule() in kernel. It yields the current CPU to other tasks.
So why did it sometimes pass, but sometimes fail? But when using sleep(1) instead of sched_yield(), it always passed?
Does it have anything to do with multi cpus?

I've just commited patch to remove the test as after careful review, it turned out that there is no reasonable way how to test that two condition variables are initalized exactly same way. (same goes for 1-3 and 2-2).

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list