terom@23: #ifndef RENDER_THREAD_STRUCT_H terom@23: #define RENDER_THREAD_STRUCT_H terom@23: terom@23: #include terom@23: #include terom@23: terom@23: #include "render_thread.h" terom@23: #include "render_struct.h" terom@23: terom@23: struct render_thread { terom@23: int owned_by_me; terom@23: terom@23: // the thread identifier terom@23: pthread_t thread_id; terom@23: terom@23: // the render op, this includes the socket/stream terom@23: struct render render_info; terom@23: terom@23: // completion callback terom@23: render_thread_done_cb cb_func; terom@23: void *cb_arg; terom@23: terom@23: // what fd to use for completion notification terom@23: int notify_fd; terom@23: terom@23: // the notification event terom@23: struct event ev; terom@23: terom@24: // did the render fail? terom@24: int err; terom@24: terom@23: // already canceled/done? terom@23: int is_active; terom@23: }; terom@23: terom@23: int render_thread_init (struct render_thread *ctx, struct render *render_info, render_thread_done_cb cb_func, void *cb_arg); terom@23: terom@23: void render_thread_cancel (struct render_thread *ctx); terom@23: terom@23: void render_thread_deinit (struct render_thread *ctx); terom@23: terom@23: #endif /* RENDER_THREAD_STRUCT_H */