genodelabs / genode

Genode OS Framework
https://genode.org/
Other
1.08k stars 255 forks source link

libc: synchronize implicit pthread mutex initialization #5386

Open cproc opened 1 day ago

cproc commented 1 day ago

Related to #3262 and #3741. Also add a check to cond and rwlock initialization to detect if a different thread has already initialized the internal object in the meantime.

cproc commented 1 day ago

Fixed by 85be218.

nfeske commented 22 hours ago

I may miss to see the complete picture but I think that the try { } catch can be omitted because the Libc::Allocator should never raise an exception. As far as I know, our implementation of malloc never returns NULL. Whenever the available memory is exhausted, a resource request is issued.

cproc commented 11 hours ago

I may miss to see the complete picture but I think that the try { } catch can be omitted because the Libc::Allocator should never raise an exception. As far as I know, our implementation of malloc never returns NULL. Whenever the available memory is exhausted, a resource request is issued.

Commit 3784275 has the try { } catch removed from mutex_init() and commit 35a679d contains the corresponding cond/rwlock changes.

nfeske commented 2 hours ago

Thank you @cproc. I merged your commits to staging now.