On Mon, 10 Aug 2009 14:24:35 -0400, Jeff Garzik <[email protected]> wrote:
> + /* > + * This callback runs on the context of the replication > + * manager thread, and calling any of our functions thus > + * turns our program into a multi-threaded one. Instead > + * we do a loopbreak and postpone the processing. > + */ > + /* wake up main loop */ > + write(cld_srv.rep_pipe[1], &c, 1); Might want to change the comment, you don't literally do a loopbreak if libevent is not present. Change it to "signal the main thread" or something like that. BTW, you don't need state_cldb_new anymore, write the desired state or signal type into your pipe and voila. I always thought that the two-stage state change was excessively ugly, but without a pipe I didn't see an alternative. > cldlog(LOG_INFO, "initialized: dbg %u", > debugging); > + cldlog(LOG_INFO, "replication: %s:%u", > + cld_srv.myhost, > + cld_srv.rep_port); Meh, it can easily fit on one line. -- Pete -- To unsubscribe from this list: send the line "unsubscribe hail-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
