Пример #1
0
void Thread::setup_lightweight_stack(JVM_SINGLE_ARG_TRAPS) {
  UsingFastOops fast_oops;
  const int stack_size = StackSize;

  GUARANTEE(wakeup_time_offset() % 8 == 0,
            "jlongs in ThreadDesc must be 8 byte aligned");

  // it's here  as Thread::allocate not invoked for the main thread 
  // in ROMized case, and we still need it
#if ENABLE_WTK_PROFILER
  OopDesc* info = WTKProfiler::allocate_thread_data(JVM_SINGLE_ARG_CHECK);
  set_profiler_info(info);
#endif

  // Allocate stack and set stack pointer to bottom
  ExecutionStack::Fast stack = Universe::new_execution_stack(stack_size JVM_CHECK);

  address sp =(address)stack.field_base(JavaStackDirection < 0 ? stack_size
                                        : ExecutionStackDesc::header_size());
#if defined(UNDER_CE)
  // I thought I only needed this for debugging under EVC++, but when I ran
  // cldc_vm under the test utility on the iPaq it hung unless this was
  // uncommented.  Run mintck uses CreateProcess to run the mintck tests.
  // If I run the mintck tests using a .lnk file it works without the
  // following line
  sp = (address)((int)sp |_system_address);
#endif
  set_execution_stack(&stack);
  stack().set_thread(this);
  set_stack_limit();

  sp = setup_stack_asm(sp);
  set_stack_pointer((jint)sp);
}
Пример #2
0
 void set_wakeup_time(jlong value) {
   long_field_put(wakeup_time_offset(), value);
 }
Пример #3
0
 // Accessors for wake-up time (used by Scheduler when sleeping).
 jlong wakeup_time() const {
   return long_field(wakeup_time_offset());
 }