2 * This is a test for global values in code and shared libraries.
3 * This has several requirements:
4 * - When porting code ofter including AROS/Amiga include must be avoided to
5 * not generate conflicts with possible own definitions. Therefor in this
6 * file not other include files will be included.
7 * - On other systems it is possible that a shared library defines a global
8 * variable and this global variable can then be accessed both from other
9 * shared libraries and from the program.
10 * This is tested by defining pertaskvalue in pertask.library and
11 * accessing it both from userel.library and userel test program.
12 * One imperfection it that it is not yet supported that programs just
13 * define pertaskvalue as a global variable without including the .h file.
14 * - It is avoided to call a function of pertask.library to achieve this.
15 * A good compiler that has good link time optimizations can than optimize
16 * the access to the global very well.
20 Mimic following definition:
23 int *__pertask_getvalueptr(void);
24 #define pertaskvalue (*__pertask_getvalueptr())