| # Context switch | |
| # | |
| # void swtch(struct context **old, struct context *new); | |
| # | |
| # Save the current registers on the stack, creating | |
| # a struct context, and save its address in *old. | |
| # Switch stacks to new and pop previously-saved registers. | |
| .globl swtch | |
| swtch: | |
| movl 4(%esp), %eax | |
| movl 8(%esp), %edx | |
| # Save old callee-saved registers | |
| pushl %ebp | |
| pushl %ebx | |
| pushl %esi | |
| pushl %edi | |
| # Switch stacks | |
| movl %esp, (%eax) | |
| movl %edx, %esp | |
| # Load new callee-saved registers | |
| popl %edi | |
| popl %esi | |
| popl %ebx | |
| popl %ebp | |
| ret | |
Xet Storage Details
- Size:
- 542 Bytes
- Xet hash:
- 5e3dd725cf1c3c818765ff41feefa7812f332398aba5b8dbeadc9546d98e550e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.