Andrey Vagin
e6968f4b08
syscall: add waitpid()
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-19 16:16:58 +04:00
Cyrill Gorcunov
4416c649c8
syscalls: Add sys_msync helper
...
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-04 16:40:35 +04:00
Cyrill Gorcunov
d7ab5f2f7b
restorer: Implement own BUG_ON_HANDLER
...
Due to code specifics (we're running without
glibc support) we need own one.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-26 15:54:27 +04:00
Andrey Vagin
04f36aed0a
Set descriptors to restart a current syscall
...
If a task is sleep in syscall, it should be restared.
This logic is moved from kernel do_signal().
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-02 17:50:55 +04:00
Cyrill Gorcunov
20b0e29698
syscall: Add sys_gettid helper
...
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-02 12:07:47 +04:00
Cyrill Gorcunov
b9febd52bc
syscall: Add sys_flock helper
...
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-12-02 12:07:33 +04:00
Andrey Vagin
25434884e1
Dump and restore sigactions (v2)
...
A parasite code dumps all sigactions in sigact.pid.
v2: remove hard code for sizeof(sigset_t)
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2011-11-30 22:04:09 +04:00
Cyrill Gorcunov
1e7bbd35de
restore: Add threads restoration
...
Now threads restortion (and TLS as well) works.
Threads test reports the following
2775 (main): Counter value: 3 tls_data = 1
2775 (main): ( 0) fsgs_base 7f9597aa46f0
2775 (main): ( 0) fsgs_base 0
2775 (thr3): Counter value: 4 tls_data = 4
2775 (thr3): ( 0) fsgs_base 42c57940
2775 (thr3): ( 0) fsgs_base 0
2775 (thr2): Counter value: 3 tls_data = 2
2775 (thr2): ( 0) fsgs_base 42456940
2775 (thr2): ( 0) fsgs_base 0
2775 (thr1): Counter value: 4 tls_data = 3
2775 (thr1): ( 0) fsgs_base 40c62940
2775 (thr1): ( 0) fsgs_base 0
2775 (main): Counter value: 4 tls_data = 1
2775 (main): ( 0) fsgs_base 7f9597aa46f0
2775 (main): ( 0) fsgs_base 0
2775 (thr1): Counter value: 5 tls_data = 3
2775 (thr1): ( 0) fsgs_base 40c62940
2775 (thr1): ( 0) fsgs_base 0
as expected.
This commits merges all preliminary commits into
the final one (sigreturn branch was always experimental
and forced update).
Still some problems remain:
1) While creating threads with clone() the
flags are to be revisited. We use some predefined
set here but it's not really correct.
2) No setup of pids in PCB thread zone.
3) No restore of FPU.
But at least on some basic tasks restore works well.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-12 19:26:40 +04:00
Cyrill Gorcunov
3725fd326d
syscalls: Add sys_arch_prctl helper
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-07 15:24:07 +04:00
Cyrill Gorcunov
d6e7afe3d8
syscalls: Add sys_set/get_thread_area helpers
...
They are actually banned in kernel for now, but
we might end up needing them, so better to have
them in-place.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-07 14:47:04 +04:00
Cyrill Gorcunov
a74f379d60
syscall: Add sys_unlink
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-28 14:03:59 +04:00
Cyrill Gorcunov
5fd13e04ab
syscall: Add __NR_rt_sigreturn
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-24 17:17:39 +04:00
Cyrill Gorcunov
750be4218a
Move syscall codes into separate file
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-19 13:56:29 +04:00