mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-01 14:30:53 +00:00
compel: plugins -- Add prologue.h from compel, drop hand-made prologue_init_args
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
23fcca8e87
commit
7eee9d5c3d
3 changed files with 38 additions and 8 deletions
36
compel/arch/x86/plugins/include/asm/prologue.h
Normal file
36
compel/arch/x86/plugins/include/asm/prologue.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#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 @@
|
|||
#include "uapi/plugins.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__ */
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include "uapi/plugins.h"
|
||||
#include "uapi/plugin-std.h"
|
||||
|
||||
#include "asm/prologue.h"
|
||||
|
||||
extern int main(void *arg_p, unsigned int arg_s);
|
||||
|
||||
static struct prologue_init_args *init_args;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue