]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netat/adsp_Timer.c
xnu-1228.15.4.tar.gz
[apple/xnu.git] / bsd / netat / adsp_Timer.c
index edcc8ffca96296def35a4ca752c4475696641988..455ab5e33c52424333fd9da0999e816e051c89de 100644 (file)
 #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
@@ -73,16 +75,15 @@ void TimerTick();
  * 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);
 }
@@ -96,14 +97,14 @@ void TrashSession(sp)               /* (CCBPtr sp) */
  * 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. */
@@ -142,7 +143,6 @@ void DoTimerElem(t) /* (TimerElemPtr t) */
     } 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 {
@@ -157,7 +157,6 @@ void DoTimerElem(t) /* (TimerElemPtr t) */
            {
                if (--sp->openRetrys == 0) { /* Oops, didn't open */
                    sp->state = sClosed;
-                   ATENABLE(s, sp->lock);
                    DoClose(sp, errOpening, 1);
                    return;
                }               /* open failed */
@@ -175,22 +174,22 @@ void DoTimerElem(t) /* (TimerElemPtr t) */
        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