/*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2001-2005 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
static const unsigned TIOCGETC = 0x40067412;
static const unsigned FIONREAD = 0x4004667f;
static const unsigned TIOCISATTY = 0x2000745e;
+ // TIOCGETS not defined in tru64, so I made up a number
+ static const unsigned TIOCGETS = 0x40000000;
+ static const unsigned TIOCGETA = 0x402c7413;
//@}
/// Resource enumeration for getrlimit().
static const char *hostname;
/// Target uname() handler.
- static int
+ static SyscallReturn
unameFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
/// Target getsysyinfo() handler.
- static int
+ static SyscallReturn
getsysinfoFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Target fnctl() handler.
- static int
+ static SyscallReturn
fcntlFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
/// Target getdirentries() handler.
- static int
+ static SyscallReturn
getdirentriesFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
// just pass basep through uninterpreted.
TypedBufferArg<int64_t> basep(tgt_basep);
basep.copyIn(xc->mem);
- ::off_t host_basep = (off_t)*basep;
+ long host_basep = (off_t)*basep;
int host_result = getdirentries(fd, host_buf, tgt_nbytes, &host_basep);
// check for error
*basep = host_basep;
basep.copyOut(xc->mem);
- return (tgt_buf_ptr - tgt_buf);
+ return tgt_buf_ptr - tgt_buf;
}
/// Target sigreturn() handler.
- static int
+ static SyscallReturn
sigreturnFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Target table() handler.
- static int
+ static SyscallReturn
tableFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
//
/// Create a stack region for a thread.
- static int
+ static SyscallReturn
stack_createFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
/// This call sets up the interface between the user and kernel
/// schedulers by creating a shared-memory region. The shared memory
/// region has several structs, some global, some per-RAD, some per-VP.
- static int
+ static SyscallReturn
nxm_task_initFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Create thread.
- static int
+ static SyscallReturn
nxm_thread_createFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
Tru64::nxm_sched_state *ssp = &rad_state->nxm_ss[thread_index];
if (ssp->nxm_u.nxm_active != 0)
- return Tru64::KERN_NOT_RECEIVER;
+ return (int) Tru64::KERN_NOT_RECEIVER;
ssp->nxm_u.pth_id = attrp->pthid;
ssp->nxm_u.nxm_active = uniq_val | 1;
}
/// Thread idle call (like yield()).
- static int
+ static SyscallReturn
nxm_idleFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Block thread.
- static int
+ static SyscallReturn
nxm_thread_blockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// block.
- static int
+ static SyscallReturn
nxm_blockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Unblock thread.
- static int
+ static SyscallReturn
nxm_unblockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Switch thread priority.
- static int
+ static SyscallReturn
swtch_priFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
//
// Since we assume at most one "kernel" thread per CPU, it's
// always safe to return false here.
- return false;
+ return 0; //false;
}
}
/// Lock acquire syscall handler.
- static int
+ static SyscallReturn
m5_mutex_lockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Try lock (non-blocking).
- static int
+ static SyscallReturn
m5_mutex_trylockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Unlock syscall handler.
- static int
+ static SyscallReturn
m5_mutex_unlockFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Signal ocndition.
- static int
+ static SyscallReturn
m5_cond_signalFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Wake up all processes waiting on the condition variable.
- static int
+ static SyscallReturn
m5_cond_broadcastFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Wait on a condition.
- static int
+ static SyscallReturn
m5_cond_waitFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Thread exit.
- static int
+ static SyscallReturn
m5_thread_exitFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
}
/// Indirect syscall invocation (call #0).
- static int
+ static SyscallReturn
indirectSyscallFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
/* 7 */ SyscallDesc("wait4", unimplementedFunc),
/* 8 */ SyscallDesc("old_creat", unimplementedFunc),
/* 9 */ SyscallDesc("link", unimplementedFunc),
- /* 10 */ SyscallDesc("unlink", unimplementedFunc),
+ /* 10 */ SyscallDesc("unlink", unlinkFunc),
/* 11 */ SyscallDesc("execv", unimplementedFunc),
/* 12 */ SyscallDesc("chdir", unimplementedFunc),
/* 13 */ SyscallDesc("fchdir", unimplementedFunc),
/* 125 */ SyscallDesc("old_recvfrom", unimplementedFunc),
/* 126 */ SyscallDesc("setreuid", unimplementedFunc),
/* 127 */ SyscallDesc("setregid", unimplementedFunc),
- /* 128 */ SyscallDesc("rename", unimplementedFunc),
+ /* 128 */ SyscallDesc("rename", renameFunc),
/* 129 */ SyscallDesc("truncate", unimplementedFunc),
/* 130 */ SyscallDesc("ftruncate", unimplementedFunc),
/* 131 */ SyscallDesc("flock", unimplementedFunc),
/* 142 */ SyscallDesc("gethostid", unimplementedFunc),
/* 143 */ SyscallDesc("sethostid", unimplementedFunc),
/* 144 */ SyscallDesc("getrlimit", getrlimitFunc<Tru64>),
- /* 145 */ SyscallDesc("setrlimit", unimplementedFunc),
+ /* 145 */ SyscallDesc("setrlimit", ignoreFunc),
/* 146 */ SyscallDesc("old_killpg", unimplementedFunc),
/* 147 */ SyscallDesc("setsid", unimplementedFunc),
/* 148 */ SyscallDesc("quotactl", unimplementedFunc),