[Midnightbsd-cvs] src [7799] trunk/sys/kern/uipc_usrreq.c: Schedule garbage collection run for the in-flight rights passed over the unix domain sockets to the next tick , coalescing the serial calls until the collection fires.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Sep 5 15:33:01 EDT 2016
Revision: 7799
http://svnweb.midnightbsd.org/src/?rev=7799
Author: laffer1
Date: 2016-09-05 15:33:01 -0400 (Mon, 05 Sep 2016)
Log Message:
-----------
Schedule garbage collection run for the in-flight rights passed over the unix domain sockets to the next tick, coalescing the serial calls until the collection fires.
Obtained from: FreeBSD svn 243851
Modified Paths:
--------------
trunk/sys/kern/uipc_usrreq.c
Modified: trunk/sys/kern/uipc_usrreq.c
===================================================================
--- trunk/sys/kern/uipc_usrreq.c 2016-09-05 19:27:25 UTC (rev 7798)
+++ trunk/sys/kern/uipc_usrreq.c 2016-09-05 19:33:01 UTC (rev 7799)
@@ -131,7 +131,7 @@
* reentrance in the UNIX domain socket, file descriptor, and socket layer
* code. See unp_gc() for a full description.
*/
-static struct task unp_gc_task;
+static struct timeout_task unp_gc_task;
/*
* The close of unix domain sockets attached as SCM_RIGHTS is
@@ -680,7 +680,7 @@
VFS_UNLOCK_GIANT(vfslocked);
}
if (local_unp_rights)
- taskqueue_enqueue(taskqueue_thread, &unp_gc_task);
+ taskqueue_enqueue_timeout(taskqueue_thread, &unp_gc_task, -1);
}
static int
@@ -1800,7 +1800,7 @@
LIST_INIT(&unp_shead);
LIST_INIT(&unp_sphead);
SLIST_INIT(&unp_defers);
- TASK_INIT(&unp_gc_task, 0, unp_gc, NULL);
+ TIMEOUT_TASK_INIT(taskqueue_thread, &unp_gc_task, 0, unp_gc, NULL);
TASK_INIT(&unp_defer_task, 0, unp_process_defers, NULL);
UNP_LINK_LOCK_INIT();
UNP_LIST_LOCK_INIT();
More information about the Midnightbsd-cvs
mailing list