这篇教程C++ vfp_sync_hwstate函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中vfp_sync_hwstate函数的典型用法代码示例。如果您正苦于以下问题:C++ vfp_sync_hwstate函数的具体用法?C++ vfp_sync_hwstate怎么用?C++ vfp_sync_hwstate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了vfp_sync_hwstate函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: vfp_thread_copystatic void vfp_thread_copy(struct thread_info *thread){ struct thread_info *parent = current_thread_info(); vfp_sync_hwstate(parent); thread->vfpstate = parent->vfpstate;}
开发者ID:InhyukYee,项目名称:PeanutButterWolf,代码行数:7,
示例2: vfp_get/* * VFP register get/set implementations. * * With respect to the kernel, struct user_fp is divided into three chunks: * 16 or 32 real VFP registers (d0-d15 or d0-31) * These are transferred to/from the real registers in the task's * vfp_hard_struct. The number of registers depends on the kernel * configuration. * * 16 or 0 fake VFP registers (d16-d31 or empty) * i.e., the user_vfp structure has space for 32 registers even if * the kernel doesn't have them all. * * vfp_get() reads this chunk as zero where applicable * vfp_set() ignores this chunk * * 1 word for the FPSCR * * The bounds-checking logic built into user_regset_copyout and friends * means that we can make a simple sequence of calls to map the relevant data * to/from the specified slice of the user regset structure. */static int vfp_get(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf){ int ret; struct thread_info *thread = task_thread_info(target); struct vfp_hard_struct const *vfp = &thread->vfpstate.hard; const size_t user_fpregs_offset = offsetof(struct user_vfp, fpregs); const size_t user_fpscr_offset = offsetof(struct user_vfp, fpscr); vfp_sync_hwstate(thread); ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &vfp->fpregs, user_fpregs_offset, user_fpregs_offset + sizeof(vfp->fpregs)); if (ret) return ret; ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, user_fpregs_offset + sizeof(vfp->fpregs), user_fpscr_offset); if (ret) return ret; return user_regset_copyout(&pos, &count, &kbuf, &ubuf, &vfp->fpscr, user_fpscr_offset, user_fpscr_offset + sizeof(vfp->fpscr));}
开发者ID:PurpleAlien,项目名称:linux-linaro-natty,代码行数:53,
示例3: vfp_preserve_user_clear_hwstateint vfp_preserve_user_clear_hwstate(struct user_vfp __user *ufp, struct user_vfp_exc __user *ufp_exc){ struct thread_info *thread = current_thread_info(); struct vfp_hard_struct *hwstate = &thread->vfpstate.hard; int err = 0; vfp_sync_hwstate(thread); err |= __copy_to_user(&ufp->fpregs, &hwstate->fpregs, sizeof(hwstate->fpregs)); __put_user_error(hwstate->fpscr, &ufp->fpscr, err); __put_user_error(hwstate->fpexc, &ufp_exc->fpexc, err); __put_user_error(hwstate->fpinst, &ufp_exc->fpinst, err); __put_user_error(hwstate->fpinst2, &ufp_exc->fpinst2, err); if (err) return -EFAULT; vfp_flush_hwstate(thread); hwstate->fpscr &= ~(FPSCR_LENGTH_MASK | FPSCR_STRIDE_MASK); return 0;}
开发者ID:MarcoMas6,项目名称:android_kernel_htc_liberty-villec2,代码行数:27,
示例4: preserve_vfp_contextstatic int preserve_vfp_context(struct vfp_sigframe __user *frame){ struct thread_info *thread = current_thread_info(); struct vfp_hard_struct *h = &thread->vfpstate.hard; const unsigned long magic = VFP_MAGIC; const unsigned long size = VFP_STORAGE_SIZE; int err = 0; vfp_sync_hwstate(thread); __put_user_error(magic, &frame->magic, err); __put_user_error(size, &frame->size, err); /* * Copy the floating point registers. There can be unused * registers see asm/hwcap.h for details. */ err |= __copy_to_user(&frame->ufp.fpregs, &h->fpregs, sizeof(h->fpregs)); /* * Copy the status and control register. */ __put_user_error(h->fpscr, &frame->ufp.fpscr, err); /* * Copy the exception registers. */ __put_user_error(h->fpexc, &frame->ufp_exc.fpexc, err); __put_user_error(h->fpinst, &frame->ufp_exc.fpinst, err); __put_user_error(h->fpinst2, &frame->ufp_exc.fpinst2, err); return err ? -EFAULT : 0;}
开发者ID:12019,项目名称:android_kernel_samsung_xcover,代码行数:32,
示例5: vfp_thread_copystatic void vfp_thread_copy(struct thread_info *thread){ struct thread_info *parent = current_thread_info(); vfp_sync_hwstate(parent); thread->vfpstate = parent->vfpstate;#ifdef CONFIG_SMP thread->vfpstate.hard.cpu = NR_CPUS;#endif}
开发者ID:MarcoMas6,项目名称:android_kernel_htc_liberty-villec2,代码行数:10,
注:本文中的vfp_sync_hwstate函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ vfprintf函数代码示例 C++ vfp_save_state函数代码示例 |