]> git.ozlabs.org Git - ppp.git/blobdiff - svr4/ppp_mod.c
add handle_events() function
[ppp.git] / svr4 / ppp_mod.c
index b0c16cae34fd983c37835cfaa55584c3ccc7dbe6..6b80093a908ec843b880c2c8ca8c4bc389131a18 100644 (file)
@@ -24,7 +24,7 @@
  * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
  * OR MODIFICATIONS.
  *
- * $Id: ppp_mod.c,v 1.1 1995/12/11 05:21:05 paulus Exp $
+ * $Id: ppp_mod.c,v 1.3 1999/02/26 10:53:28 paulus Exp $
  */
 
 /*
@@ -37,6 +37,7 @@
 #include <sys/conf.h>
 #include <sys/modctl.h>
 #include <sys/sunddi.h>
+#include <sys/ksynch.h>
 
 #ifdef __STDC__
 #define __P(x) x
@@ -50,6 +51,7 @@ static int ppp_detach __P((dev_info_t *, ddi_detach_cmd_t));
 static int ppp_devinfo __P((dev_info_t *, ddi_info_cmd_t, void *, void **));
 
 extern struct streamtab pppinfo;
+extern krwlock_t ppp_lower_lock;
 
 static dev_info_t *ppp_dip;
 
@@ -81,7 +83,7 @@ static struct dev_ops ppp_ops = {
 
 static struct modldrv modldrv = {
     &mod_driverops,                    /* says this is a pseudo driver */
-    "PPP-2.2 multiplexing driver",
+    "PPP-2.3 multiplexing driver",
     &ppp_ops                           /* driver ops */
 };
 
@@ -131,6 +133,7 @@ ppp_attach(dip, cmd)
        ddi_remove_minor_node(dip, NULL);
        return DDI_FAILURE;
     }
+    rw_init(&ppp_lower_lock, NULL, RW_DRIVER, NULL);
     return DDI_SUCCESS;
 }
 
@@ -139,6 +142,7 @@ ppp_detach(dip, cmd)
     dev_info_t *dip;
     ddi_detach_cmd_t cmd;
 {
+    rw_destroy(&ppp_lower_lock);
     ddi_remove_minor_node(dip, NULL);
     return DDI_SUCCESS;
 }