2 Copyright 2010-2011, The AROS Development Team. All rights reserved.
9 #include <exec/types.h>
10 #include <aros/symbolsets.h>
12 struct TaskLocalStorage
;
14 struct TaskLocalStorage
* CreateTLS();
15 VOID
InsertIntoTLS(struct TaskLocalStorage
* tls
, APTR ptr
);
16 APTR
GetFromTLS(struct TaskLocalStorage
* tls
);
17 VOID
ClearFromTLS(struct TaskLocalStorage
* tls
);
18 VOID
DestroyTLS(struct TaskLocalStorage
* tls
);
20 #define DECLARE_STATIC_TLS(tls) \
21 static struct TaskLocalStorage * tls = NULL; \
22 static LONG auto_create_##tls() \
31 static VOID auto_destroy_##tls() \
36 ADD2INIT(auto_create_##tls, 5); \
37 ADD2EXIT(auto_destroy_##tls, 5);