memerror_SOURCES = memerror.c
memerror_LDADD = $(LDADDS)
-memslap_SOURCES = memslap.c
+memslap_SOURCES = \
+ memslap.c \
+ ms_conn.c \
+ ms_setting.c \
+ ms_sigsegv.c \
+ ms_stats.c \
+ ms_task.c \
+ ms_thread.c
memslap_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
memslap_LDADD = $(PTHREAD_LIBS) libgenexec.la $(LDADDS)
* http://www.schoonerinfotech.com/
*
*/
+
+#include "config.h"
+
#include <stdio.h>
#include <limits.h>
#include <sys/uio.h>
#include <pthread.h>
#include <stdbool.h>
#include <math.h>
-#include "../config.h"
#include "ms_stats.h"
* http://www.schoonerinfotech.com/
*
*/
+
+#include "config.h"
+
#include <ctype.h>
#include "ms_setting.h"
#include "ms_conn.h"
const char ALPHANUMBERICS[]=
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-";
-ms_setting_t ms_setting; /* store the settings specified by user */
+ms_setting_st ms_setting; /* store the settings specified by user */
/* read setting from configuration file */
*/
void ms_setting_init_pre()
{
- memset(&ms_setting, 0, sizeof(ms_setting_t));
+ memset(&ms_setting, 0, sizeof(ms_setting));
/* common initialize */
ms_setting.ncpu= ms_get_cpu_count();
bool binary_prot; /* whether it use binary protocol */
int expected_tps; /* expected throughput */
int rep_write_srv; /* which servers are used to do replication writing */
-} ms_setting_t;
+} ms_setting_st;
-extern ms_setting_t ms_setting;
+extern ms_setting_st ms_setting;
/* previous part of initialization of setting structure */
void ms_setting_init_pre(void);
* http://www.schoonerinfotech.com/
*
*/
+
+#include "config.h"
+
#include <memory.h>
#include <stdlib.h>
#include <stdio.h>
* http://www.schoonerinfotech.com/
*
*/
+
+#include "config.h"
+
#include "ms_stats.h"
#define array_size(x) (sizeof(x) / sizeof((x)[0]))
* http://www.schoonerinfotech.com/
*
*/
+
+#include "config.h"
+
#include "ms_thread.h"
#include "ms_setting.h"
* http://www.schoonerinfotech.com/
*
*/
+
+#include "config.h"
+
#include "ms_thread.h"
#include "ms_setting.h"