#include <sys/socket.h>
#include <sys/time.h>
+#include <net/if.h>
+
#include <netat/sysglue.h>
#include <netat/appletalk.h>
#include <netat/at_pcb.h>
+#include <netat/at_var.h>
#include <netat/debug.h>
#include <netat/adsp.h>
#include <netat/adsp_internal.h>
-void TimerTick();
/*
* TrashSession
* OUTPUTS:
* none
*/
+void TrashSession(CCBPtr);
+
void TrashSession(sp) /* (CCBPtr sp) */
CCBPtr sp;
{
- int s;
- ATDISABLE(s, sp->lock);
sp->userFlags |= eTearDown;
sp->removing = 1;
sp->state = sClosed;
- ATENABLE(s, sp->lock);
DoClose(sp, errAborted, 1);
}
* OUTPUTS:
*
*/
+void DoTimerElem(TimerElemPtr);
+
void DoTimerElem(t) /* (TimerElemPtr t) */
TimerElemPtr t;
{
CCBPtr sp;
- int s;
sp = (CCBPtr)((Ptr)t - t->type); /* Recover stream pointer for this guy */
- ATDISABLE(s, sp->lock);
if (t->type == kFlushTimerType) { /* flush write data time just fired */
if (sp->sData) { /* If there's any data, flush it. */
} else if (t->type == kProbeTimerType) {
if (sp->state == sOpen || sp->state == sClosing) {
if (--sp->probeCntr == 0) { /* Connection died */
- ATENABLE(s, sp->lock);
TrashSession(sp);
return;
} else {
{
if (--sp->openRetrys == 0) { /* Oops, didn't open */
sp->state = sClosed;
- ATENABLE(s, sp->lock);
DoClose(sp, errOpening, 1);
return;
} /* open failed */
dPrintf(D_M_ADSP, D_L_ERROR, ("DoTimerElem:Unknown timer type!\n"));
}
- ATENABLE(s, sp->lock);
return;
send:
- ATENABLE(s, sp->lock);
CheckSend(sp);
}
-void TimerTick_funnel(void *arg)
+void TimerTick_funnel(void *arg);
+
+void TimerTick_funnel(__unused void *arg)
{
atalk_lock();
TimerTick();
atalk_unlock();
}
-static StopTimer;
+static int StopTimer;
/*
* TimerTick