net: Initialize rwlock in ipifc
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 6 Apr 2017 17:30:58 +0000 (13:30 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 6 Apr 2017 19:20:10 +0000 (15:20 -0400)
There are other sync structures in the ipifc that we aren't using.  I opted
to keep them around for now (and to initialize them) in case we ever try to
use them for their stated purpose (unbind on the fly).

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/net/ipifc.c

index 2ab62be..8891524 100644 (file)
@@ -343,6 +343,11 @@ static void ipifccreate(struct conv *c)
        ifc->unbinding = 0;
        ifc->m = NULL;
        ifc->reassemble = 0;
+       rwinit(&ifc->rwlock);
+       /* These are never used, but we might need them if we ever do "unbind on the
+        * fly" (see ip.h).  Not sure where the code went that used these vars. */
+       spinlock_init(&ifc->idlock);
+       rendez_init(&ifc->wait);
 }
 
 /*