GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CK_EPOCH_RECLAIM(3) FreeBSD Library Functions Manual CK_EPOCH_RECLAIM(3)

ck_epoch_reclaim
immediately execute all deferred callbacks

Concurrency Kit (libck, -lck)

#include <ck_epoch.h>

void
ck_epoch_reclaim(ck_epoch_record_t *record);

The ck_epoch_reclaim(3) function will unconditionally execute all callbacks that have been deferred with ck_epoch_call(3).


#include <ck_epoch.h>
#include <ck_stack.h>
#include <stdlib.h>

/*
 * epoch was previously initialized with ck_epoch_init.
 */
ck_epoch_t *epoch;

void
function(void)
{
	ck_epoch_record_t *record;

	logically_delete(object);
	ck_epoch_call(epoch, record, &object->epoch_entry, destructor);

	/*
	 * Wait until no threads could possibly have a reference to the
	 * object we just deleted.
	 */
	ck_epoch_synchronize(epoch, record);

	/*
	 * Execute all deferred callbacks.
	 */
	ck_epoch_reclaim(record);

	return;
}

This function has no return value.

ck_epoch_init(3), ck_epoch_register(3), ck_epoch_unregister(3), ck_epoch_recycle(3), ck_epoch_poll(3), ck_epoch_reclaim(3), ck_epoch_barrier(3), ck_epoch_call(3), ck_epoch_begin(3), ck_epoch_end(3)

Additional information available at http://concurrencykit.org/

May 2, 2013

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.