aboutsummaryrefslogtreecommitdiffstats
path: root/core/include
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-03-30 16:09:03 -0700
committerH. Peter Anvin <hpa@zytor.com>2012-03-30 16:13:02 -0700
commit12b2033fc541241f1b5a286a1a80dd309fe2a708 (patch)
treecb1b086db734708b092d70a7a6682c50b1f82a9f /core/include
parent9787a5c552d37b26550de38578c338fa92232545 (diff)
downloadsyslinux-12b2033fc541241f1b5a286a1a80dd309fe2a708.tar.gz
syslinux-12b2033fc541241f1b5a286a1a80dd309fe2a708.tar.xz
syslinux-12b2033fc541241f1b5a286a1a80dd309fe2a708.zip
thread: Add magic number, debugging code, min stack size
Add a magic number to the thread control block; this helps check for memory overwrites. Add dprintf()s to the scheduler. Force a minimum stack size. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/include')
-rw-r--r--core/include/thread.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/include/thread.h b/core/include/thread.h
index 85f2dafc..6bfdfaa7 100644
--- a/core/include/thread.h
+++ b/core/include/thread.h
@@ -39,8 +39,11 @@ struct thread_block {
bool timed_out;
};
+#define THREAD_MAGIC 0x3568eb7d
+
struct thread {
struct thread_stack *esp; /* Must be first; stack pointer */
+ unsigned int thread_magic;
const char *name; /* Name (for debugging) */
struct thread_list list;
struct thread_block *blocked;