static ssize_t latency_vfile_store(struct xnvfile_input *input) { ssize_t ret; long val; ret = xnvfile_get_integer(input, &val); if (ret < 0) return ret; nkclock.gravity.user = xnclock_ns_to_ticks(&nkclock, val); return ret; }
static ssize_t openfd_store(struct xnvfile_input *input) { ssize_t ret, cret; long val; ret = xnvfile_get_integer(input, &val); if (ret < 0) return ret; cret = __rt_dev_close(current, (int)val); if (cret < 0) return cret; return ret; }
static ssize_t affinity_vfile_store(struct xnvfile_input *input) { xnarch_cpumask_t new_affinity; ssize_t ret; long val; int cpu; ret = xnvfile_get_integer(input, &val); if (ret < 0) return ret; xnarch_cpus_clear(new_affinity); for (cpu = 0; cpu < BITS_PER_LONG; cpu++, val >>= 1) if (val & 1) xnarch_cpu_set(cpu, new_affinity); xnarch_cpus_and(nkaffinity, new_affinity, xnarch_supported_cpus); return ret; }
static ssize_t lock_vfile_store(struct xnvfile_input *input) { ssize_t ret; spl_t s; int cpu; long val; ret = xnvfile_get_integer(input, &val); if (ret < 0) return ret; if (val != 0) return -EINVAL; for_each_realtime_cpu(cpu) { xnlock_get_irqsave(&nklock, s); memset(&per_cpu(xnlock_stats, cpu), '\0', sizeof(struct xnlockinfo)); xnlock_put_irqrestore(&nklock, s); } return ret; }