Hello,

I had a discussion here once with Jakub J about fibrils and threads. I was
told that I can use threads with fibrils, but only as execution containers.
How would I do it then? What I tried is creating new thread and right in
the entry point of the thread I call fibril_switch(FIBRIL_FROM_DEAD). This
seems to work, but when I test it more, I run into strange things starting
with occasional page faults and ending with kernel panic, when trying to
kill a process that only started 2 threads (1 call to thread_create), but
is reporting 3 in the top application.

If I have more threads running some fibrils are sync primitives from
fibril_synch still good enough to protect shared memory? I'm asking to rule
out option that I'm doing something fundamentally wrong. Because if this is
valid way to use threads and fibrils I probably have a race condition in my
code that I can't find.

Thank you for every hint,

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

Reply via email to