projects
/
c11tester.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TSAN style tls destructor
[c11tester.git]
/
threads-model.h
diff --git
a/threads-model.h
b/threads-model.h
index e2084abf5008e071bb4cd09e55b3d95a71b3a326..f2efd6c0a75f962600b820222b2cb62ffb974ff4 100644
(file)
--- a/
threads-model.h
+++ b/
threads-model.h
@@
-93,6
+93,9
@@
public:
* @see Thread::pending */
void set_pending(ModelAction *act) { pending = act; }
* @see Thread::pending */
void set_pending(ModelAction *act) { pending = act; }
+ bool just_woken_up() { return wakeup_state; }
+ void set_wakeup_state(bool state) { wakeup_state = state; }
+
Thread * waiting_on() const;
bool is_waiting_on(const Thread *t) const;
Thread * waiting_on() const;
bool is_waiting_on(const Thread *t) const;
@@
-144,6
+147,9
@@
private:
*/
ModelAction *pending;
*/
ModelAction *pending;
+ /** @brief True if this thread was just woken up */
+ bool wakeup_state;
+
void (*start_routine)(void *);
void *(*pstart_routine)(void *);
void (*start_routine)(void *);
void *(*pstart_routine)(void *);
@@
-151,6
+157,7
@@
private:
ucontext_t context;
void *stack;
#ifdef TLS
ucontext_t context;
void *stack;
#ifdef TLS
+ void * helper_stack;
public:
char *tls;
ucontext_t helpercontext;
public:
char *tls;
ucontext_t helpercontext;
@@
-179,6
+186,7
@@
private:
#ifdef TLS
uintptr_t get_tls_addr();
#ifdef TLS
uintptr_t get_tls_addr();
+void tlsdestructor(void *v);
#endif
Thread * thread_current();
#endif
Thread * thread_current();