Hello Jan.

2015-01-31 20:36 GMT+01:00 Jan Mareš <[email protected]>:

> Hello,
>
> I'm working on porting the QEMU to the HelenOS and I need the pthread
> functionality. What I thought I could do was base pthread implementation on
> existing thead_ functions and extend them to support join, detach and
> return values. Sadly I discovered the function thread_get_id is behaving
> rather strangely. It seems like it sometimes returns a different id.
> Another possibility is that the stack is corrupted. Is this still a
> supported functionality, or are fibril_ functions supposed to substitute
> those? Please find attached a test which is failing for me. Correct me if
> my assumptions are wrong.
>
Just my comments for the test (otherwise #9 is the answer as Jakub already
wrote).

a) There is no unlock in the source code.

b) It is probably better to use PCUT_ASSERT_INT_EQUALS for the comparison.
That would also print the actual values and not only the variable names.
Internally, it uses long and for thread ids it shall work okay. And yes, it
should be changed to long long ;-).

-  Vojta



>
> Jan Mares
>
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/listinfo/helenos-devel
>
>
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to