src/os/linux/vm/os_linux.cpp

Print this page




 288 #define SYS_gettid 143
 289 #else
 290 #error define gettid for the arch
 291 #endif
 292 #endif
 293 
 294 // Cpu architecture string
 295 #if   defined(ZERO)
 296 static char cpu_arch[] = ZERO_LIBARCH;
 297 #elif defined(IA64)
 298 static char cpu_arch[] = "ia64";
 299 #elif defined(IA32)
 300 static char cpu_arch[] = "i386";
 301 #elif defined(AMD64)
 302 static char cpu_arch[] = "amd64";
 303 #elif defined(ARM)
 304 static char cpu_arch[] = "arm";
 305 #elif defined(PPC32)
 306 static char cpu_arch[] = "ppc";
 307 #elif defined(PPC64)



 308 static char cpu_arch[] = "ppc64";

 309 #elif defined(SPARC)
 310 #  ifdef _LP64
 311 static char cpu_arch[] = "sparcv9";
 312 #  else
 313 static char cpu_arch[] = "sparc";
 314 #  endif
 315 #elif defined(AARCH64)
 316 static char cpu_arch[] = "aarch64";
 317 #else
 318 #error Add appropriate cpu_arch setting
 319 #endif
 320 
 321 
 322 // pid_t gettid()
 323 //
 324 // Returns the kernel thread id of the currently running thread. Kernel
 325 // thread id is used to access /proc.
 326 //
 327 // (Note that getpid() on LinuxThreads returns kernel thread id too; but
 328 // on NPTL, it returns the same pid for all threads, as required by POSIX.)




 288 #define SYS_gettid 143
 289 #else
 290 #error define gettid for the arch
 291 #endif
 292 #endif
 293 
 294 // Cpu architecture string
 295 #if   defined(ZERO)
 296 static char cpu_arch[] = ZERO_LIBARCH;
 297 #elif defined(IA64)
 298 static char cpu_arch[] = "ia64";
 299 #elif defined(IA32)
 300 static char cpu_arch[] = "i386";
 301 #elif defined(AMD64)
 302 static char cpu_arch[] = "amd64";
 303 #elif defined(ARM)
 304 static char cpu_arch[] = "arm";
 305 #elif defined(PPC32)
 306 static char cpu_arch[] = "ppc";
 307 #elif defined(PPC64)
 308 #if defined(VM_LITTLE_ENDIAN)
 309 static char cpu_arch[] = "ppc64le";
 310 #else
 311 static char cpu_arch[] = "ppc64";
 312 #endif
 313 #elif defined(SPARC)
 314 #  ifdef _LP64
 315 static char cpu_arch[] = "sparcv9";
 316 #  else
 317 static char cpu_arch[] = "sparc";
 318 #  endif
 319 #elif defined(AARCH64)
 320 static char cpu_arch[] = "aarch64";
 321 #else
 322 #error Add appropriate cpu_arch setting
 323 #endif
 324 
 325 
 326 // pid_t gettid()
 327 //
 328 // Returns the kernel thread id of the currently running thread. Kernel
 329 // thread id is used to access /proc.
 330 //
 331 // (Note that getpid() on LinuxThreads returns kernel thread id too; but
 332 // on NPTL, it returns the same pid for all threads, as required by POSIX.)