RESTORE_ALL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




can someone explain the purpose of this code :

#define RESTORE_ALL     \
	[snip]
1:      popl %ds;       \
2:      popl %es;       \
        addl $4,%esp;   \
3:      iret;           \
.section .fixup,"ax";   \
4:      movl $0,(%esp); \
        jmp 1b;         \
5:      movl $0,(%esp); \
        jmp 2b;         \
6:      pushl %ss;      \
        popl %ds;       \
        pushl %ss;      \
        popl %es;       \
        pushl $11;      \
        call do_exit;   \
.previous;              \
.section __ex_table,"a";\
        .align 4;       \
        .long 1b,4b;    \
        .long 2b,5b;    \
        .long 3b,6b;    \

Now, I understand the exception table stuff (fault at 1 ends up at 4 etc.) but I am
unable to fathom what it's actually for. Ideas ?

regards
john

-- 
"Now why did you have to go and mess up the child's head, so you can get another gold waterbed ?
 You fake-hair contact-wearing liposuction carnival exhibit, listen to my rhyme ..."
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux