We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf2caf4 commit c735b3cCopy full SHA for c735b3c
host.c
@@ -24,16 +24,27 @@ able_host_exec(able_host_t *host) {
24
return y;
25
}
26
switch (host->c.i) {
27
- case 0x80: { // wait ( p - n)
28
- if (DSU(&host->c, 1))
+ case 0x80: { // wait ( t p - n)
+ if (DSU(&host->c, 2))
29
return -6;
30
uint32_t pn;
31
pn = DS0;
32
+ DSD(&host->c);
33
if (pn >= host->pc) {
34
DS0 = 4;
35
break;
36
- DS0 = able_host_node_wait_shim(host->n, &host->p[pn].e, NULL);
37
+ struct timespec ts;
38
+ struct timespec *tp;
39
+ tp = NULL;
40
+ uint64_t tv;
41
+ tv = DS0;
42
+ if (tv != -1) {
43
+ ts.tv_sec = tv / 1000000000;
44
+ ts.tv_nsec = tv % 1000000000;
45
+ tp = &ts;
46
+ }
47
+ DS0 = able_host_node_wait_shim(host->n, &host->p[pn].e, tp);
48
if (DS0 == 0)
49
return -5;
50
0 commit comments