thx
������.谢谢
�� �� judicious (�薹������) �拇������到: ��
: ��  ��: Re: �诤� switch_to ��一���苫�����指�!
: ����站: BBS 水木�华站 (Sat Mar 12 13:35:34 2005), 转��
: 
: 
: ��说���写����看�����歉��本���诤耍�
: �铱���一�����希���确�����应��������模�
: �歉�__switch_to��应����FASTCALL���叨����
: extern void __switch_to(struct task_struct *prev, struct task_struct *next) __attribute__((regparm(3))) ;
: ����示__switch_to����保��3���拇������诓���荩����堑�顺��约��为eax,edx,ecx��
: ��么�看switch_to��秃����������
: #define switch_to(prev,next,last) do {                                  \
:         asm volatile("pushl %%esi\n\t"                                  \
:                      "pushl %%edi\n\t"                                  \
:                      "pushl %%ebp\n\t"                                  \
:                      "movl %%esp,%0\n\t"        /* save ESP */          \
:                      "movl %3,%%esp\n\t"        /* restore ESP */       \
:                      "movl $1f,%1\n\t"          /* save EIP */          \
:                      "pushl %4\n\t"             /* restore EIP */       \
:                      "jmp __switch_to\n"       //����__switch_to������么���� \
:                      "1:\t"                                             \
:                      "popl %%ebp\n\t"                                   \
:                      "popl %%edi\n\t"                                   \
:                      "popl %%esi\n\t"                                   \
:                      :"=m" (prev->thread.esp),"=m" (prev->thread.eip),  \
:                       "=b" (last)                                       \
:                      :"m" (next->thread.esp),"m" (next->thread.eip),    \
:                       "a" (prev), "d" (next),                           \
:                         ~~~~prev->eax ~~~~next->edx,�����������拇��菥徒���税�
:    "b" (prev));                                      \
: } while (0)
: �� �� flyinwindy (����注��) �拇������到: ��
: : ���遣�没�屑����示 edi��诺�一������
: : ebp��诺诙����������
: : �烦����一��
: : ...................
: 
: --
: 
: �� �薷�:��judicious �� Mar 12 13:56:56 �薷谋��摹�[FROM: 202.118.70.*]
: �� ��源:��BBS 水木�华站 smth.org��[FROM: 202.118.70.*]


--
��������
������纸


�� ��源:��BBS 水木�华站 smth.org��[FROM: 166.111.250.86]