* the more "logical" interface.
* memcached_light.c - This file sets up all of the sockets and run the main
* message loop.
+ *
+ *
+ * config.h is included so that I can use the ntohll/htonll on platforms that
+ * doesn't have that (this is a private function inside libmemcached, so you
+ * cannot use it directly from libmemcached without special modifications to
+ * the library)
*/
+#include "config.h"
#include <assert.h>
#include <sys/types.h>
#include <sys/socket.h>
return 0;
}
-static void work(void)
+static void work(void)
{
#define MAX_SERVERS_TO_POLL 100
struct pollfd fds[MAX_SERVERS_TO_POLL];
/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#include "config.h"
#include <stdlib.h>
#include <inttypes.h>
#include <time.h>
static struct list_entry *root;
static uint64_t cas;
-bool initialize_storage(void)
+bool initialize_storage(void)
{
return true;
}
-void shutdown_storage(void)
+void shutdown_storage(void)
{
/* Do nothing */
}
-void put_item(struct item* item)
+void put_item(struct item* item)
{
struct list_entry* entry= (void*)item;
root= entry;
}
-struct item* get_item(const void* key, size_t nkey)
+struct item* get_item(const void* key, size_t nkey)
{
struct list_entry *walker= root;
return ret;
}
-bool delete_item(const void* key, size_t nkey)
+bool delete_item(const void* key, size_t nkey)
{
struct item* item= get_item(key, nkey);
bool ret= false;
return ret;
}
-void flush(uint32_t when)
+void flush(uint32_t when)
{
/* FIXME */
(void)when;
}
}
-void update_cas(struct item* item)
+void update_cas(struct item* item)
{
item->cas= ++cas;
}
-void release_item(struct item* item __attribute__((unused)))
+void release_item(struct item* item __attribute__((unused)))
{
/* EMPTY */
}