예제 #1
0
void Java_com_sun_cldc_isolate_Isolate_setPriority0() {
  IsolateObj::Raw isolate_obj = GET_PARAMETER_AS_OOP(0);
  const jint new_priority = KNI_GetParameterAsInt(1);
  // new_priority tested at java level, should never be out of range
  GUARANTEE(new_priority >= Task::PRIORITY_MIN &&
            new_priority <= Task::PRIORITY_MAX, "priority out of range");
  Task::Raw t = isolate_obj().task();
  if (t.not_null()) {
    t().set_priority(new_priority);
  }
}
예제 #2
0
jint IsolateObj::exit_code( void ) const {
  // Always fetch the exit code from the Task, if the Task still exists
  // (even if it is in the STOPPING state).
  Task::Raw t = task();
  return t.not_null() ? t().exit_code() : saved_exit_code();
}
예제 #3
0
jint IsolateObj::task_id( void ) const {
  Task::Raw t = task();
  return t.not_null() ? t().task_id() : Task::INVALID_TASK_ID;
}