blob: 107d03b485a3abd8b61084ab26145a41e68ac76a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
index 4deb0db..bde9ee9 100644
--- a/bsd-user/syscall.c
+++ b/bsd-user/syscall.c
@@ -2377,7 +2377,7 @@ do_thr_exit(CPUArchState *cpu_env, abi_ulong tid_addr)
if (tid_addr) {
/* Signal target userland that it can free the stack. */
- if (! put_user_u32(1, tid_addr))
+ if (! put_user_sal(1, tid_addr))
_umtx_op(g2h(tid_addr), UMTX_OP_WAKE, INT_MAX,
NULL, NULL);
}
@@ -4588,10 +4588,13 @@ do_stat:
{
struct timespec ts;
- if (target_to_host_timespec(&ts, arg1))
- goto efault;
+ if (arg1) {
+ if (target_to_host_timespec(&ts, arg1))
+ goto efault;
+ ret = do_thr_suspend(&ts);
+ } else
+ ret = do_thr_suspend(NULL);
- ret = do_thr_suspend(&ts);
}
break;
|