Allow duplicate values in mark channels

This commit is contained in:
Rodrigo Arias 2024-06-20 11:41:38 +02:00
parent c803a7566f
commit d6a83a0520
2 changed files with 9 additions and 0 deletions

View File

@ -311,6 +311,9 @@ create_thread_chan(struct ovni_mark_emu *m, struct bay *bay, struct thread *th)
struct chan *ch = &t->channels[i];
chan_init(ch, type->ctype, fmt, th->gindex, type->type);
/* Allow duplicates */
chan_prop_set(ch, CHAN_ALLOW_DUP, 1);
if (bay_register(bay, ch) != 0) {
err("bay_register failed");
return -1;

View File

@ -63,6 +63,12 @@ main(void)
ovni_mark_set(MARK_PROGRESS, i);
}
/* Ensure we can emit the same value several times */
for (int i = 0; i < 10; i++) {
sleep_us(10);
ovni_mark_set(MARK_PROGRESS, 100);
}
instr_end();
return 0;