Changeset bc1f1c2 in mainline for uspace/lib/libc/arch/ia32
- Timestamp:
- 2007-06-28T00:54:12Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 12f91130
- Parents:
- b9641ee
- Location:
- uspace/lib/libc/arch/ia32
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/arch/ia32/Makefile.inc
rb9641ee rbc1f1c2 34 34 35 35 ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \ 36 arch/$(ARCH)/src/ psthread.S \36 arch/$(ARCH)/src/fibril.S \ 37 37 arch/$(ARCH)/src/thread.c 38 38 -
uspace/lib/libc/arch/ia32/include/fibril.h
rb9641ee rbc1f1c2 33 33 */ 34 34 35 #ifndef LIBC_ia32_ PSTHREAD_H_36 #define LIBC_ia32_ PSTHREAD_H_35 #ifndef LIBC_ia32_FIBRIL_H_ 36 #define LIBC_ia32_FIBRIL_H_ 37 37 38 38 #include <types.h> -
uspace/lib/libc/arch/ia32/include/thread.h
rb9641ee rbc1f1c2 40 40 typedef struct { 41 41 void *self; 42 void * pst_data;42 void *fibril_data; 43 43 } tcb_t; 44 44 … … 50 50 static inline tcb_t * __tcb_get(void) 51 51 { 52 void * 52 void *retval; 53 53 54 54 asm ("movl %%gs:0, %0" : "=r"(retval)); -
uspace/lib/libc/arch/ia32/src/fibril.S
rb9641ee rbc1f1c2 40 40 context_save: 41 41 movl 0(%esp),%eax # the caller's return %eip 42 movl 4(%esp),%edx # address of the kernel_context variable to save context to42 movl 4(%esp),%edx # address of the context variable to save context to 43 43 44 44 movl %esp,0(%edx) # %esp -> ctx->sp … … 64 64 # 65 65 context_restore: 66 movl 4(%esp),%eax # address of the kernel_context variable to restore context from66 movl 4(%esp),%eax # address of the context variable to restore context from 67 67 movl 0(%eax),%esp # ctx->sp -> %esp 68 68 movl 4(%eax),%edx # ctx->pc -> %edx
Note:
See TracChangeset
for help on using the changeset viewer.