RTEMS running under Solaris 2.5

Khalid Rafiq khalid@spider.com
Wed Apr 16 06:04:00 GMT 1997


I have been using RTEMS-3.5.1 running under Solaris 2.5 for some
time and have recently noticed a problem with the implementation
of errno.

The problem is that all RTEMS tasks seem to utilise the same errno
variable, which leads to some problems concerning the application
I am developing.

I have defined _REENTRANT in my makefiles which means that the system
header file errno.h switches from a global integer version of errno
to a function call extern int *___errno() along the lines of
#define errno (*(___errno())).

I have furthermore noted that the ___errno() returns the same
int pointer for all my RTEMS tasks. I believe this is the problem.

Can anyone suggest a fix? Perhaps this is a general problem with
the RTEMS port to Solaris 2.5...

All information gratefully received...

Regards,
Khalid.

-- 
Khalid Rafiq				Spider Software Limited
mailto:khalid@spider.com

PS. To see if your RTEMS port to solaris is affected with this
problem, try putting a printf("%lx\n", ___errno()); statement in
each of your tasks to see if the same address is printed out at
run-time. If so, your tasks are sharing the same errno.



More information about the crossgcc mailing list