equal
deleted
inserted
replaced
726 int pid = os::current_process_id(); |
726 int pid = os::current_process_id(); |
727 alloca(((pid ^ counter++) & 7) * 128); |
727 alloca(((pid ^ counter++) & 7) * 128); |
728 |
728 |
729 int prio; |
729 int prio; |
730 Thread* thread = (Thread*)thread_addr; |
730 Thread* thread = (Thread*)thread_addr; |
|
731 |
|
732 thread->initialize_thread_current(); |
|
733 |
731 OSThread* osthr = thread->osthread(); |
734 OSThread* osthr = thread->osthread(); |
732 |
735 |
733 osthr->set_lwp_id(_lwp_self()); // Store lwp in case we are bound |
736 osthr->set_lwp_id(_lwp_self()); // Store lwp in case we are bound |
734 thread->_schedctl = (void *) schedctl_init(); |
737 thread->_schedctl = (void *) schedctl_init(); |
735 |
738 |
5577 argv[2] = cmd; |
5580 argv[2] = cmd; |
5578 argv[3] = NULL; |
5581 argv[3] = NULL; |
5579 |
5582 |
5580 // fork is async-safe, fork1 is not so can't use in signal handler |
5583 // fork is async-safe, fork1 is not so can't use in signal handler |
5581 pid_t pid; |
5584 pid_t pid; |
5582 Thread* t = ThreadLocalStorage::get_thread_slow(); |
5585 Thread* t = Thread::current_or_null_safe(); |
5583 if (t != NULL && t->is_inside_signal_handler()) { |
5586 if (t != NULL && t->is_inside_signal_handler()) { |
5584 pid = fork(); |
5587 pid = fork(); |
5585 } else { |
5588 } else { |
5586 pid = fork1(); |
5589 pid = fork1(); |
5587 } |
5590 } |