X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=cacao.git;a=blobdiff_plain;f=src%2Fthreads%2Fthreadlist.cpp;h=a24ba44412c1053f844922ab59eeee38f0ca9e03;hp=0350a1620b150f24aabcda1ca07462c671cc7bb3;hb=3936052d73a3af4ed04156a470407915834a4fd6;hpb=ac631c42adf26cee868135fc74401039099fe5ee diff --git a/src/threads/threadlist.cpp b/src/threads/threadlist.cpp index 0350a1620..a24ba4441 100644 --- a/src/threads/threadlist.cpp +++ b/src/threads/threadlist.cpp @@ -52,6 +52,8 @@ int32_t ThreadList::_number_of_active_java_threads; int32_t ThreadList::_peak_of_active_java_threads; int32_t ThreadList::_number_of_non_daemon_threads; +int32_t ThreadList::_last_index = 0; + /** * Dumps info for all threads running in the VM. This function is @@ -192,7 +194,7 @@ int32_t ThreadList::get_free_thread_index() } else { // Get a new the thread index. - index = _active_thread_list.size() + 1; + index = ++_last_index; } unlock();