equal
deleted
inserted
replaced
318 #elif defined(__OpenBSD__) |
318 #elif defined(__OpenBSD__) |
319 stack_t ss; |
319 stack_t ss; |
320 int rslt = pthread_stackseg_np(pthread_self(), &ss); |
320 int rslt = pthread_stackseg_np(pthread_self(), &ss); |
321 |
321 |
322 if (rslt != 0) |
322 if (rslt != 0) |
323 fatal(err_msg("pthread_stackseg_np failed with err = " INT32_FORMAT, |
323 fatal("pthread_stackseg_np failed with err = " INT32_FORMAT, rslt); |
324 rslt)); |
|
325 |
324 |
326 stack_top = (address) ss.ss_sp; |
325 stack_top = (address) ss.ss_sp; |
327 stack_bytes = ss.ss_size; |
326 stack_bytes = ss.ss_size; |
328 stack_bottom = stack_top - stack_bytes; |
327 stack_bottom = stack_top - stack_bytes; |
329 #else |
328 #else |
331 |
330 |
332 int rslt = pthread_attr_init(&attr); |
331 int rslt = pthread_attr_init(&attr); |
333 |
332 |
334 // JVM needs to know exact stack location, abort if it fails |
333 // JVM needs to know exact stack location, abort if it fails |
335 if (rslt != 0) |
334 if (rslt != 0) |
336 fatal(err_msg("pthread_attr_init failed with err = " INT32_FORMAT, rslt)); |
335 fatal("pthread_attr_init failed with err = " INT32_FORMAT, rslt); |
337 |
336 |
338 rslt = pthread_attr_get_np(pthread_self(), &attr); |
337 rslt = pthread_attr_get_np(pthread_self(), &attr); |
339 |
338 |
340 if (rslt != 0) |
339 if (rslt != 0) |
341 fatal(err_msg("pthread_attr_get_np failed with err = " INT32_FORMAT, |
340 fatal("pthread_attr_get_np failed with err = " INT32_FORMAT, rslt); |
342 rslt)); |
|
343 |
341 |
344 if (pthread_attr_getstackaddr(&attr, (void **) &stack_bottom) != 0 || |
342 if (pthread_attr_getstackaddr(&attr, (void **) &stack_bottom) != 0 || |
345 pthread_attr_getstacksize(&attr, &stack_bytes) != 0) { |
343 pthread_attr_getstacksize(&attr, &stack_bytes) != 0) { |
346 fatal("Can not locate current stack attributes!"); |
344 fatal("Can not locate current stack attributes!"); |
347 } |
345 } |