/*
* _defer_rcu - Queue a RCU callback.
*/
-void _defer_rcu_ratelimit(void (*fct)(void *p), void *p, int (*rl)(void *p))
+void _defer_rcu(void (*fct)(void *p), void *p)
{
unsigned long head, tail;
- int sync;
-
- /*
- * Verify if we reached the rate limiter threshold.
- */
- sync = rl ? rl(p) : 0;
/*
* Head is only modified by ourself. Tail can be modified by reclamation
* library wrappers to be used by non-LGPL compatible source code.
*/
-void defer_rcu_ratelimit(void (*fct)(void *p), void *p, int (*rl)(void *p))
+void defer_rcu(void (*fct)(void *p), void *p)
{
- _defer_rcu_ratelimit(fct, p, rl);
+ _defer_rcu(fct, p);
}
static void start_defer_thread(void)
#include <pthread.h>
/*
+ * Note: the defer_rcu() API is currently EXPERIMENTAL. It may change in the
+ * future.
+ *
* Important !
*
* Each thread queuing memory reclamation must be registered with
* primitive need to call synchronize_rcu() if the thread queue is full.
*/
-#define defer_rcu(fct, p) defer_rcu_ratelimit(fct, p, NULL)
-
-extern void defer_rcu_ratelimit(void (*fct)(void *p), void *p,
- int (*rl)(void *p));
+extern void defer_rcu(void (*fct)(void *p), void *p);
/*
* Thread registration for reclamation.