����11-2 linux/kernel/math/error.c
1 /*
2 * linux/kernel/math/error.c
3 *
4 * (C) 1991 Linus Torvalds
5 */
6
7 #include <signal.h> // �ź�ͷ�ļ��������źŷ��ų������źŽṹ���źŲ�������ԭ�͡�
8
9 #include <linux/sched.h> // ���ȳ���ͷ�ļ�����������ṹtask_struct������0���ݵȡ�
10
// Э�����������ж�int16���õĴ���������
// ��Э���������Լ���������ʱ���ͻ�ͨ��ERROR����֪ͨCPU������������ڴ���Э����
// �������ij����źš�����תȥִ�� math_error()�����غ���ת�����ret_from_sys_call
// ������ִ�С�
11 void math_error(void)
12 {
13 __asm__("fnclex"); // ��80387���״̬���������쳣��־λ��æλ��
14 if (last_task_used_math) // ��ʹ����Э��������������Э�����������źš�
15 last_task_used_math->signal |= 1<<(SIGFPE-1);
16 }
17