Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First step: arch LLVM should use the vanilla versions of these. #1

Closed
ianamason opened this issue Mar 3, 2016 · 1 comment
Closed

Comments

@ianamason
Copy link
Member

If possible.

fenv/x86_64
internal/x86_64
ldso/x86_64
math/x86_64
process/x86_64
setjmp/x86_64
signal/x86_64
string/x86_64
thread/x86_64

OCCAM/examples/linux/musl_nweb, for example, uses
a lot of string and math routines which should be trivial.
Plus some ones the will be difficult:

_dlstart_c
__syscall
__clone
__restore
__restore_rt
__syscall_cp_asm
__cp_end
__cp_begin
__cp_cancel
__unmapself
@ianamason
Copy link
Member Author

Fixed by ff7275a

ianamason pushed a commit that referenced this issue Jul 3, 2019
The condition occurs when
- thread #1 is holding the lock
- thread #2 is waiting for it on __futexwait
- thread #1 is about to release the lock and performs a_swap
- thread #3 enters the __lockfile function and manages to grab the lock
  before thread #1 calls __wake, resetting the MAYBE_WAITERS flag
- thread #1 calls __wake
- thread #2 wakes up but goes again to __futexwait as the lock is
  held by thread #3
- thread #3 releases the lock but does not call __wake as the
  MAYBE_WAITERS flag is not set

This condition results in thread #2 not being woken up. This patch fixes
the problem by making the woken up thread ensure that the flag is
properly set before going to sleep again.

Mainainer's note: This fixes a regression introduced in commit
c21f750.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant