Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Copyright (C) 1991, 1992  Linus Torvalds
0007  * Copyright (C) 1994 - 2000  Ralf Baechle
0008  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
0009  */
0010 
0011 #ifndef __SIGNAL_COMMON_H
0012 #define __SIGNAL_COMMON_H
0013 
0014 /* #define DEBUG_SIG */
0015 
0016 #ifdef DEBUG_SIG
0017 #  define DEBUGP(fmt, args...) printk("%s: " fmt, __func__, ##args)
0018 #else
0019 #  define DEBUGP(fmt, args...)
0020 #endif
0021 
0022 /*
0023  * Determine which stack to use..
0024  */
0025 extern void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
0026                  size_t frame_size);
0027 /* Check and clear pending FPU exceptions in saved CSR */
0028 extern int fpcsr_pending(unsigned int __user *fpcsr);
0029 
0030 /* Make sure we will not lose FPU ownership */
0031 #define lock_fpu_owner()    ({ preempt_disable(); pagefault_disable(); })
0032 #define unlock_fpu_owner()  ({ pagefault_enable(); preempt_enable(); })
0033 
0034 /* Assembly functions to move context to/from the FPU */
0035 extern asmlinkage int
0036 _save_fp_context(void __user *fpregs, void __user *csr);
0037 extern asmlinkage int
0038 _restore_fp_context(void __user *fpregs, void __user *csr);
0039 
0040 extern asmlinkage int _save_msa_all_upper(void __user *buf);
0041 extern asmlinkage int _restore_msa_all_upper(void __user *buf);
0042 
0043 #endif  /* __SIGNAL_COMMON_H */