aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/main.c b/main.c
index be91332..111424c 100644
--- a/main.c
+++ b/main.c
@@ -7,7 +7,7 @@
#define UNUSED(_v) ((void)(_v))
-PIPELINE_STAGE int identity_stage_handle(const ptx_pipeline_ctx_t *ctx, void *data, size_t sz)
+PIPELINE_STAGE int identity_stage_handle(const ptx_pipeline_ctx_t *ctx, const void *data, size_t sz)
{
return ptx_pipeline_ctx_next(ctx, data, sz);
}
@@ -31,7 +31,7 @@ PIPELINE_CLEANUP void debug_stage_cleanup(const char *name, void *puser)
printf("Debug stage %s (cleanup): %p\n", name, puser);
}
-PIPELINE_STAGE int debug_stage_handle(const ptx_pipeline_ctx_t *ctx, void *data, size_t sz)
+PIPELINE_STAGE int debug_stage_handle(const ptx_pipeline_ctx_t *ctx, const void *data, size_t sz)
{
bool cont = !!(uintptr_t)(*ptx_pipeline_ctx_get_user(ctx));
printf("Debug stage %s:\n Data: %p\n Size: %zu\n", ptx_pipeline_ctx_get_name(ctx), data, sz);
@@ -111,6 +111,14 @@ int main(void) {
}
printf("Handle returned: %d\n", ptx_pipeline_handle(pl, "sussy", 10));
+
+ if (ptx_pipeline_remove_stage(pl, "debug1") < 1) {
+ fputs("Failed to remove debug1 from pipeline\n", stderr);
+ return 1;
+ }
+
+ printf("Handle returned: %d\n", ptx_pipeline_handle(pl, "sussy2", 20));
+
ptx_pipeline_free(pl);
return 0;