urcu-defer.h   urcu-defer.h 
skipping to change at line 36 skipping to change at line 36
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <pthread.h> #include <pthread.h>
/* /*
* Note: the defer_rcu() API is currently EXPERIMENTAL. It may change in th
e
* future.
*
* Important ! * Important !
* *
* Each thread queuing memory reclamation must be registered with * Each thread queuing memory reclamation must be registered with
* rcu_defer_register_thread(). rcu_defer_unregister_thread() should be * rcu_defer_register_thread(). rcu_defer_unregister_thread() should be
* called before the thread exits. * called before the thread exits.
* *
* *NEVER* use call_rcu()/rcu_defer_queue() within a RCU read-side critical * *NEVER* use defer_rcu() within a RCU read-side critical section, because
* section, because this primitive need to call synchronize_rcu() if the th this
read * primitive need to call synchronize_rcu() if the thread queue is full.
* queue is full.
*/ */
#define call_rcu rcu_defer_queue extern void defer_rcu(void (*fct)(void *p), void *p);
#define rcu_reclaim_queue(p) rcu_defer_queue(free, p)
/*
* call_rcu will eventually be implemented with an API similar to the Linux
* kernel call_rcu(), which will allow its use within RCU read-side C.S.
* Generate an error if used for now.
*/
extern void rcu_defer_queue(void (*fct)(void *p), void *p); #define call_rcu __error_call_rcu_not_implemented_please_use_defer_rc u
/* /*
* Thread registration for reclamation. * Thread registration for reclamation.
*/ */
extern void rcu_defer_register_thread(void); extern void rcu_defer_register_thread(void);
extern void rcu_defer_unregister_thread(void); extern void rcu_defer_unregister_thread(void);
extern void rcu_defer_barrier(void); extern void rcu_defer_barrier(void);
extern void rcu_defer_barrier_thread(void); extern void rcu_defer_barrier_thread(void);
#endif /* _URCU_BATCH_H */ #endif /* _URCU_BATCH_H */
 End of changes. 4 change blocks. 
7 lines changed or deleted 15 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/