diff options
author | Pixel <pixel@nobis-crew.org> | 2011-10-07 15:36:12 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-10-07 15:36:12 -0700 |
commit | 1d9def9edae0011eeee8f83dc32fb3797ca2f46b (patch) | |
tree | 29077945287dd4b0c13269b9f3e5dc97936551f9 /includes/Local.h | |
parent | 5a283e5b2b523d53e3504292c386b534dc74386a (diff) |
More work in the Task manager.
Also fixing a few bugs linked with the printer and TLS.
Removed flto from compilation flags: this actually creates bad code (!)
Diffstat (limited to 'includes/Local.h')
-rw-r--r-- | includes/Local.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/Local.h b/includes/Local.h index a3405ca..e3d08a4 100644 --- a/includes/Local.h +++ b/includes/Local.h @@ -23,10 +23,10 @@ class Local : public AtStart { void * get() { if (getTLS()) { void * l = getLocal(); return l ? l : getGlobal(); } else return getGlobal(); } void setGlobal(void * obj) { m_globals[m_idx] = obj; } void setLocal(void * obj) { void * r = getTLS(); reinterpret_cast<void **>(r)[m_idx] = obj; } - void set(void * obj) { void * r = getTLS(); if (r) setGlobal(obj); else setLocal(obj); } + void set(void * obj) { void * r = getTLS(); if (r) setLocal(obj); else setGlobal(obj); } int getIndex() { return m_idx; } private: - static void * create() { void * r = malloc(s_size * sizeof(void *)); setTLS(r); return r; } + static void * create() { void * r = malloc(s_size * sizeof(void *)); return r; } static void * getTLS() { return tlsManager->getTLS(); } static void * setTLS(void * val) { return tlsManager->setTLS(val); } virtual void doStart(); |