comparison src/os/bsd/vm/os_bsd.cpp @ 23004:9a23a160ca57

8077674: BSD build failures due to undefined macros Reviewed-by: dsamersoff, kbarrett, hseigel
author dholmes
date Mon, 04 May 2015 23:23:37 -0400
parents 8461d0b03127
children bbceafdc7a5f
comparison
equal deleted inserted replaced
23003:0f0188a02ecb 23004:9a23a160ca57
1195 // instead of syscall(SYS_thread_selfid) as it certainly fits to u4 1195 // instead of syscall(SYS_thread_selfid) as it certainly fits to u4
1196 retval = ::pthread_mach_thread_np(::pthread_self()); 1196 retval = ::pthread_mach_thread_np(::pthread_self());
1197 guarantee(retval != 0, "just checking"); 1197 guarantee(retval != 0, "just checking");
1198 return retval; 1198 return retval;
1199 1199
1200 #elif __FreeBSD__ 1200 #else
1201 #ifdef __FreeBSD__
1201 retval = syscall(SYS_thr_self); 1202 retval = syscall(SYS_thr_self);
1202 #elif __OpenBSD__ 1203 #else
1204 #ifdef __OpenBSD__
1203 retval = syscall(SYS_getthrid); 1205 retval = syscall(SYS_getthrid);
1204 #elif __NetBSD__ 1206 #else
1207 #ifdef __NetBSD__
1205 retval = (pid_t) syscall(SYS__lwp_self); 1208 retval = (pid_t) syscall(SYS__lwp_self);
1209 #endif
1210 #endif
1211 #endif
1206 #endif 1212 #endif
1207 1213
1208 if (retval == -1) { 1214 if (retval == -1) {
1209 return getpid(); 1215 return getpid();
1210 } 1216 }