On Mon, Mar 16, 2015 at 3:53 PM, Gedare Bloom <[email protected]> wrote: > On Mon, Mar 16, 2015 at 3:36 PM, Sebastian Huber > <[email protected]> wrote: >> >> ----- Gedare Bloom <[email protected]> schrieb: >>> On Mon, Mar 16, 2015 at 2:23 PM, Sebastian Huber >>> <[email protected]> wrote: >>> > >>> > ----- Gedare Bloom <[email protected]> schrieb: >>> >> Module: rtems >>> >> Branch: master >>> >> Commit: 1ff449cfc473f6b88e1495492aebd665ad42b236 >>> >> Changeset: >>> >> http://git.rtems.org/rtems/commit/?id=1ff449cfc473f6b88e1495492aebd665ad42b236 >>> >> >>> >> Author: Gedare Bloom <[email protected]> >>> >> Date: Mon Mar 16 12:15:27 2015 -0400 >>> >> >>> >> rtems: make error codes uintptr_t >>> >> >>> >> --- >>> >> >>> >> cpukit/score/include/rtems/score/interr.h | 2 +- >>> >> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >> >>> >> diff --git a/cpukit/score/include/rtems/score/interr.h >>> >> b/cpukit/score/include/rtems/score/interr.h >>> >> index e0cedaf..7c2a604 100644 >>> >> --- a/cpukit/score/include/rtems/score/interr.h >>> >> +++ b/cpukit/score/include/rtems/score/interr.h >>> >> @@ -164,7 +164,7 @@ typedef enum { >>> >> INTERNAL_ERROR_RESOURCE_IN_USE >>> >> } Internal_errors_Core_list; >>> >> >>> >> -typedef uint32_t Internal_errors_t; >>> >> +typedef uintptr_t Internal_errors_t; >>> > >>> > This is a problem on 16-bit targets. I suggest to use unsigned long here. >>> I guess this is fine as long as all 64-bit targets are LP64. >> >> The rtems_task_argument has a similar problem. Maybe we need a new CPU >> type, e.g. CPU_Uintptr_and_at_least_32_bits. > > OK, we could do something like > typedef unsigned long CPU_Uint32ptr; > in the 16-bit targets, and > typedef uintptr_t CPU_Uint32ptr; > in the rest, in their score/cpu.h files. > Actually, we can do something else by checking if size of pointer less than size of long, use unsigned long, otherwise use uintptr_t.
> The only obvious alternative I see would be to limit strictly the > error code and task args to be int or ptr. > > Gedare > >> _______________________________________________ >> devel mailing list >> [email protected] >> http://lists.rtems.org/mailman/listinfo/devel _______________________________________________ devel mailing list [email protected] http://lists.rtems.org/mailman/listinfo/devel
