diff options
author | H. Peter Anvin <hpa@zytor.com> | 2011-04-27 09:27:10 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2011-04-27 09:27:10 -0700 |
commit | e0d9a80bd9690cdd4fc6c13c7eebe11cb26bf53e (patch) | |
tree | 3c1783e67380d235a7123216be439ca5bbefa673 /core/include | |
parent | 7dfe5f27a0fc56ba3da0e300043731af0bdf13de (diff) | |
download | syslinux-e0d9a80bd9690cdd4fc6c13c7eebe11cb26bf53e.tar.gz syslinux-e0d9a80bd9690cdd4fc6c13c7eebe11cb26bf53e.tar.xz syslinux-e0d9a80bd9690cdd4fc6c13c7eebe11cb26bf53e.zip |
thread: make kill_thread() actually do its job
kill_thread() had been modifying errno(!) as if it had been the return
value... in other words, it really did absolutely nothing.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/include')
-rw-r--r-- | core/include/thread.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/include/thread.h b/core/include/thread.h index be3844af..44084ff3 100644 --- a/core/include/thread.h +++ b/core/include/thread.h @@ -19,6 +19,16 @@ struct thread_list { struct thread_list *next, *prev; }; +/* + * Stack frame used by __switch_to, see thread_asm.S + */ +struct thread_stack { + int errno; + uint16_t rmsp, rmss; + uint32_t edi, esi, ebp, ebx; + void (*eip)(void); +}; + struct thread_block { struct thread_list list; struct thread *thread; @@ -29,7 +39,7 @@ struct thread_block { }; struct thread { - void *esp; /* Must be first; stack pointer */ + struct thread_stack *esp; /* Must be first; stack pointer */ const char *name; /* Name (for debugging) */ struct thread_list list; struct thread_block *blocked; |