| 505 | return wait_event(s, e); |
| 506 | } |
| 507 | Error launch_host_func(Stream st, HostFn fn, void* arg) { |
| 508 | // skeleton: in stream order by completing the stream first (the engine's uses are rare; Phase 2 replaces this by a |
| 509 | // completion handler + a shared-event wait so the host thread does not block) |
| 510 | StreamImpl* s = S(st); |
| 511 | if (s->rec) return fail(kErrorUnsupported); |
| 512 | flush(s); |
| 513 | wait_value(s->tl, s->submitted); |
| 514 | fn(arg); |
| 515 | return kSuccess; |
| 516 | } |
| 517 | |
| 518 | Error event_create(Event* e, unsigned) { *e = new EventImpl; return kSuccess; } |
| 519 | Error event_destroy(Event e) { |
no test coverage detected