Push the server and option code down to reduce dependency loops
This commit is contained in:
30
nserver.c
30
nserver.c
@ -44,13 +44,19 @@ int ServerSetupInterrupt(int iPort, pNetRead pNet, pTaskMan pTasker);
|
||||
configures a port for listening for interrupts
|
||||
*/
|
||||
|
||||
extern void StopExit(void); /* in SICSmain.c */
|
||||
|
||||
extern int openDevexecLog(); /* in devexec.c */
|
||||
|
||||
extern int NetWatchTask(void *pData); /* in nwatch.c */
|
||||
/* ========================= Less dreadful file statics =================== */
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
static void StopExit(void)
|
||||
{
|
||||
if (pServ) {
|
||||
StopServer(pServ);
|
||||
}
|
||||
}
|
||||
|
||||
#define DEFAULTINIFILE "servo.tcl"
|
||||
#define DEFAULTSTATUSFILE "sicsstat.tcl"
|
||||
#define INIT(F) { void F(void); F(); }
|
||||
@ -510,3 +516,23 @@ int ServerIsStarting(pServer self)
|
||||
{
|
||||
return self->pReader == NULL;
|
||||
}
|
||||
|
||||
pServer pServ = NULL;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
SicsInterp *GetInterpreter(void)
|
||||
{
|
||||
return pServ->pSics;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
pExeList GetExecutor(void)
|
||||
{
|
||||
return pServ->pExecutor;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
pTaskMan GetTasker(void)
|
||||
{
|
||||
return pServ->pTasker;
|
||||
}
|
||||
|
Reference in New Issue
Block a user