|
|
@ -77,6 +77,7 @@ struct sandbox {
|
|
|
|
} PAGE_ALIGNED;
|
|
|
|
} PAGE_ALIGNED;
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef STANDALONE
|
|
|
|
#ifndef STANDALONE
|
|
|
|
|
|
|
|
#ifdef SBOX_SCALE_ALLOC
|
|
|
|
struct sandbox_request {
|
|
|
|
struct sandbox_request {
|
|
|
|
struct module *mod;
|
|
|
|
struct module *mod;
|
|
|
|
char *args;
|
|
|
|
char *args;
|
|
|
@ -87,6 +88,9 @@ typedef struct sandbox_request sbox_request_t;
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
typedef struct sandbox sbox_request_t;
|
|
|
|
typedef struct sandbox sbox_request_t;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
typedef struct sandbox sbox_request_t;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
DEQUE_PROTOTYPE(sandbox, sbox_request_t *);
|
|
|
|
DEQUE_PROTOTYPE(sandbox, sbox_request_t *);
|
|
|
|
|
|
|
|
|
|
|
@ -106,6 +110,7 @@ static inline sbox_request_t *
|
|
|
|
sbox_request_alloc(struct module *mod, char *args, int sock, const struct sockaddr *addr)
|
|
|
|
sbox_request_alloc(struct module *mod, char *args, int sock, const struct sockaddr *addr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#ifndef STANDALONE
|
|
|
|
#ifndef STANDALONE
|
|
|
|
|
|
|
|
#ifdef SBOX_SCALE_ALLOC
|
|
|
|
sbox_request_t *s = malloc(sizeof(sbox_request_t));
|
|
|
|
sbox_request_t *s = malloc(sizeof(sbox_request_t));
|
|
|
|
assert(s);
|
|
|
|
assert(s);
|
|
|
|
s->mod = mod;
|
|
|
|
s->mod = mod;
|
|
|
@ -117,6 +122,9 @@ sbox_request_alloc(struct module *mod, char *args, int sock, const struct sockad
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
return sandbox_alloc(mod, args, sock, addr);
|
|
|
|
return sandbox_alloc(mod, args, sock, addr);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
return sandbox_alloc(mod, args, sock, addr);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static inline struct sandbox *
|
|
|
|
static inline struct sandbox *
|
|
|
|