#include "vm/globals.hpp"
#include "vm/javaobjects.hpp"
#include "vm/options.h"
+#include "vm/os.hpp"
#include "vm/signallocal.hpp"
#include "vm/string.hpp"
#include "vm/vm.hpp"
result = pthread_cond_destroy(&(t->flc_cond));
if (result != 0)
- vm_abort_errnum(result, "threads_impl_thread_free: pthread_cond_destroy failed");
+ os::abort_errnum(result, "threads_impl_thread_free: pthread_cond_destroy failed");
delete t->waitmutex;
result = pthread_cond_destroy(&(t->waitcond));
if (result != 0)
- vm_abort_errnum(result, "threads_impl_thread_free: pthread_cond_destroy failed");
+ os::abort_errnum(result, "threads_impl_thread_free: pthread_cond_destroy failed");
delete t->suspendmutex;
result = pthread_cond_destroy(&(t->suspendcond));
if (result != 0)
- vm_abort_errnum(result, "threads_impl_thread_free: pthread_cond_destroy failed");
+ os::abort_errnum(result, "threads_impl_thread_free: pthread_cond_destroy failed");
}
#endif
#if !defined(HAVE___THREAD)
result = pthread_key_create(&thread_current_key, NULL);
if (result != 0)
- vm_abort_errnum(result, "threads_impl_preinit: pthread_key_create failed");
+ os::abort_errnum(result, "threads_impl_preinit: pthread_key_create failed");
#endif
}
result = pthread_attr_init(&attr);
if (result != 0)
- vm_abort_errnum(result, "threads_impl_init: pthread_attr_init failed");
+ os::abort_errnum(result, "threads_impl_init: pthread_attr_init failed");
result = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (result != 0)
- vm_abort_errnum(result, "threads_impl_init: pthread_attr_setdetachstate failed");
+ os::abort_errnum(result, "threads_impl_init: pthread_attr_setdetachstate failed");
}
result = pthread_attr_init(&attr);
if (result != 0)
- vm_abort_errnum(result, "threads_impl_thread_start: pthread_attr_init failed");
+ os::abort_errnum(result, "threads_impl_thread_start: pthread_attr_init failed");
result = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (result != 0)
- vm_abort_errnum(result, "threads_impl_thread_start: pthread_attr_setdetachstate failed");
+ os::abort_errnum(result, "threads_impl_thread_start: pthread_attr_setdetachstate failed");
/* initialize thread stacksize */
result = pthread_attr_setstacksize(&attr, opt_stacksize);
if (result != 0)
- vm_abort_errnum(result, "threads_impl_thread_start: pthread_attr_setstacksize failed");
+ os::abort_errnum(result, "threads_impl_thread_start: pthread_attr_setstacksize failed");
/* create the thread */
result = pthread_create(&(thread->tid), &attr, threads_startup_thread, &startup);
if (result != 0)
- vm_abort_errnum(result, "threads_impl_thread_start: pthread_create failed");
+ os::abort_errnum(result, "threads_impl_thread_start: pthread_create failed");
/* destroy the thread attributes */
result = pthread_attr_destroy(&attr);
if (result != 0)
- vm_abort_errnum(result, "threads_impl_thread_start: pthread_attr_destroy failed");
+ os::abort_errnum(result, "threads_impl_thread_start: pthread_attr_destroy failed");
/* signal that pthread_create has returned, so thread->tid is valid */