From 1d9def9edae0011eeee8f83dc32fb3797ca2f46b Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 7 Oct 2011 15:36:12 -0700 Subject: 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 (!) --- includes/Local.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/Local.h') 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(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(); -- cgit v1.2.3