479 torture_type, TORTURE_FLAG, idx);
480 for_each_possible_cpu(cpu) {
481 cnt += sprintf(&page[cnt], " %d(%d,%d)", cpu,
482 per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[!idx],
483 per_cpu_ptr(srcu_ctl.per_cpu_ref, cpu)->c[idx]);
484 }
485 cnt += sprintf(&page[cnt], "\n");
486 return cnt;
487}
488
489static struct rcu_torture_ops srcu_ops = {
490 .init = srcu_torture_init,
491 .cleanup = srcu_torture_cleanup,
492 .readlock = srcu_torture_read_lock,
493 .readdelay = srcu_read_delay,
494 .readunlock = srcu_torture_read_unlock,
495 .completed = srcu_torture_completed,
496 .deferredfree = rcu_sync_torture_deferred_free,
497 .sync = srcu_torture_synchronize,
498 .cb_barrier = NULL,
499 .stats = srcu_torture_stats,
500 .name = "srcu"
501};
502
503
504
505
506
507static int sched_torture_read_lock(void)
508{
509 preempt_disable();
510 return 0;
511}
512
513static void sched_torture_read_unlock(int idx)
514{
515 preempt_enable();
516}
517
518static int sched_torture_completed(void)
519{