summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/thread.h10
-rw-r--r--firmware/include/file.h2
2 files changed, 9 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
80struct 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
99struct thread_entry { 105struct 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;
diff --git a/firmware/include/file.h b/firmware/include/file.h
index 989f50a283..9a94e91263 100644
--- a/firmware/include/file.h
+++ b/firmware/include/file.h
@@ -55,6 +55,8 @@
55#define fsync(x) sim_fsync(x) 55#define fsync(x) sim_fsync(x)
56#define ftruncate(x,y) sim_ftruncate(x,y) 56#define ftruncate(x,y) sim_ftruncate(x,y)
57#define lseek(x,y,z) sim_lseek(x,y,z) 57#define lseek(x,y,z) sim_lseek(x,y,z)
58#define read(x,y,z) sim_read(x,y,z)
59#define write(x,y,z) sim_write(x,y,z)
58#endif 60#endif
59 61
60typedef int (*open_func)(const char* pathname, int flags); 62typedef int (*open_func)(const char* pathname, int flags);