/* Destroy a star node. */ void SNetStopStar(node_t *node, fifo_t *fifo) { star_arg_t *sarg = NODE_SPEC(node, star); trace(__func__); if (!sarg->stopping) { sarg->stopping = 1; SNetStopStream(sarg->instance, fifo); } else if (sarg->stopping == 1) { sarg->stopping = 2; SNetStopStream(sarg->collector, fifo); SNetExprListDestroy(sarg->guards); SNetVariantListDestroy(sarg->exit_patterns); SNetEntityDestroy(sarg->entity); SNetDelete(node); } }
/* Destroy a dripback node. */ void SNetStopDripBack(node_t *node, fifo_t *fifo) { dripback_arg_t *darg = NODE_SPEC(node, dripback); trace(__func__); if (darg->stopping == 0) { darg->stopping = 1; SNetStopStream(darg->instance, fifo); } else if (darg->stopping == 1) { darg->stopping = 2; SNetStopStream(darg->output, fifo); SNetVariantListDestroy(darg->back_patterns); SNetExprListDestroy(darg->guards); SNetStreamDestroy(darg->selfref); SNetEntityDestroy(darg->entity); SNetDelete(node); } }
/* Deallocate input node */ void SNetStopInput(node_t *node, fifo_t *fifo) { input_arg_t *iarg = NODE_SPEC(node, input); trace(__func__); iarg->indesc->landing->refs = 0; SNetFreeLanding(iarg->indesc->landing); SNetDelete(iarg->indesc); SNetStopStream(iarg->output, fifo); SNetDelete(node); }