]> code.citadel.org Git - citadel.git/blobdiff - citadel/sysdep_decls.h
* There is now a dedicated thread for doing database checkpoints.
[citadel.git] / citadel / sysdep_decls.h
index d58124e12e317bf2a50e622578b6620cf210f5c8..c805176a0f5a5d3cf8ad0da10e11297243347585 100644 (file)
@@ -30,7 +30,7 @@ enum LogLevel {
        /* Unimportant progress messages, etc. */
         CTDL_INFO,     /* informational */
        /* Debugging messages */
-        CTDL_DEBUG,    /* debug-level messages */
+        CTDL_DEBUG     /* debug-level messages */
 };
 
 #ifdef __GNUC__
@@ -41,20 +41,25 @@ void lprintf (enum LogLevel loglevel, const char *format, ...);
 void cprintf (const char *format, ...);
 #endif
 
+extern pthread_key_t MyConKey;                 /* TSD key for MyContext() */
+
+extern int enable_syslog;
+
 void init_sysdep (void);
 void begin_critical_section (int which_one);
 void end_critical_section (int which_one);
 int ig_tcp_server (char *ip_addr, int port_number, int queue_len);
 int ig_uds_server(char *sockpath, int queue_len);
-INLINE struct CitContext *MyContext (void);
+struct CitContext *MyContext (void);
 struct CitContext *CreateNewContext (void);
 void InitMyContext (struct CitContext *con);
 void buffer_output(void);
 void unbuffer_output(void);
+void flush_output(void);
 void client_write (char *buf, int nbytes);
 int client_read_to (char *buf, int bytes, int timeout);
 int client_read (char *buf, int bytes);
-int client_gets (char *buf);
+int client_getln (char *buf, int maxbytes);
 void sysdep_master_cleanup (void);
 void kill_session (int session_to_kill);
 void *sd_context_loop (struct CitContext *con);
@@ -63,7 +68,6 @@ void cmd_nset (char *cmdbuf);
 int convert_login (char *NameToConvert);
 void *worker_thread (void *arg);
 void become_session(struct CitContext *which_con);
-void CtdlRedirectOutput(FILE *fp, int sock);
 void InitializeMasterCC(void);
 void init_master_fdset(void);
 void create_worker(void);
@@ -72,7 +76,6 @@ extern int num_sessions;
 extern volatile int time_to_die;
 extern int verbosity;
 extern int rescan[];
-extern pthread_t initial_thread;
 
 extern struct worker_node {
         pthread_t tid;
@@ -94,3 +97,7 @@ void tracked_free(void *ptr);
 char *tracked_strdup(const char *s, char *file, int line);
 void dump_heap(void);
 #endif
+
+void create_maintenance_threads(void);
+extern pthread_t indexer_thread_tid;
+extern pthread_t checkpoint_thread_tid;