This is more a comment about the luvit style in general but the cast is superfluous in C and sizeof(struct luv_signal_context) is less safe than sizeof(*signal_watcher). That last one requires no additional effort - i.e. no addition room for bugs - when the type of signal_watcher changes.