Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: threads.h 7766 2007-04-19 13:24:48Z michi $
+ $Id: threads.h 7918 2007-05-20 20:42:18Z michi $
*/
/* forward typedefs ***********************************************************/
-typedef struct threadobject threadobject;
-typedef union threads_table_entry_t threads_table_entry_t;
-typedef struct threads_table_t threads_table_t;
+typedef struct threadobject threadobject;
#include "config.h"
#endif /* defined(HAVE___THREAD) */
-/* threads_table_entry_t *******************************************************
-
- An entry in the global threads table.
-
-*******************************************************************************/
-
-union threads_table_entry_t {
- threadobject *thread; /* an existing thread */
- ptrint nextfree; /* next free index */
-};
-
-
-/* threads_table_t *************************************************************
-
- Struct for the global threads table.
-
-*******************************************************************************/
-
-struct threads_table_t {
- threads_table_entry_t *table; /* the table, threads[0] is the head */
- /* of the free list. Real entries */
- /* start at threads[1]. */
- s4 size; /* current size of the table */
-};
-
-
/* threadobject ****************************************************************
Struct holding thread local variables.
struct threadobject {
java_lang_Thread *object; /* link to java.lang.Thread object */
- lock_execution_env_t ee; /* data for the lock implementation */
-
- threadobject *next; /* next thread in list, or self */
- threadobject *prev; /* prev thread in list, or self */
-
ptrint thinlock; /* pre-computed thin lock value */
s4 index; /* thread index, starting with 1 */
#define STACKFRAMEINFO (THREADOBJECT->_stackframeinfo)
-/* variables ******************************************************************/
-
-extern threadobject *mainthreadobj;
-
-
/* functions ******************************************************************/
void threads_sem_init(sem_t *sem, bool shared, int value);
threadobject *threads_get_current_threadobject(void);
-void threads_preinit(void);
bool threads_init(void);
void threads_start_thread(threadobject *thread, functionptr function);