linux-lts-quantal-3.5.0/kernel/replay.c
/* Write and free the kernel log asynchronously by scheduling work on the kernel work queue */
Write and free the kernel log asynchronously by scheduling work on the kernel work queue
Write and free the kernel log asynchronously by scheduling work on the kernel work queue
static void
write_and_free_kernel_log_async (struct record_thread *prect)
{
	struct write_async_params* wap;
	wap = KMALLOC(sizeof(struct write_async_params), GFP_KERNEL);
	wap->prect = prect;
	atomic_inc(&prect->rp_refcnt);
	INIT_WORK((struct work_struct*) wap, write_and_free_handler);
	schedule_work((struct work_struct*) wap);
	MPRINT ("Pid %d scheduled write_and_free_handler\n", current->pid);
}
static void write_and_free_kernel_log_async ( struct record_thread * prect ) { struct write_async_params * wap ; wap = KMALLOC ( sizeof ( struct write_async_params ) , GFP_KERNEL ) ; wap -> prect = prect ; atomic_inc ( & prect -> rp_refcnt ) ; INIT_WORK ( ( struct work_struct * ) wap , write_and_free_handler ) ; schedule_work ( ( struct work_struct * ) wap ) ; MPRINT ( " \n " , current -> pid ) ; }
Write and free the kernel log asynchronously by scheduling work on the kernel work queue
Write and free the kernel log asynchronously by scheduling work on the kernel work queue
// increment so that we don't destroy record thread until after the handler finishes