Commit 7eee9d5c authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

compel: plugins -- Add prologue.h from compel, drop hand-made prologue_init_args

Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 23fcca8e
#ifndef __ASM_PROLOGUE_H__
#define __ASM_PROLOGUE_H__
#ifndef __ASSEMBLY__
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <errno.h>
#define sys_recv(sockfd, ubuf, size, flags) \
sys_recvfrom(sockfd, ubuf, size, flags, NULL, NULL)
typedef struct prologue_init_args {
struct sockaddr_un ctl_sock_addr;
unsigned int ctl_sock_addr_len;
unsigned int arg_s;
void *arg_p;
void *sigframe;
} prologue_init_args_t;
#endif /* __ASSEMBLY__ */
/*
* Reserve enough space for sigframe.
*
* FIXME It is rather should be taken from sigframe header.
*/
#define PROLOGUE_SGFRAME_SIZE 4096
#define PROLOGUE_INIT_ARGS_SIZE 1024
#endif /* __ASM_PROLOGUE_H__ */
...@@ -4,12 +4,4 @@ ...@@ -4,12 +4,4 @@
#include "uapi/plugins.h" #include "uapi/plugins.h"
#include "uapi/std/syscall.h" #include "uapi/std/syscall.h"
struct prologue_init_args {
struct sockaddr *ctl_sock_addr;
socklen_t ctl_sock_addr_len;
unsigned int arg_s;
void *arg_p;
};
#endif /* COMPEL_PLUGIN_STD_STD_H__ */ #endif /* COMPEL_PLUGIN_STD_STD_H__ */
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "uapi/plugins.h" #include "uapi/plugins.h"
#include "uapi/plugin-std.h" #include "uapi/plugin-std.h"
#include "asm/prologue.h"
extern int main(void *arg_p, unsigned int arg_s); extern int main(void *arg_p, unsigned int arg_s);
static struct prologue_init_args *init_args; static struct prologue_init_args *init_args;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment