diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-09-08 12:20:53 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-09-08 12:20:53 +0000 |
commit | f64ebb1c1f10e8d15fcc4879d781703c86c5fb8b (patch) | |
tree | 065072709c699ac6dc3eb640368bd3f4106144e4 /firmware/export/thread.h | |
parent | 69b4654ea28049c7e8637d521327ba10ae405f8b (diff) | |
download | rockbox-f64ebb1c1f10e8d15fcc4879d781703c86c5fb8b.tar.gz rockbox-f64ebb1c1f10e8d15fcc4879d781703c86c5fb8b.zip |
Sim I/O and threading that runs more like on target. Tweakable if any genuine slowness imitation is required for any one of them. One point of concern is the sim shutdown on an OS other than Linux just because terminating threads in a manner other than having the do it themselves is kind of dirty IMHO.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14639 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/thread.h')
-rw-r--r-- | firmware/export/thread.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/firmware/export/thread.h b/firmware/export/thread.h index 2915d23207..19bf9e12fc 100644 --- a/firmware/export/thread.h +++ b/firmware/export/thread.h | |||
@@ -76,7 +76,13 @@ struct regs | |||
76 | void *start; /* Thread start address, or NULL when started */ | 76 | void *start; /* Thread start address, or NULL when started */ |
77 | }; | 77 | }; |
78 | # endif | 78 | # endif |
79 | 79 | #else | |
80 | struct regs | ||
81 | { | ||
82 | void *t; /* Simulator OS thread */ | ||
83 | void *c; /* Condition for blocking and sync */ | ||
84 | void (*start)(void); /* Start function */ | ||
85 | }; | ||
80 | #endif /* !SIMULATOR */ | 86 | #endif /* !SIMULATOR */ |
81 | 87 | ||
82 | #define STATE_RUNNING 0x00000000 | 88 | #define STATE_RUNNING 0x00000000 |
@@ -97,9 +103,7 @@ struct regs | |||
97 | #define SET_BOOST_STATE(var) (var |= STATE_BOOSTED) | 103 | #define SET_BOOST_STATE(var) (var |= STATE_BOOSTED) |
98 | 104 | ||
99 | struct thread_entry { | 105 | struct thread_entry { |
100 | #ifndef SIMULATOR | ||
101 | struct regs context; | 106 | struct regs context; |
102 | #endif | ||
103 | const char *name; | 107 | const char *name; |
104 | void *stack; | 108 | void *stack; |
105 | unsigned long statearg; | 109 | unsigned long statearg; |