/** * If the log is initialized, then add an entry to it. There is no lock * protecting the atomicity of checking if the log is allocated and adding the * entry. * * \param entry Value to be added to the log */ void logging(const char *entry) { if (shared_log) { #ifdef FORCE sleep(1); #endif add_log_entry(shared_log, entry); } }
void logging(const char *entry) { if (shared_log) { add_log_entry(shared_log, entry); } }