equal
deleted
inserted
replaced
308 #elif defined(__OpenBSD__) |
308 #elif defined(__OpenBSD__) |
309 stack_t ss; |
309 stack_t ss; |
310 int rslt = pthread_stackseg_np(pthread_self(), &ss); |
310 int rslt = pthread_stackseg_np(pthread_self(), &ss); |
311 |
311 |
312 if (rslt != 0) |
312 if (rslt != 0) |
313 fatal("pthread_stackseg_np failed with err = " INT32_FORMAT, rslt); |
313 fatal("pthread_stackseg_np failed with error = " INT32_FORMAT, rslt); |
314 |
314 |
315 stack_top = (address) ss.ss_sp; |
315 stack_top = (address) ss.ss_sp; |
316 stack_bytes = ss.ss_size; |
316 stack_bytes = ss.ss_size; |
317 stack_bottom = stack_top - stack_bytes; |
317 stack_bottom = stack_top - stack_bytes; |
318 #else |
318 #else |
320 |
320 |
321 int rslt = pthread_attr_init(&attr); |
321 int rslt = pthread_attr_init(&attr); |
322 |
322 |
323 // JVM needs to know exact stack location, abort if it fails |
323 // JVM needs to know exact stack location, abort if it fails |
324 if (rslt != 0) |
324 if (rslt != 0) |
325 fatal("pthread_attr_init failed with err = " INT32_FORMAT, rslt); |
325 fatal("pthread_attr_init failed with error = " INT32_FORMAT, rslt); |
326 |
326 |
327 rslt = pthread_attr_get_np(pthread_self(), &attr); |
327 rslt = pthread_attr_get_np(pthread_self(), &attr); |
328 |
328 |
329 if (rslt != 0) |
329 if (rslt != 0) |
330 fatal("pthread_attr_get_np failed with err = " INT32_FORMAT, rslt); |
330 fatal("pthread_attr_get_np failed with error = " INT32_FORMAT, rslt); |
331 |
331 |
332 if (pthread_attr_getstackaddr(&attr, (void **) &stack_bottom) != 0 || |
332 if (pthread_attr_getstackaddr(&attr, (void **) &stack_bottom) != 0 || |
333 pthread_attr_getstacksize(&attr, &stack_bytes) != 0) { |
333 pthread_attr_getstacksize(&attr, &stack_bytes) != 0) { |
334 fatal("Can not locate current stack attributes!"); |
334 fatal("Can not locate current stack attributes!"); |
335 } |
335 } |