src/os/linux/vm/os_linux.cpp

Print this page
rev 4738 : Clean up PPC defines.

Reorganize PPC defines.  Distinguish PPC, PPC64 and PPC32.
PPC should guard code needed on PPC regardless of word size.
PPC32 and PPC64 should guard code needed in the 64-bit or
the 32-bit port.


 230 #elif __amd64__
 231 #define SYS_gettid 186
 232 #elif __sparc__
 233 #define SYS_gettid 143
 234 #else
 235 #error define gettid for the arch
 236 #endif
 237 #endif
 238 
 239 // Cpu architecture string
 240 #if   defined(ZERO)
 241 static char cpu_arch[] = ZERO_LIBARCH;
 242 #elif defined(IA64)
 243 static char cpu_arch[] = "ia64";
 244 #elif defined(IA32)
 245 static char cpu_arch[] = "i386";
 246 #elif defined(AMD64)
 247 static char cpu_arch[] = "amd64";
 248 #elif defined(ARM)
 249 static char cpu_arch[] = "arm";
 250 #elif defined(PPC)
 251 static char cpu_arch[] = "ppc";
 252 #elif defined(SPARC)
 253 #  ifdef _LP64
 254 static char cpu_arch[] = "sparcv9";
 255 #  else
 256 static char cpu_arch[] = "sparc";
 257 #  endif
 258 #else
 259 #error Add appropriate cpu_arch setting
 260 #endif
 261 
 262 
 263 // pid_t gettid()
 264 //
 265 // Returns the kernel thread id of the currently running thread. Kernel
 266 // thread id is used to access /proc.
 267 //
 268 // (Note that getpid() on LinuxThreads returns kernel thread id too; but
 269 // on NPTL, it returns the same pid for all threads, as required by POSIX.)
 270 //




 230 #elif __amd64__
 231 #define SYS_gettid 186
 232 #elif __sparc__
 233 #define SYS_gettid 143
 234 #else
 235 #error define gettid for the arch
 236 #endif
 237 #endif
 238 
 239 // Cpu architecture string
 240 #if   defined(ZERO)
 241 static char cpu_arch[] = ZERO_LIBARCH;
 242 #elif defined(IA64)
 243 static char cpu_arch[] = "ia64";
 244 #elif defined(IA32)
 245 static char cpu_arch[] = "i386";
 246 #elif defined(AMD64)
 247 static char cpu_arch[] = "amd64";
 248 #elif defined(ARM)
 249 static char cpu_arch[] = "arm";
 250 #elif defined(PPC32)
 251 static char cpu_arch[] = "ppc";
 252 #elif defined(SPARC)
 253 #  ifdef _LP64
 254 static char cpu_arch[] = "sparcv9";
 255 #  else
 256 static char cpu_arch[] = "sparc";
 257 #  endif
 258 #else
 259 #error Add appropriate cpu_arch setting
 260 #endif
 261 
 262 
 263 // pid_t gettid()
 264 //
 265 // Returns the kernel thread id of the currently running thread. Kernel
 266 // thread id is used to access /proc.
 267 //
 268 // (Note that getpid() on LinuxThreads returns kernel thread id too; but
 269 // on NPTL, it returns the same pid for all threads, as required by POSIX.)
 270 //