2010-06-14 14:27:40 +00:00
|
|
|
// (c) 2010 Thomas Schoebel-Theuer / 1&1 Internet AG
|
|
|
|
#ifndef MARS_H
|
|
|
|
#define MARS_H
|
|
|
|
|
2011-02-23 20:48:06 +00:00
|
|
|
#include <linux/semaphore.h>
|
2011-06-10 13:57:52 +00:00
|
|
|
#include <linux/rwsem.h>
|
2010-06-14 14:27:40 +00:00
|
|
|
|
2011-03-30 12:02:50 +00:00
|
|
|
//#define MARS_TRACING // write runtime trace data to /mars/trace.csv
|
2011-03-24 16:05:46 +00:00
|
|
|
|
2011-03-22 14:36:26 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2011-03-27 15:18:38 +00:00
|
|
|
// include the generic brick infrastructure
|
2011-03-23 17:58:02 +00:00
|
|
|
|
2011-10-17 12:31:48 +00:00
|
|
|
#define OBJ_TYPE_MREF 0
|
|
|
|
#define OBJ_TYPE_MAX 1
|
2011-03-22 14:36:26 +00:00
|
|
|
|
|
|
|
#include "brick.h"
|
2011-08-12 11:09:48 +00:00
|
|
|
#include "brick_mem.h"
|
2011-03-22 14:36:26 +00:00
|
|
|
|
2011-08-12 11:09:48 +00:00
|
|
|
#define GFP_MARS GFP_BRICK
|
2011-03-24 16:05:46 +00:00
|
|
|
|
2011-03-22 14:36:26 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2011-03-23 17:58:02 +00:00
|
|
|
// MARS-specific debugging helpers
|
2011-03-22 14:36:26 +00:00
|
|
|
|
2011-03-24 16:05:46 +00:00
|
|
|
#define MARS_FATAL "MARS_FATAL "
|
|
|
|
#define MARS_ERROR "MARS_ERROR "
|
|
|
|
#define MARS_WARNING "MARS_WARN "
|
|
|
|
#define MARS_INFO "MARS_INFO "
|
|
|
|
#define MARS_DEBUG "MARS_DEBUG "
|
2011-03-22 14:36:26 +00:00
|
|
|
|
2012-01-11 15:16:39 +00:00
|
|
|
#define _MARS_MSG(_dump, PREFIX, _fmt, _args...) \
|
|
|
|
brick_say(_dump, PREFIX, __BASE_FILE__, __LINE__, __FUNCTION__, _fmt, ##_args)
|
2011-07-20 13:11:44 +00:00
|
|
|
|
|
|
|
#define MARS_FAT(_fmt, _args...) _MARS_MSG(true, MARS_FATAL, _fmt, ##_args)
|
|
|
|
#define MARS_ERR(_fmt, _args...) _MARS_MSG(true, MARS_ERROR, _fmt, ##_args)
|
|
|
|
#define MARS_WRN(_fmt, _args...) _MARS_MSG(false, MARS_WARNING, _fmt, ##_args)
|
|
|
|
#define MARS_INF(_fmt, _args...) _MARS_MSG(false, MARS_INFO, _fmt, ##_args)
|
2011-03-18 13:15:40 +00:00
|
|
|
|
2010-07-23 11:55:18 +00:00
|
|
|
#ifdef MARS_DEBUGGING
|
2011-07-20 13:11:44 +00:00
|
|
|
#define MARS_DBG(_fmt, _args...) _MARS_MSG(false, MARS_DEBUG, _fmt, ##_args)
|
2010-07-23 11:55:18 +00:00
|
|
|
#else
|
2011-07-20 13:11:44 +00:00
|
|
|
#define MARS_DBG(_args...) /**/
|
2010-07-23 11:55:18 +00:00
|
|
|
#endif
|
2011-03-18 13:15:40 +00:00
|
|
|
|
2011-02-23 20:48:06 +00:00
|
|
|
#ifdef IO_DEBUGGING
|
2011-07-28 11:41:06 +00:00
|
|
|
#define MARS_IO(_fmt, _args...) _MARS_MSG(false, MARS_DEBUG, _fmt, ##_args)
|
2011-02-23 20:48:06 +00:00
|
|
|
#else
|
2011-07-20 13:11:44 +00:00
|
|
|
#define MARS_IO(_args...) /*empty*/
|
2011-02-23 20:48:06 +00:00
|
|
|
#endif
|
2011-03-18 13:15:40 +00:00
|
|
|
|
2011-03-02 09:30:56 +00:00
|
|
|
#ifdef STAT_DEBUGGING
|
|
|
|
#define MARS_STAT MARS_INF
|
|
|
|
#else
|
2011-07-20 13:11:44 +00:00
|
|
|
#define MARS_STAT(_args...) /*empty*/
|
2011-03-02 09:30:56 +00:00
|
|
|
#endif
|
2010-06-14 14:27:40 +00:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// MARS-specific definitions
|
|
|
|
|
2011-05-19 11:36:00 +00:00
|
|
|
#define MARS_PRIO_HIGH -1
|
|
|
|
#define MARS_PRIO_NORMAL 0 // this is automatically used by memset()
|
|
|
|
#define MARS_PRIO_LOW 1
|
|
|
|
#define MARS_PRIO_NR 3
|
2011-03-10 11:40:06 +00:00
|
|
|
|
2010-06-20 18:55:34 +00:00
|
|
|
// object stuff
|
|
|
|
|
2010-12-15 12:13:18 +00:00
|
|
|
/* mref */
|
2010-07-23 11:55:18 +00:00
|
|
|
|
2010-12-15 12:13:18 +00:00
|
|
|
#define MREF_UPTODATE 1
|
|
|
|
#define MREF_READING 2
|
|
|
|
#define MREF_WRITING 4
|
2010-07-05 15:56:58 +00:00
|
|
|
|
2010-12-15 12:13:18 +00:00
|
|
|
extern const struct generic_object_type mref_type;
|
2010-07-05 15:56:58 +00:00
|
|
|
|
2010-12-15 12:13:18 +00:00
|
|
|
struct mref_aspect {
|
|
|
|
GENERIC_ASPECT(mref);
|
2010-07-05 15:56:58 +00:00
|
|
|
};
|
|
|
|
|
2010-12-15 12:13:18 +00:00
|
|
|
struct mref_object_layout {
|
|
|
|
GENERIC_OBJECT_LAYOUT(mref);
|
2010-07-05 15:56:58 +00:00
|
|
|
};
|
|
|
|
|
2011-03-27 15:18:38 +00:00
|
|
|
#ifdef MARS_TRACING
|
|
|
|
|
2011-03-29 14:40:40 +00:00
|
|
|
extern unsigned long long start_trace_clock;
|
|
|
|
|
2011-03-27 15:18:38 +00:00
|
|
|
#define MAX_TRACES 16
|
|
|
|
|
|
|
|
#define TRACING_INFO \
|
|
|
|
int ref_traces; \
|
2011-03-29 14:40:40 +00:00
|
|
|
unsigned long long ref_trace_stamp[MAX_TRACES]; \
|
|
|
|
const char *ref_trace_info[MAX_TRACES];
|
2011-03-27 15:18:38 +00:00
|
|
|
|
|
|
|
extern void _mars_log(char *buf, int len);
|
|
|
|
extern void mars_log(const char *fmt, ...);
|
|
|
|
extern void mars_trace(struct mref_object *mref, const char *info);
|
|
|
|
extern void mars_log_trace(struct mref_object *mref);
|
|
|
|
|
|
|
|
#else
|
|
|
|
#define TRACING_INFO /*empty*/
|
|
|
|
#define _mars_log(buf,len) /*empty*/
|
|
|
|
#define mars_log(fmt...) /*empty*/
|
|
|
|
#define mars_trace(mref,info) /*empty*/
|
|
|
|
#define mars_log_trace(mref) /*empty*/
|
|
|
|
#endif
|
|
|
|
|
2012-01-30 11:54:27 +00:00
|
|
|
#define MREF_OBJECT(OBJTYPE) \
|
|
|
|
CALLBACK_OBJECT(OBJTYPE); \
|
2010-08-02 16:31:10 +00:00
|
|
|
/* supplied by caller */ \
|
2011-03-10 11:40:06 +00:00
|
|
|
void *ref_data; /* preset to NULL for buffered IO */ \
|
2010-08-05 15:54:48 +00:00
|
|
|
loff_t ref_pos; \
|
|
|
|
int ref_len; \
|
|
|
|
int ref_may_write; \
|
2011-03-10 11:40:06 +00:00
|
|
|
int ref_prio; \
|
2011-03-07 10:27:38 +00:00
|
|
|
int ref_timeout; \
|
2010-08-05 15:54:48 +00:00
|
|
|
/* maintained by the ref implementation, readable for callers */ \
|
2011-03-18 13:15:40 +00:00
|
|
|
loff_t ref_total_size; /* just for info, need not be implemented */ \
|
2010-08-05 15:54:48 +00:00
|
|
|
int ref_flags; \
|
|
|
|
int ref_rw; \
|
2011-02-23 20:48:06 +00:00
|
|
|
int ref_id; /* not mandatory; may be used for identification */ \
|
2011-03-24 16:05:46 +00:00
|
|
|
bool ref_skip_sync; /* skip sync for this particular mref */ \
|
2010-08-05 15:54:48 +00:00
|
|
|
/* maintained by the ref implementation, incrementable for \
|
|
|
|
* callers (but not decrementable! use ref_put()) */ \
|
|
|
|
atomic_t ref_count; \
|
2011-10-04 11:34:18 +00:00
|
|
|
/* internal */ \
|
2011-03-27 15:18:38 +00:00
|
|
|
TRACING_INFO;
|
2010-07-23 11:55:18 +00:00
|
|
|
|
2010-12-15 12:13:18 +00:00
|
|
|
struct mref_object {
|
|
|
|
MREF_OBJECT(mref);
|
2010-07-23 11:55:18 +00:00
|
|
|
};
|
2010-06-20 18:55:34 +00:00
|
|
|
|
2010-07-07 14:09:16 +00:00
|
|
|
// internal helper structs
|
|
|
|
|
|
|
|
struct mars_info {
|
|
|
|
loff_t current_size;
|
2010-08-23 05:06:06 +00:00
|
|
|
int transfer_order;
|
|
|
|
int transfer_size;
|
2010-07-07 14:09:16 +00:00
|
|
|
struct file *backing_file;
|
|
|
|
};
|
|
|
|
|
2010-06-20 18:55:34 +00:00
|
|
|
// brick stuff
|
|
|
|
|
2012-01-30 11:54:27 +00:00
|
|
|
#define MARS_BRICK(BRITYPE) \
|
|
|
|
GENERIC_BRICK(BRITYPE); \
|
2011-03-01 09:34:36 +00:00
|
|
|
struct list_head global_brick_link; \
|
|
|
|
struct list_head dent_brick_link; \
|
2011-02-23 20:48:06 +00:00
|
|
|
const char *brick_path; \
|
|
|
|
struct mars_global *global; \
|
2011-10-10 13:03:10 +00:00
|
|
|
int brick_version; \
|
2011-09-27 11:57:04 +00:00
|
|
|
void (*show_status)(struct mars_brick *brick, bool shutdown); \
|
2010-06-14 14:27:40 +00:00
|
|
|
|
|
|
|
struct mars_brick {
|
|
|
|
MARS_BRICK(mars);
|
|
|
|
};
|
|
|
|
|
2012-01-30 11:54:27 +00:00
|
|
|
#define MARS_INPUT(BRITYPE) \
|
|
|
|
GENERIC_INPUT(BRITYPE); \
|
2010-06-14 14:27:40 +00:00
|
|
|
|
|
|
|
struct mars_input {
|
|
|
|
MARS_INPUT(mars);
|
|
|
|
};
|
|
|
|
|
2012-01-30 11:54:27 +00:00
|
|
|
#define MARS_OUTPUT(BRITYPE) \
|
|
|
|
GENERIC_OUTPUT(BRITYPE); \
|
2010-06-14 14:27:40 +00:00
|
|
|
|
|
|
|
struct mars_output {
|
|
|
|
MARS_OUTPUT(mars);
|
|
|
|
};
|
|
|
|
|
2012-01-30 11:54:27 +00:00
|
|
|
#define MARS_BRICK_OPS(BRITYPE) \
|
|
|
|
GENERIC_BRICK_OPS(BRITYPE); \
|
|
|
|
char *(*brick_statistics)(struct BRITYPE##_brick *brick, int verbose); \
|
|
|
|
void (*reset_statistics)(struct BRITYPE##_brick *brick); \
|
2010-06-28 05:53:46 +00:00
|
|
|
|
2012-01-30 11:54:27 +00:00
|
|
|
#define MARS_OUTPUT_OPS(BRITYPE) \
|
|
|
|
GENERIC_OUTPUT_OPS(BRITYPE); \
|
|
|
|
int (*mars_get_info)(struct BRITYPE##_output *output, struct mars_info *info); \
|
2010-12-15 12:13:18 +00:00
|
|
|
/* mref */ \
|
2012-01-30 11:54:27 +00:00
|
|
|
int (*mref_get)(struct BRITYPE##_output *output, struct mref_object *mref); \
|
|
|
|
void (*mref_io)(struct BRITYPE##_output *output, struct mref_object *mref); \
|
|
|
|
void (*mref_put)(struct BRITYPE##_output *output, struct mref_object *mref); \
|
2010-06-14 14:27:40 +00:00
|
|
|
|
|
|
|
// all non-extendable types
|
2010-07-30 11:50:20 +00:00
|
|
|
|
2012-01-30 11:54:27 +00:00
|
|
|
#define _MARS_TYPES(BRITYPE) \
|
2010-07-30 11:50:20 +00:00
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
struct BRITYPE##_brick_ops { \
|
|
|
|
MARS_BRICK_OPS(BRITYPE); \
|
2010-08-04 22:38:48 +00:00
|
|
|
}; \
|
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
struct BRITYPE##_output_ops { \
|
|
|
|
MARS_OUTPUT_OPS(BRITYPE); \
|
2010-08-04 22:38:48 +00:00
|
|
|
}; \
|
2010-06-28 05:53:46 +00:00
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
struct BRITYPE##_brick_type { \
|
|
|
|
GENERIC_BRICK_TYPE(BRITYPE); \
|
2010-06-28 05:53:46 +00:00
|
|
|
}; \
|
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
struct BRITYPE##_input_type { \
|
|
|
|
GENERIC_INPUT_TYPE(BRITYPE); \
|
2010-06-28 05:53:46 +00:00
|
|
|
}; \
|
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
struct BRITYPE##_output_type { \
|
|
|
|
GENERIC_OUTPUT_TYPE(BRITYPE); \
|
2010-06-28 05:53:46 +00:00
|
|
|
}; \
|
2010-08-04 22:38:48 +00:00
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
struct BRITYPE##_callback { \
|
|
|
|
GENERIC_CALLBACK(BRITYPE); \
|
2010-08-08 14:02:54 +00:00
|
|
|
}; \
|
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
DECLARE_BRICK_FUNCTIONS(BRITYPE); \
|
2010-06-28 05:53:46 +00:00
|
|
|
|
2010-07-23 11:55:18 +00:00
|
|
|
|
2012-01-30 11:54:27 +00:00
|
|
|
#define MARS_TYPES(BRITYPE) \
|
2010-07-30 11:50:20 +00:00
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
_MARS_TYPES(BRITYPE) \
|
2010-07-30 11:50:20 +00:00
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
struct BRITYPE##_object_layout; \
|
2010-08-01 20:21:18 +00:00
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
DECLARE_ASPECT_FUNCTIONS(BRITYPE,mref); \
|
|
|
|
extern int init_mars_##BRITYPE(void); \
|
|
|
|
extern void exit_mars_##BRITYPE(void);
|
2010-07-23 11:55:18 +00:00
|
|
|
|
|
|
|
|
2010-12-15 11:58:22 +00:00
|
|
|
// instantiate a pseudo base-class "mars"
|
|
|
|
|
|
|
|
_MARS_TYPES(mars);
|
2012-01-30 11:54:27 +00:00
|
|
|
DECLARE_ASPECT_FUNCTIONS(mars,mref);
|
2010-12-15 11:58:22 +00:00
|
|
|
|
2010-06-14 14:27:40 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2010-12-15 11:58:22 +00:00
|
|
|
// MARS-specific helpers
|
2010-06-14 14:27:40 +00:00
|
|
|
|
2012-01-30 11:54:27 +00:00
|
|
|
#define MARS_MAKE_STATICS(BRITYPE) \
|
2010-07-23 11:55:18 +00:00
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
int BRITYPE##_brick_nr = -EEXIST; \
|
|
|
|
EXPORT_SYMBOL_GPL(BRITYPE##_brick_nr); \
|
2010-07-23 11:55:18 +00:00
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
static const struct generic_aspect_type BRITYPE##_mref_aspect_type = { \
|
|
|
|
.aspect_type_name = #BRITYPE "_mref_aspect_type", \
|
2010-12-15 12:13:18 +00:00
|
|
|
.object_type = &mref_type, \
|
2012-01-30 11:54:27 +00:00
|
|
|
.aspect_size = sizeof(struct BRITYPE##_mref_aspect), \
|
|
|
|
.init_fn = BRITYPE##_mref_aspect_init_fn, \
|
|
|
|
.exit_fn = BRITYPE##_mref_aspect_exit_fn, \
|
2010-07-23 11:55:18 +00:00
|
|
|
}; \
|
|
|
|
\
|
2012-01-30 11:54:27 +00:00
|
|
|
static const struct generic_aspect_type *BRITYPE##_aspect_types[OBJ_TYPE_MAX] = { \
|
|
|
|
[OBJ_TYPE_MREF] = &BRITYPE##_mref_aspect_type, \
|
2010-07-23 11:55:18 +00:00
|
|
|
}; \
|
2010-07-30 11:50:20 +00:00
|
|
|
|
2011-08-25 10:16:32 +00:00
|
|
|
extern const struct meta mars_info_meta[];
|
|
|
|
extern const struct meta mars_mref_meta[];
|
|
|
|
extern const struct meta mars_timespec_meta[];
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2011-07-22 10:43:40 +00:00
|
|
|
#ifdef _STRATEGY
|
|
|
|
#include "sy_old/strategy.h"
|
|
|
|
#endif
|
2011-02-23 20:48:06 +00:00
|
|
|
|
2011-11-04 15:43:23 +00:00
|
|
|
extern void mars_power_led_on(struct mars_brick *brick, bool val);
|
|
|
|
extern void mars_power_led_off(struct mars_brick *brick, bool val);
|
2011-07-22 10:43:40 +00:00
|
|
|
/* this should disappear!
|
|
|
|
*/
|
|
|
|
extern void (*_mars_trigger)(void);
|
2012-01-17 14:37:14 +00:00
|
|
|
extern void (*_mars_remote_trigger)(void);
|
|
|
|
#define mars_trigger() do { if (_mars_trigger) { MARS_DBG("trigger...\n"); _mars_trigger(); } } while (0)
|
|
|
|
#define mars_remote_trigger() do { if (_mars_remote_trigger) { MARS_DBG("remote_trigger...\n"); _mars_remote_trigger(); } } while (0)
|
2011-02-27 14:17:58 +00:00
|
|
|
|
2011-02-23 20:48:06 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2011-03-01 18:00:14 +00:00
|
|
|
/* Some special brick types for avoidance of cyclic references.
|
|
|
|
*
|
|
|
|
* The client/server network bricks use this for independent instantiation
|
|
|
|
* from the main instantiation logic (separate modprobe for mars_server
|
|
|
|
* is possible).
|
|
|
|
*/
|
2011-03-03 09:02:10 +00:00
|
|
|
extern const struct generic_brick_type *_client_brick_type;
|
2011-03-18 13:15:40 +00:00
|
|
|
extern const struct generic_brick_type *_bio_brick_type;
|
2011-03-03 09:02:10 +00:00
|
|
|
extern const struct generic_brick_type *_aio_brick_type;
|
2011-11-14 13:12:33 +00:00
|
|
|
extern const struct generic_brick_type *_sio_brick_type;
|
2011-03-01 18:00:14 +00:00
|
|
|
|
2011-11-14 17:24:47 +00:00
|
|
|
#ifndef CONFIG_MARS_PREFER_SIO
|
|
|
|
|
2011-03-02 09:30:56 +00:00
|
|
|
/* Kludge: our kernel threads will have no mm context, but need one
|
|
|
|
* for stuff like ioctx_alloc() / aio_setup_ring() etc
|
|
|
|
* which expect userspace resources.
|
|
|
|
* We fake one.
|
|
|
|
* TODO: factor out the userspace stuff from AIO such that
|
|
|
|
* this fake is no longer necessary.
|
|
|
|
* Even better: replace do_mmap() in AIO stuff by something
|
|
|
|
* more friendly to kernelspace apps.
|
|
|
|
*/
|
|
|
|
#include <linux/mmu_context.h>
|
|
|
|
|
|
|
|
extern struct mm_struct *mm_fake;
|
|
|
|
|
2011-08-25 10:16:32 +00:00
|
|
|
static inline void set_fake(void)
|
2011-03-02 09:30:56 +00:00
|
|
|
{
|
2011-08-25 10:16:32 +00:00
|
|
|
mm_fake = current->mm;
|
|
|
|
if (mm_fake) {
|
|
|
|
MARS_INF("\n");
|
|
|
|
atomic_inc(¤t->usage);
|
|
|
|
atomic_inc(&mm_fake->mm_count);
|
|
|
|
atomic_inc(&mm_fake->mm_users);
|
|
|
|
}
|
2011-03-02 09:30:56 +00:00
|
|
|
}
|
|
|
|
|
2011-08-25 10:16:32 +00:00
|
|
|
static inline void put_fake(void)
|
2011-03-02 09:30:56 +00:00
|
|
|
{
|
2011-08-25 10:16:32 +00:00
|
|
|
#if 0
|
|
|
|
if (mm_fake) {
|
|
|
|
MARS_INF("\n");
|
|
|
|
atomic_dec(&mm_fake->mm_users);
|
|
|
|
mmput(mm_fake);
|
|
|
|
mm_fake = NULL;
|
|
|
|
}
|
|
|
|
#endif
|
2011-03-02 09:30:56 +00:00
|
|
|
}
|
|
|
|
|
2011-08-25 10:16:32 +00:00
|
|
|
static inline void use_fake_mm(void)
|
2011-03-02 09:30:56 +00:00
|
|
|
{
|
2011-08-25 10:16:32 +00:00
|
|
|
if (!current->mm && mm_fake) {
|
|
|
|
MARS_INF("\n");
|
|
|
|
use_mm(mm_fake);
|
2011-03-02 09:30:56 +00:00
|
|
|
}
|
|
|
|
}
|
2011-08-25 10:16:32 +00:00
|
|
|
|
2011-03-02 09:30:56 +00:00
|
|
|
/* Cleanup faked mm, otherwise do_exit() will crash
|
|
|
|
*/
|
2011-08-25 10:16:32 +00:00
|
|
|
static inline void unuse_fake_mm(void)
|
2011-03-02 09:30:56 +00:00
|
|
|
{
|
2011-08-25 10:16:32 +00:00
|
|
|
if (current->mm == mm_fake && mm_fake) {
|
|
|
|
MARS_INF("\n");
|
|
|
|
unuse_mm(mm_fake);
|
|
|
|
//current->mm = NULL;
|
2011-03-02 09:30:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-11-14 17:24:47 +00:00
|
|
|
#else
|
|
|
|
static inline void set_fake(void) {}
|
|
|
|
static inline void put_fake(void) {}
|
|
|
|
static inline void use_fake_mm(void) {}
|
|
|
|
static inline void unuse_fake_mm(void) {}
|
|
|
|
#endif
|
|
|
|
|
2011-08-25 10:16:32 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// init
|
|
|
|
|
|
|
|
extern int init_mars(void);
|
|
|
|
extern void exit_mars(void);
|
|
|
|
|
2011-02-23 20:48:06 +00:00
|
|
|
#endif
|