Details
- Reviewers
kib - Group Reviewers
Linux Emulation - Commits
- rS283382: In preparation for switching linuxulator to the use the native 1:1
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
As discussed with kib@ this change is incorrect. At this point, the execing process does not have the address space.
Possible direction is to put a sv_thread_detach hook in to the proc_exec handler.
I have not found a suitable solution, so this is the best way to handle single threading.
execve() case to be handled by eventhadler.
Quoting the first comment above, "As discussed with kib@ this change is incorrect. At this point, the execing process does not have the address space. Possible direction is to put a sv_thread_detach hook in to the proc_exec handler". So, my question is, is this patch still incorrect, or has it been reworked to make it work properly?
I have no information about patch rewrite. Isn't Dmitry supposed to know more about state of the work on _his_ patch ?
Hm, okay... Dmitry, is the problem previously pointed out by Konstantin still there, or is the patch correct now?
whoops, sorry for the delay, im so busy these days.. ok, let me to clarify.
for Linux thread we need a proper way to do some cleanup work at thread exit time,
some of this work require access to the user space - robust futex cleanup code (sx used here).
Konstantin quite right pointed out me that this code could not work for exec() case.
As suspended threads call thread_suspend_check() from ast() or sleep() and at this time old
proc vmspace does not exist, so my sv_thread_detach() would fail.
ie, this method works only for exit1(), and in linux_exec() I must finish all threads before do_execve() call.