conversions between int, long, jlong, int64_t etc.
---------------------------------------------
What is the best way to do this?
int is a compiler specific type, at least 16 bits
long is a compiler specific type, at least 32 bits
jlong is a C type representing 64-bit Java long quantities
int64_t is a C type, representing 64-bit quantities within the JVM
Do we need conversion macros to convert between jlong and int64_t
quantities?
Casts between them are not a good idea, because on some platforms
they may have to be implemented using structures.
src/share/javavm/runtime/Threadruntime.c
#if defined IBM_OS2
tid->eetop = ptr2ll((void *)val);
#else
tid->eetop = (int64_t)val;
#endif
---------------------------------------------
What is the best way to do this?
int is a compiler specific type, at least 16 bits
long is a compiler specific type, at least 32 bits
jlong is a C type representing 64-bit Java long quantities
int64_t is a C type, representing 64-bit quantities within the JVM
Do we need conversion macros to convert between jlong and int64_t
quantities?
Casts between them are not a good idea, because on some platforms
they may have to be implemented using structures.
src/share/javavm/runtime/Threadruntime.c
#if defined IBM_OS2
tid->eetop = ptr2ll((void *)val);
#else
tid->eetop = (int64_t)val;
#endif
- duplicates
-
JDK-4110530 (porting) Use macros for operating on int64_t quantities, even in platform c
-
- Closed
-
-
JDK-4110537 (porting) Bad definition of EE2SysThread
-
- Closed
-
-
JDK-4110554 (porting) Jlong conversions
-
- Closed
-