Hello,
diff below is just cosmetic change, which has no impact on current
functionality, because there is just single network task to deliver packets to
IP stack. I just want to push this small change to tree to minimize delta
between current and my experimental branch.
OK?
thanks and
regards
sashan
--------8<---------------8<---------------8<------------------8<--------
diff --git a/sys/net/if.c b/sys/net/if.c
index e355f44e80d..15b5f94f188 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -976,14 +976,14 @@ if_netisr(void *unused)
{
int n, t = 0;
- NET_LOCK();
+ NET_RLOCK();
while ((n = netisr) != 0) {
/* Like sched_pause() but with a rwlock dance. */
if (curcpu()->ci_schedstate.spc_schedflags & SPCF_SHOULDYIELD) {
- NET_UNLOCK();
+ NET_RUNLOCK();
yield();
- NET_LOCK();
+ NET_RLOCK();
}
atomic_clearbits_int(&netisr, n);
@@ -1044,7 +1044,7 @@ if_netisr(void *unused)
}
#endif
- NET_UNLOCK();
+ NET_RUNLOCK();
}
void