| 476 | |
| 477 | Error stream_create(Stream* s, unsigned) { *s = make_stream(); return kSuccess; } |
| 478 | Error stream_destroy(Stream s) { |
| 479 | if (!s) return kSuccess; |
| 480 | flush(s); |
| 481 | wait_value(s->tl, s->submitted); |
| 482 | s->tl->release(); |
| 483 | s->q->release(); |
| 484 | delete s; |
| 485 | return kSuccess; |
| 486 | } |
| 487 | Error stream_synchronize(Stream st) { |
| 488 | StreamImpl* s = S(st); |
| 489 | flush(s); |