示例#1
0
文件: bot.c 项目: icanhas/yantar
/*
 * SV_BotFrame
 */
void
SV_BotFrame(int time)
{
	if(!bot_enable) return;
	/* NOTE: maybe the game is already shutdown */
	if(!gvm) return;
	vmcall(gvm, BOTAI_START_FRAME, time);
}
示例#2
0
文件: evmcs_test.c 项目: avagin/linux
void l2_guest_code(void)
{
	GUEST_SYNC(6);

	GUEST_SYNC(7);

	/* Done, exit to L1 and never come back.  */
	vmcall();
}
示例#3
0
int hsocket(int domain, int type, int protocol)
{
	struct {int d; int t; int p;} arg;

	arg.d = domain;
	arg.t = type;
	arg.p = protocol;

	return vmcall(0, (int)&arg, sizeof(arg));
}
示例#4
0
void l2_guest_code(void)
{
	GUEST_SYNC(6);

        /* Exit to L1 */
	vmcall();

	/* L1 has now set up a shadow VMCS for us.  */
	GUEST_ASSERT(vmreadz(GUEST_RIP) == 0xc0ffee);
	GUEST_SYNC(10);
	GUEST_ASSERT(vmreadz(GUEST_RIP) == 0xc0ffee);
	GUEST_ASSERT(!vmwrite(GUEST_RIP, 0xc0fffee));
	GUEST_SYNC(11);
	GUEST_ASSERT(vmreadz(GUEST_RIP) == 0xc0fffee);
	GUEST_ASSERT(!vmwrite(GUEST_RIP, 0xc0ffffee));
	GUEST_SYNC(12);

	/* Done, exit to L1 and never come back.  */
	vmcall();
}
示例#5
0
int hrecv(int fd,void *buf,int len,int flags)
{
    struct {int fd; uvlong buf; int len; int flg;} arg;

    arg.fd = fd;
    arg.buf = (uvlong)(uintptr)buf;
    arg.len = len;
    arg.flg = flags;

    return vmcall(3, (int)&arg, sizeof(arg));
}
示例#6
0
int hconnect(int fd, int portno, char *hostname)
{
	struct {int fd; uvlong hn; int len; int pn;} arg;

	arg.fd = fd;
	arg.hn = (uvlong)(uintptr)hostname;
	arg.len = strlen(hostname);
	arg.pn = portno;

	return vmcall(1, (int)&arg, sizeof(arg));
}
示例#7
0
int hclose(int fd)
{
    return vmcall(4, fd, 0);
}