This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gnat 4.9.2 on arm with rtems

On 28/10/15 15:22, Jan Sommer wrote:
I got it working. The Set function was always overwriting the address of the previous ATCB, so STPO.Self was always returning the ATCB of the task created last.
It turns out that I was building rtems without the --enable-ada option. The option is not mentioned in configure --help and gnat still builds fine.

Would it be possible to not have the symbol rtems_task_self if the --enable-ada switch is off? Then linking gnat should fail with an undefined reference.
I don't know too much of the rtems internals, but maybe it is as easy as adding ifdefs around the SCORE_EXTERN void *rtems_ada_self in score/threadimpl.h?

Since you work on this area, this task variable should go way, since its broken on SMP systems. I would replace it

o with functions, e.g. rtems_ada_get_self() and rtems_ada_set_self(), or
    o POSIX keys, or
    o thread-local storage.

POSIX keys and thread-local storage would make the --enable-ada option superfluous. Thread-local storage is more efficient. It is well supported on ARM, PowerPC and SPARC on RTEMS.

@Joel: What shall I do about the changes I made to gcc/ada/ and newlib/libc/sys/rtems/sys/cpuset.h ? Just send the patches to you or should I  push them to the respective lists with you CC?

Please send them as patches to the corresponding lists and CC

Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  :
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]